From 8d0abba9af39d6597552baacfcf9a8330f1cc31a Mon Sep 17 00:00:00 2001 From: Lohann Paterno Coutinho Ferreira Date: Thu, 18 Jan 2024 00:07:06 +0000 Subject: [PATCH] check script (#213) --- Cargo.lock | 1548 +- Cargo.toml | 4 +- chains/astar/config/src/lib.rs | 2 +- chains/astar/server/Cargo.toml | 8 +- chains/astar/server/src/lib.rs | 2 +- chains/ethereum/rpc-client/src/error.rs | 7 +- chains/ethereum/rpc-client/src/extension.rs | 10 +- chains/ethereum/rpc-client/src/params.rs | 4 +- chains/ethereum/rpc-client/src/pubsub.rs | 2 +- .../ethereum/rpc-client/src/subscription.rs | 6 +- chains/ethereum/server/src/client.rs | 2 +- chains/ethereum/server/src/lib.rs | 2 +- chains/polkadot/config/Cargo.toml | 6 + .../config/res/polkadot-v1000001.scale | Bin 0 -> 270808 bytes .../polkadot/config/res/polkadot-v9430.scale | Bin 386413 -> 0 bytes .../config/res/westend-dev-v1.5.0.scale | Bin 0 -> 286065 bytes chains/polkadot/config/src/lib.rs | 48 +- chains/polkadot/config/src/metadata.rs | 551159 --------------- chains/polkadot/server/Cargo.toml | 2 +- chains/polkadot/server/src/lib.rs | 47 +- chains/polkadot/tx/src/lib.rs | 2 +- docker-compose.yml | 4 +- rosetta-client/src/client.rs | 10 +- rosetta-client/src/lib.rs | 12 + rosetta-client/src/tx_builder.rs | 4 +- rosetta-core/src/traits.rs | 93 + rosetta-core/src/types.rs | 105 + rosetta-server/src/ws.rs | 2 +- rosetta-server/src/ws/config.rs | 6 +- rosetta-server/src/ws/error.rs | 114 +- rosetta-server/src/ws/jsonrpsee_client.rs | 5 +- rosetta-server/src/ws/reconnect.rs | 59 +- rosetta-server/src/ws/reconnect_impl.rs | 18 +- scripts/check.sh | 108 + scripts/pull_nodes.sh | 4 +- 35 files changed, 1546 insertions(+), 551859 deletions(-) create mode 100644 chains/polkadot/config/res/polkadot-v1000001.scale delete mode 100644 chains/polkadot/config/res/polkadot-v9430.scale create mode 100644 chains/polkadot/config/res/westend-dev-v1.5.0.scale delete mode 100644 chains/polkadot/config/src/metadata.rs create mode 100644 rosetta-core/src/traits.rs create mode 100644 rosetta-core/src/types.rs create mode 100755 scripts/check.sh diff --git a/Cargo.lock b/Cargo.lock index e738cd92..2f920a98 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -87,21 +87,7 @@ dependencies = [ "aes 0.6.0", "cipher 0.2.5", "ctr 0.6.0", - "ghash 0.3.1", - "subtle", -] - -[[package]] -name = "aes-gcm" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" -dependencies = [ - "aead 0.5.2", - "aes 0.8.3", - "cipher 0.4.4", - "ctr 0.9.2", - "ghash 0.5.0", + "ghash", "subtle", ] @@ -131,19 +117,19 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ "cfg-if", - "getrandom 0.2.11", + "getrandom 0.2.12", "once_cell", "version_check", "zerocopy", @@ -158,6 +144,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "alloy-primitives" version = "0.5.4" @@ -179,6 +171,28 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "alloy-primitives" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3729132072f369bc4e8e6e070f9cf4deb3490fc9b9eea6f71f75ec19406df811" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "k256", + "keccak-asm", + "proptest", + "rand 0.8.5", + "ruint", + "serde", + "tiny-keccak", +] + [[package]] name = "alloy-rlp" version = "0.3.4" @@ -202,8 +216,26 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.43", - "syn-solidity", + "syn 2.0.48", + "syn-solidity 0.5.4", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5531f0a16e36c547e68c73a1638bea1f26237ee8ae785527190c4e4f9fecd2c5" +dependencies = [ + "const-hex", + "dunce", + "heck", + "indexmap 2.1.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.48", + "syn-solidity 0.6.0", "tiny-keccak", ] @@ -213,8 +245,20 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a059d4d2c78f8f21e470772c75f9abd9ac6d48c2aaf6b278d1ead06ed9ac664" dependencies = [ - "alloy-primitives", - "alloy-sol-macro", + "alloy-primitives 0.5.4", + "alloy-sol-macro 0.5.4", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-sol-types" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "783eb720b73d38f9d4c1fb9890e4db6bc8c708f7aa77d3071a19e06091ecd1c9" +dependencies = [ + "alloy-primitives 0.6.0", + "alloy-sol-macro 0.6.0", "const-hex", "serde", ] @@ -245,9 +289,49 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.77" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" + +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec", + "ark-ff 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d19de80eff169429ac1e9f48fffb163916b448a44e8e046186232046d9e1f9" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff 0.4.2", + "ark-poly", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", +] [[package]] name = "ark-ff" @@ -332,6 +416,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", +] + [[package]] name = "ark-serialize" version = "0.3.0" @@ -348,11 +445,23 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ + "ark-serialize-derive", "ark-std 0.4.0", "digest 0.10.7", "num-bigint", ] +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-std" version = "0.3.0" @@ -379,6 +488,12 @@ version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" +[[package]] +name = "array-bytes" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f840fb7195bcfc5e17ea40c26e5ce6d5b9ce5d584466e17703209657e459ae0" + [[package]] name = "arrayref" version = "0.3.7" @@ -433,7 +548,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" dependencies = [ "concurrent-queue", - "event-listener 4.0.1", + "event-listener 4.0.3", "event-listener-strategy", "futures-core", "pin-project-lite", @@ -445,7 +560,7 @@ version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c2886ab563af5038f79ec016dd7b87947ed138b794e8dd64992962c9cca0411" dependencies = [ - "async-lock 3.2.0", + "async-lock 3.3.0", "futures-io", ] @@ -455,11 +570,11 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" dependencies = [ - "async-lock 3.2.0", + "async-lock 3.3.0", "async-task", "concurrent-queue", "fastrand 2.0.1", - "futures-lite 2.1.0", + "futures-lite 2.2.0", "slab", ] @@ -483,10 +598,10 @@ checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ "async-channel 2.1.1", "async-executor", - "async-io 2.2.2", - "async-lock 3.2.0", + "async-io 2.3.0", + "async-lock 3.3.0", "blocking", - "futures-lite 2.1.0", + "futures-lite 2.2.0", "once_cell", ] @@ -529,18 +644,18 @@ dependencies = [ [[package]] name = "async-io" -version = "2.2.2" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6afaa937395a620e33dc6a742c593c01aced20aa376ffb0f628121198578ccc7" +checksum = "fb41eb19024a91746eba0773aa5e16036045bbf45733766661099e182ea6a744" dependencies = [ - "async-lock 3.2.0", + "async-lock 3.3.0", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.1.0", + "futures-lite 2.2.0", "parking", - "polling 3.3.1", - "rustix 0.38.28", + "polling 3.3.2", + "rustix 0.38.30", "slab", "tracing", "windows-sys 0.52.0", @@ -557,11 +672,11 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ - "event-listener 4.0.1", + "event-listener 4.0.3", "event-listener-strategy", "pin-project-lite", ] @@ -590,7 +705,7 @@ dependencies = [ "cfg-if", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.28", + "rustix 0.38.30", "windows-sys 0.48.0", ] @@ -600,13 +715,13 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" dependencies = [ - "async-io 2.2.2", + "async-io 2.3.0", "async-lock 2.8.0", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.28", + "rustix 0.38.30", "signal-hook-registry", "slab", "windows-sys 0.48.0", @@ -640,19 +755,19 @@ dependencies = [ [[package]] name = "async-task" -version = "4.6.0" +version = "4.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d90cd0b264dfdd8eb5bad0a2c217c1f88fa96a8573f40e7b12de23fb468f46" +checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.75" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdf6721fb0140e4f897002dd086c06f6c27775df19cfe1fccb21181a48fd2c98" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -680,10 +795,10 @@ dependencies = [ ] [[package]] -name = "atomic" -version = "0.5.3" +name = "atomic-take" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" +checksum = "a8ab6b55fe97976e46f91ddbed8d147d966475dc29b2032757ba47e02376fbc3" [[package]] name = "atomic-waker" @@ -750,9 +865,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64-compat" @@ -806,6 +921,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes 0.11.0", + "rand 0.8.5", + "rand_core 0.6.4", + "serde", + "unicode-normalization", ] [[package]] @@ -872,9 +991,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "bitvec" @@ -964,11 +1083,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ "async-channel 2.1.1", - "async-lock 3.2.0", + "async-lock 3.3.0", "async-task", "fastrand 2.0.1", "futures-io", - "futures-lite 2.1.0", + "futures-lite 2.2.0", "piper", "tracing", ] @@ -1081,7 +1200,7 @@ checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", "cargo-platform", - "semver 1.0.20", + "semver 1.0.21", "serde", "serde_json", "thiserror", @@ -1114,19 +1233,6 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "chacha20poly1305" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" -dependencies = [ - "aead 0.5.2", - "chacha20", - "cipher 0.4.4", - "poly1305", - "zeroize", -] - [[package]] name = "chrono" version = "0.4.31" @@ -1159,7 +1265,6 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", - "zeroize", ] [[package]] @@ -1200,7 +1305,7 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "bech32 0.9.1", "bs58 0.5.0", "digest 0.10.7", @@ -1271,6 +1376,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +[[package]] +name = "constcat" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd7e35aee659887cbfb97aaf227ac12cad1a9d7c71e55ff3376839ed4e282d08" + [[package]] name = "containers-api" version = "0.9.0" @@ -1307,7 +1418,7 @@ version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03a5d7b21829bc7b4bf4754a978a241ae54ea55a40f92bb20216e54096f4b951" dependencies = [ - "aes-gcm 0.8.0", + "aes-gcm", "base64 0.13.1", "hkdf", "hmac 0.10.1", @@ -1345,9 +1456,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -1378,44 +1489,37 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.17" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e3681d554572a651dda4186cd47240627c3d0114d45a95f6ad27f2f22e7548d" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-queue" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc6598521bb5a83d491e8c1fe51db7296019d2ca3cb93cc6c2a20369a4d78a2" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.18" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crunchy" @@ -1458,9 +1562,9 @@ dependencies = [ [[package]] name = "crypto-mac" -version = "0.10.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" +checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" dependencies = [ "generic-array 0.14.7", "subtle", @@ -1468,9 +1572,9 @@ dependencies = [ [[package]] name = "crypto-mac" -version = "0.11.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" dependencies = [ "generic-array 0.14.7", "subtle", @@ -1529,6 +1633,7 @@ dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", + "digest 0.10.7", "fiat-crypto", "platforms", "rustc_version 0.4.0", @@ -1544,7 +1649,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -1605,7 +1710,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -1627,7 +1732,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core 0.20.3", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -1676,9 +1781,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", "serde", @@ -1891,6 +1996,16 @@ dependencies = [ "signature 1.6.4", ] +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature 2.2.0", +] + [[package]] name = "ed25519-dalek" version = "1.0.1" @@ -1898,13 +2013,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ "curve25519-dalek 3.2.0", - "ed25519", + "ed25519 1.5.3", "rand 0.7.3", "serde", "sha2 0.9.9", "zeroize", ] +[[package]] +name = "ed25519-dalek" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" +dependencies = [ + "curve25519-dalek 4.1.1", + "ed25519 2.2.3", + "serde", + "sha2 0.10.8", + "subtle", + "zeroize", +] + [[package]] name = "ed25519-zebra" version = "3.1.0" @@ -1919,6 +2048,21 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ed25519-zebra" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" +dependencies = [ + "curve25519-dalek 4.1.1", + "ed25519 2.2.3", + "hashbrown 0.14.3", + "hex 0.4.3", + "rand_core 0.6.4", + "sha2 0.10.8", + "zeroize", +] + [[package]] name = "either" version = "1.9.0" @@ -1969,7 +2113,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe81b5c06ecfdbc71dd845216f225f53b62a10cb8a16c946836a3467f701d05b" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "bytes", "hex 0.4.3", "k256", @@ -1995,9 +2139,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "erased-serde" -version = "0.3.31" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" +checksum = "55d05712b2d8d88102bc9868020c9e5c7a1f5527c452b9b97450a1d006140ba7" dependencies = [ "serde", ] @@ -2100,9 +2244,9 @@ dependencies = [ [[package]] name = "ethers-addressbook" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c405f24ea3a517899ba7985385c43dc4a7eb1209af3b1e0a1a32d7dcc7f8d09" +checksum = "9bf35eb7d2e2092ad41f584951e08ec7c077b142dba29c4f1b8f52d2efddc49c" dependencies = [ "ethers-core", "once_cell", @@ -2131,9 +2275,9 @@ dependencies = [ [[package]] name = "ethers-contract-abigen" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51258120c6b47ea9d9bec0d90f9e8af71c977fbefbef8213c91bfed385fe45eb" +checksum = "bbdfb952aafd385b31d316ed80d7b76215ce09743c172966d840e96924427e0c" dependencies = [ "Inflector", "const-hex", @@ -2148,16 +2292,16 @@ dependencies = [ "reqwest", "serde", "serde_json", - "syn 2.0.43", + "syn 2.0.48", "toml", "walkdir", ] [[package]] name = "ethers-contract-derive" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936e7a0f1197cee2b62dc89f63eff3201dbf87c283ff7e18d86d38f83b845483" +checksum = "7465c814a2ecd0de0442160da13584205d1cdc08f4717a6511cad455bd5d7dc4" dependencies = [ "Inflector", "const-hex", @@ -2166,14 +2310,14 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "ethers-core" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f03e0bdc216eeb9e355b90cf610ef6c5bb8aca631f97b5ae9980ce34ea7878d" +checksum = "918b1a9ba585ea61022647def2f27c29ba19f6d2a4a4c8f68a9ae97fd5769737" dependencies = [ "arrayvec 0.7.4", "bytes", @@ -2192,7 +2336,7 @@ dependencies = [ "serde", "serde_json", "strum 0.25.0", - "syn 2.0.43", + "syn 2.0.48", "tempfile", "thiserror", "tiny-keccak", @@ -2201,14 +2345,14 @@ dependencies = [ [[package]] name = "ethers-etherscan" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abbac2c890bdbe0f1b8e549a53b00e2c4c1de86bb077c1094d1f38cdf9381a56" +checksum = "facabf8551b4d1a3c08cb935e7fca187804b6c2525cc0dafb8e5a6dd453a24de" dependencies = [ "chrono", "ethers-core", "reqwest", - "semver 1.0.20", + "semver 1.0.21", "serde", "serde_json", "thiserror", @@ -2250,7 +2394,7 @@ checksum = "25d6c0c9455d93d4990c06e049abf9b30daf148cf461ee939c11d88907c60816" dependencies = [ "async-trait", "auto_impl", - "base64 0.21.5", + "base64 0.21.7", "bytes", "const-hex", "enr", @@ -2300,9 +2444,9 @@ dependencies = [ [[package]] name = "ethers-solc" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64f710586d147864cff66540a6d64518b9ff37d73ef827fee430538265b595f" +checksum = "cc2e46e3ec8ef0c986145901fa9864205dc4dcee701f9846be2d56112d34bdea" dependencies = [ "cfg-if", "const-hex", @@ -2317,7 +2461,7 @@ dependencies = [ "path-slash", "rayon", "regex", - "semver 1.0.20", + "semver 1.0.21", "serde", "serde_json", "solang-parser", @@ -2349,9 +2493,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "4.0.1" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f2cdcf274580f2d63697192d744727b3198894b1bf02923643bf59e2c26712" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" dependencies = [ "concurrent-queue", "parking", @@ -2364,7 +2508,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" dependencies = [ - "event-listener 4.0.1", + "event-listener 4.0.3", "pin-project-lite", ] @@ -2642,9 +2786,9 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" +checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" dependencies = [ "fastrand 2.0.1", "futures-core", @@ -2671,7 +2815,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -2756,9 +2900,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "js-sys", @@ -2768,23 +2912,22 @@ dependencies = [ ] [[package]] -name = "ghash" -version = "0.3.1" +name = "getrandom_or_panic" +version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" +checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" dependencies = [ - "opaque-debug 0.3.0", - "polyval 0.4.5", + "rand_core 0.6.4", ] [[package]] name = "ghash" -version = "0.5.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" dependencies = [ "opaque-debug 0.3.0", - "polyval 0.6.1", + "polyval", ] [[package]] @@ -2835,9 +2978,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.22" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -2882,7 +3025,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", ] [[package]] @@ -2891,6 +3034,8 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ + "ahash 0.8.7", + "allocator-api2", "serde", ] @@ -2911,9 +3056,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" [[package]] name = "hex" @@ -2959,7 +3104,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" dependencies = [ - "crypto-mac 0.10.1", + "crypto-mac 0.10.0", "digest 0.9.0", ] @@ -2969,7 +3114,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" dependencies = [ - "crypto-mac 0.11.1", + "crypto-mac 0.11.0", "digest 0.9.0", ] @@ -3109,10 +3254,10 @@ dependencies = [ "http", "hyper", "log", - "rustls", - "rustls-native-certs", + "rustls 0.21.10", + "rustls-native-certs 0.6.3", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", ] [[package]] @@ -3130,9 +3275,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -3282,12 +3427,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "intx" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f38a50a899dc47a6d0ed5508e7f601a2e34c3a85303514b5d137f3c10a0c75" - [[package]] name = "io-lifetimes" version = "1.0.11" @@ -3312,7 +3451,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" dependencies = [ "hermit-abi", - "rustix 0.38.28", + "rustix 0.38.30", "windows-sys 0.52.0", ] @@ -3351,9 +3490,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" dependencies = [ "wasm-bindgen", ] @@ -3378,11 +3517,22 @@ version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "affdc52f7596ccb2d7645231fc6163bb314630c989b64998f3699a28b4d5d4dc" dependencies = [ - "jsonrpsee-client-transport", - "jsonrpsee-core", + "jsonrpsee-client-transport 0.20.3", + "jsonrpsee-core 0.20.3", "jsonrpsee-http-client", + "jsonrpsee-types 0.20.3", +] + +[[package]] +name = "jsonrpsee" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9579d0ca9fb30da026bac2f0f7d9576ec93489aeb7cd4971dd5b4617d82c79b2" +dependencies = [ + "jsonrpsee-client-transport 0.21.0", + "jsonrpsee-core 0.21.0", "jsonrpsee-proc-macros", - "jsonrpsee-types", + "jsonrpsee-types 0.21.0", "jsonrpsee-ws-client", "tracing", ] @@ -3395,17 +3545,38 @@ checksum = "b5b005c793122d03217da09af68ba9383363caa950b90d3436106df8cabce935" dependencies = [ "futures-util", "http", - "jsonrpsee-core", + "jsonrpsee-core 0.20.3", + "pin-project", + "rustls-native-certs 0.6.3", + "soketto", + "thiserror", + "tokio", + "tokio-rustls 0.24.1", + "tokio-util", + "tracing", + "url", +] + +[[package]] +name = "jsonrpsee-client-transport" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9f9ed46590a8d5681975f126e22531698211b926129a40a2db47cbca429220" +dependencies = [ + "futures-util", + "http", + "jsonrpsee-core 0.21.0", "pin-project", - "rustls-native-certs", + "rustls-native-certs 0.7.0", + "rustls-pki-types", "soketto", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.25.0", "tokio-util", "tracing", "url", - "webpki-roots", + "webpki-roots 0.26.0", ] [[package]] @@ -3421,7 +3592,7 @@ dependencies = [ "futures-timer", "futures-util", "hyper", - "jsonrpsee-types", + "jsonrpsee-types 0.20.3", "rustc-hash", "serde", "serde_json", @@ -3431,33 +3602,56 @@ dependencies = [ ] [[package]] -name = "jsonrpsee-http-client" -version = "0.20.3" +name = "jsonrpsee-core" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20" +checksum = "776d009e2f591b78c038e0d053a796f94575d66ca4e77dd84bfc5e81419e436c" dependencies = [ + "anyhow", + "async-lock 3.3.0", "async-trait", - "hyper", - "hyper-rustls", - "jsonrpsee-core", - "jsonrpsee-types", + "beef", + "futures-timer", + "futures-util", + "jsonrpsee-types 0.21.0", + "pin-project", + "rustc-hash", "serde", "serde_json", "thiserror", "tokio", - "tower", + "tokio-stream", "tracing", - "url", ] [[package]] -name = "jsonrpsee-proc-macros" +name = "jsonrpsee-http-client" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29110019693a4fa2dbda04876499d098fa16d70eba06b1e6e2b3f1b251419515" +checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20" +dependencies = [ + "async-trait", + "hyper", + "hyper-rustls", + "jsonrpsee-core 0.20.3", + "jsonrpsee-types 0.20.3", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "tracing", + "url", +] + +[[package]] +name = "jsonrpsee-proc-macros" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d94b7505034e2737e688e1153bf81e6f93ad296695c43958d6da2e4321f0a990" dependencies = [ "heck", - "proc-macro-crate 1.3.1", + "proc-macro-crate 2.0.1", "proc-macro2", "quote", "syn 1.0.109", @@ -3477,16 +3671,29 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-types" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3266dfb045c9174b24c77c2dfe0084914bb23a6b2597d70c9dc6018392e1cd1b" +dependencies = [ + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "jsonrpsee-ws-client" -version = "0.20.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca9cb3933ccae417eb6b08c3448eb1cb46e39834e5b503e395e5e5bd08546c0" +checksum = "073c077471e89c4b511fa88b3df9a0f0abdf4a0a2e6683dd2ab36893af87bb2d" dependencies = [ "http", - "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-client-transport 0.21.0", + "jsonrpsee-core 0.21.0", + "jsonrpsee-types 0.21.0", "url", ] @@ -3496,7 +3703,7 @@ version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "pem", "ring 0.16.20", "serde", @@ -3506,9 +3713,9 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if", "ecdsa", @@ -3520,9 +3727,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] @@ -3595,9 +3802,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.151" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "libm" @@ -3611,7 +3818,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "libc", "redox_syscall", ] @@ -3678,9 +3885,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" @@ -3704,9 +3911,12 @@ dependencies = [ [[package]] name = "lru" -version = "0.10.1" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" +checksum = "2994eeba8ed550fd9b47a0b38f0242bc3344e496483c6180b69139cc2fa5d1d7" +dependencies = [ + "hashbrown 0.14.3", +] [[package]] name = "mach" @@ -3748,7 +3958,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.28", + "rustix 0.38.30", ] [[package]] @@ -4006,23 +4216,23 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683751d591e6d81200c39fb0d1032608b77724f34114db54f571ff1317b337c0" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ "proc-macro-crate 2.0.1", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -4104,7 +4314,7 @@ version = "0.10.62" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "cfg-if", "foreign-types", "libc", @@ -4121,7 +4331,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -4245,7 +4455,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ - "crypto-mac 0.11.1", + "crypto-mac 0.11.0", ] [[package]] @@ -4296,9 +4506,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" +checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06" dependencies = [ "memchr", "thiserror", @@ -4355,7 +4565,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -4364,7 +4574,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" dependencies = [ - "siphasher", + "siphasher 0.3.11", ] [[package]] @@ -4373,7 +4583,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ - "siphasher", + "siphasher 0.3.11", ] [[package]] @@ -4393,7 +4603,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -4431,9 +4641,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "platforms" @@ -4459,14 +4669,14 @@ dependencies = [ [[package]] name = "polling" -version = "3.3.1" +version = "3.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" +checksum = "545c980a3880efd47b2e262f6a4bb6daad6555cf3367aa9c4e52895f69537a41" dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite", - "rustix 0.38.28", + "rustix 0.38.30", "tracing", "windows-sys 0.52.0", ] @@ -4490,19 +4700,7 @@ checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd" dependencies = [ "cpuid-bool", "opaque-debug 0.3.0", - "universal-hash 0.4.1", -] - -[[package]] -name = "polyval" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" -dependencies = [ - "cfg-if", - "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash 0.5.1", + "universal-hash 0.4.0", ] [[package]] @@ -4525,12 +4723,12 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "prettyplease" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ "proc-macro2", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -4609,9 +4807,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.71" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8" +checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" dependencies = [ "unicode-ident", ] @@ -4624,7 +4822,7 @@ checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.4.1", + "bitflags 2.4.2", "lazy_static", "num-traits", "rand 0.8.5", @@ -4653,9 +4851,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -4725,7 +4923,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", ] [[package]] @@ -4748,9 +4946,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" dependencies = [ "either", "rayon-core", @@ -4758,9 +4956,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -4781,29 +4979,29 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "libredox", "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53313ec9f12686aeeffb43462c3ac77aa25f590a5f630eb2cde0de59417b29c7" +checksum = "c4846d4c50d1721b1a3bef8af76924eef20d5e723647333798c1b519b3a9473f" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2566c4bf6845f2c2e83b27043c3f5dfcd5ba8f2937d6c00dc009bfb51a079dc4" +checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -4862,7 +5060,7 @@ version = "0.11.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", @@ -4879,20 +5077,20 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", - "rustls-pemfile", + "rustls 0.21.10", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", "system-configuration", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", + "webpki-roots 0.25.3", "winreg", ] @@ -4928,7 +5126,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", - "getrandom 0.2.11", + "getrandom 0.2.12", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -4976,7 +5174,7 @@ dependencies = [ "dirs-next", "fraction", "futures", - "getrandom 0.2.11", + "getrandom 0.2.12", "hex 0.4.3", "js-sys", "log", @@ -5063,7 +5261,7 @@ dependencies = [ "blake2-rfc", "bs58 0.5.0", "ecdsa", - "ed25519-dalek", + "ed25519-dalek 1.0.1", "ethers", "hex 0.4.3", "hmac 0.12.1", @@ -5075,7 +5273,7 @@ dependencies = [ "schnorrkel 0.10.2", "sha2 0.10.8", "sha3", - "sp-core", + "sp-core 21.0.0", "ss58-registry", "substrate-bip39", "thiserror", @@ -5089,7 +5287,7 @@ dependencies = [ "dirs", "docker-api", "futures", - "getrandom 0.2.11", + "getrandom 0.2.12", "hex 0.4.3", "log", "nanoid", @@ -5110,7 +5308,7 @@ dependencies = [ "dashmap", "ethers", "futures-util", - "jsonrpsee", + "jsonrpsee 0.21.0", "pin-project", "serde", "serde_json", @@ -5129,7 +5327,7 @@ dependencies = [ "futures-timer", "futures-util", "hex 0.4.3", - "jsonrpsee", + "jsonrpsee 0.21.0", "log", "nanoid", "pin-project", @@ -5148,8 +5346,8 @@ dependencies = [ name = "rosetta-server-astar" version = "0.5.0" dependencies = [ - "alloy-primitives", - "alloy-sol-types", + "alloy-primitives 0.6.0", + "alloy-sol-types 0.6.0", "anyhow", "async-trait", "ethers", @@ -5168,7 +5366,6 @@ dependencies = [ "serde", "serde_json", "sha3", - "sp-core", "sp-keyring", "subxt", "tokio", @@ -5194,8 +5391,8 @@ dependencies = [ name = "rosetta-server-ethereum" version = "0.5.0" dependencies = [ - "alloy-primitives", - "alloy-sol-types", + "alloy-primitives 0.5.4", + "alloy-sol-types 0.5.4", "anyhow", "async-trait", "ethabi", @@ -5357,7 +5554,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.20", + "semver 1.0.21", ] [[package]] @@ -5390,14 +5587,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "errno", "libc", - "linux-raw-sys 0.4.12", + "linux-raw-sys 0.4.13", "windows-sys 0.52.0", ] @@ -5409,10 +5606,24 @@ checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", "ring 0.17.7", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" +dependencies = [ + "log", + "ring 0.17.7", + "rustls-pki-types", + "rustls-webpki 0.102.1", + "subtle", + "zeroize", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -5420,7 +5631,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 1.0.4", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-native-certs" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" +dependencies = [ + "openssl-probe", + "rustls-pemfile 2.0.0", + "rustls-pki-types", "schannel", "security-framework", ] @@ -5431,9 +5655,25 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", +] + +[[package]] +name = "rustls-pemfile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35e4980fa29e4c4b212ffb3db068a564cbf560e51d3944b7c88bd8bf5bec64f4" +dependencies = [ + "base64 0.21.7", + "rustls-pki-types", ] +[[package]] +name = "rustls-pki-types" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9d979b3ce68192e42760c7810125eb6cf2ea10efae545a156063e61f314e2a" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -5444,6 +5684,17 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "rustls-webpki" +version = "0.102.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef4ca26037c909dedb327b48c3327d0ba91d3dd3c4e05dad328f210ffb68e95b" +dependencies = [ + "ring 0.17.7", + "rustls-pki-types", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -5464,12 +5715,12 @@ dependencies = [ [[package]] name = "ruzstd" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3ffab8f9715a0d455df4bbb9d21e91135aab3cd3ca187af0cd0c3c3f868fdc" +checksum = "58c4eb8a81997cf040a091d1f7e1938aeab6749d3a0dfa73af43cdc32393483d" dependencies = [ "byteorder", - "thiserror-core", + "derive_more", "twox-hash", ] @@ -5532,9 +5783,9 @@ dependencies = [ [[package]] name = "scale-decode" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7789f5728e4e954aaa20cadcc370b99096fb8645fca3c9333ace44bb18f30095" +checksum = "7caaf753f8ed1ab4752c6afb20174f03598c664724e0e32628e161c21000ff76" dependencies = [ "derive_more", "parity-scale-codec", @@ -5547,9 +5798,9 @@ dependencies = [ [[package]] name = "scale-decode-derive" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27873eb6005868f8cc72dcfe109fae664cf51223d35387bc2f28be4c28d94c47" +checksum = "d3475108a1b62c7efd1b5c65974f30109a598b2f45f23c9ae030acb9686966db" dependencies = [ "darling 0.14.4", "proc-macro-crate 1.3.1", @@ -5614,9 +5865,9 @@ dependencies = [ [[package]] name = "scale-value" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6538d1cc1af9c0baf401c57da8a6d4730ef582db0d330d2efa56ec946b5b0283" +checksum = "58223c7691bf0bd46b43c9aea6f0472d1067f378d574180232358d7c6e0a8089" dependencies = [ "base58", "blake2", @@ -5647,7 +5898,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "cfg-if", "hashbrown 0.13.2", ] @@ -5687,6 +5938,25 @@ dependencies = [ "zeroize", ] +[[package]] +name = "schnorrkel" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" +dependencies = [ + "aead 0.5.2", + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek 4.1.1", + "getrandom_or_panic", + "merlin 3.0.0", + "rand_core 0.6.4", + "serde_bytes", + "sha2 0.10.8", + "subtle", + "zeroize", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -5808,9 +6078,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" dependencies = [ "serde", ] @@ -5844,31 +6114,31 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.193" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.13" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb1879ea93538b78549031e2d54da3e901fd7e75f2e4dc758d760937b123d10" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -5882,9 +6152,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ "itoa", "ryu", @@ -5948,7 +6218,7 @@ dependencies = [ "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -6098,6 +6368,12 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "siphasher" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54ac45299ccbd390721be55b412d41931911f654fa99e2cb8bfb57184b2061fe" + [[package]] name = "slab" version = "0.4.9" @@ -6109,9 +6385,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" [[package]] name = "smol" @@ -6132,29 +6408,31 @@ dependencies = [ [[package]] name = "smoldot" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cce5e2881b30bad7ef89f383a816ad0b22c45915911f28499026de4a76d20ee" +checksum = "eca99148e026936bbc444c3708748207033968e4ef1c33bfc885660ae4d44d21" dependencies = [ "arrayvec 0.7.4", - "async-lock 2.8.0", - "atomic", - "base64 0.21.5", + "async-lock 3.3.0", + "atomic-take", + "base64 0.21.7", "bip39", "blake2-rfc", "bs58 0.5.0", + "chacha20", "crossbeam-queue", "derive_more", - "ed25519-zebra", + "ed25519-zebra 4.0.3", "either", - "event-listener 2.5.3", + "event-listener 3.1.0", "fnv", - "futures-channel", + "futures-lite 2.2.0", "futures-util", "hashbrown 0.14.3", "hex 0.4.3", "hmac 0.12.1", - "itertools 0.10.5", + "itertools 0.11.0", + "libm", "libsecp256k1", "merlin 3.0.0", "no-std-net", @@ -6164,67 +6442,59 @@ dependencies = [ "num-traits", "pbkdf2 0.12.2", "pin-project", + "poly1305", "rand 0.8.5", "rand_chacha 0.3.1", "ruzstd", - "schnorrkel 0.10.2", + "schnorrkel 0.11.4", "serde", "serde_json", "sha2 0.10.8", - "siphasher", + "sha3", + "siphasher 1.0.0", "slab", "smallvec", - "smol", - "snow", "soketto", - "tiny-keccak", "twox-hash", "wasmi", + "x25519-dalek", + "zeroize", ] [[package]] name = "smoldot-light" -version = "0.6.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2f7b4687b83ff244ef6137735ed5716ad37dcdf3ee16c4eb1a32fb9808fa47" +checksum = "0e6f1898682b618b81570047b9d870b3faaff6ae1891b468eddd94d7f903c2fe" dependencies = [ - "async-lock 2.8.0", + "async-channel 2.1.1", + "async-lock 3.3.0", + "base64 0.21.7", "blake2-rfc", "derive_more", "either", - "event-listener 2.5.3", + "event-listener 3.1.0", "fnv", "futures-channel", + "futures-lite 2.2.0", "futures-util", "hashbrown 0.14.3", "hex 0.4.3", - "itertools 0.10.5", + "itertools 0.11.0", "log", "lru", + "no-std-net", "parking_lot", + "pin-project", "rand 0.8.5", + "rand_chacha 0.3.1", "serde", "serde_json", - "siphasher", + "siphasher 1.0.0", "slab", "smol", "smoldot", -] - -[[package]] -name = "snow" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" -dependencies = [ - "aes-gcm 0.10.3", - "blake2", - "chacha20poly1305", - "curve25519-dalek 4.1.1", - "rand_core 0.6.4", - "rustc_version 0.4.0", - "sha2 0.10.8", - "subtle", + "zeroize", ] [[package]] @@ -6278,30 +6548,30 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "23.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899492ea547816d5dfe9a5a2ecc32f65a7110805af6da3380aa4902371b31dc2" +checksum = "23030de8eae0272c705cf3e2ce0523a64708a6b53aa23f3cf9053ca63abd08d7" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", + "sp-core 26.0.0", "sp-io", - "sp-std", + "sp-std 12.0.0", ] [[package]] name = "sp-arithmetic" -version = "16.0.0" +version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6020576e544c6824a51d651bc8df8e6ab67cd59f1c9ac09868bb81a5199ded" +checksum = "b9cf6e5c0c7c2e7be3a4a10af5316d2d40182915509a70f632a66c238a05c37b" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 12.0.0", "static_assertions", ] @@ -6311,13 +6581,13 @@ version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f18d9e2f67d8661f9729f35347069ac29d92758b59135176799db966947a7336" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "bitflags 1.3.2", "blake2", "bounded-collections", "bs58 0.4.0", "dyn-clonable", - "ed25519-zebra", + "ed25519-zebra 3.1.0", "futures", "hash-db", "hash256-std-hasher", @@ -6337,12 +6607,12 @@ dependencies = [ "secp256k1", "secrecy", "serde", - "sp-core-hashing", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-core-hashing 9.0.0", + "sp-debug-derive 8.0.0", + "sp-externalities 0.19.0", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", "ss58-registry", "substrate-bip39", "thiserror", @@ -6350,6 +6620,54 @@ dependencies = [ "zeroize", ] +[[package]] +name = "sp-core" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0db34a19be2efa0398a9506a365392d93a85220856d55e0eb78165ad2e1bedc" +dependencies = [ + "array-bytes 6.2.2", + "bip39", + "bitflags 1.3.2", + "blake2", + "bounded-collections", + "bs58 0.5.0", + "dyn-clonable", + "ed25519-zebra 3.1.0", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "itertools 0.10.5", + "lazy_static", + "libsecp256k1", + "log", + "merlin 2.0.1", + "parity-scale-codec", + "parking_lot", + "paste", + "primitive-types", + "rand 0.8.5", + "regex", + "scale-info", + "schnorrkel 0.9.1", + "secp256k1", + "secrecy", + "serde", + "sp-core-hashing 13.0.0", + "sp-debug-derive 12.0.0", + "sp-externalities 0.23.0", + "sp-runtime-interface 22.0.0", + "sp-std 12.0.0", + "sp-storage 17.0.0", + "ss58-registry", + "substrate-bip39", + "thiserror", + "tracing", + "w3f-bls", + "zeroize", +] + [[package]] name = "sp-core-hashing" version = "9.0.0" @@ -6361,7 +6679,21 @@ dependencies = [ "digest 0.10.7", "sha2 0.10.8", "sha3", - "sp-std", + "sp-std 8.0.0", + "twox-hash", +] + +[[package]] +name = "sp-core-hashing" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb8524f01591ee58b46cd83c9dbc0fcffd2fd730dabec4f59326cd58a00f17e2" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.8", + "sha3", "twox-hash", ] @@ -6373,7 +6705,18 @@ checksum = "c7f531814d2f16995144c74428830ccf7d94ff4a7749632b83ad8199b181140c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", +] + +[[package]] +name = "sp-debug-derive" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50535e1a5708d3ba5c1195b59ebefac61cc8679c2c24716b87a86e8b7ed2e4a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", ] [[package]] @@ -6384,32 +6727,42 @@ checksum = "a0f71c671e01a8ca60da925d43a1b351b69626e268b8837f8371e320cf1dd100" dependencies = [ "environmental", "parity-scale-codec", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", +] + +[[package]] +name = "sp-externalities" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884d05160bc89d0943d1c9fb8006c3d44b80f37f8af607aeff8d4d9cc82e279a" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 12.0.0", + "sp-storage 17.0.0", ] [[package]] name = "sp-io" -version = "23.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d597e35a9628fe7454b08965b2442e3ec0f264b0a90d41328e87422cec02e99" +checksum = "301c0ce94f80b324465a6f6173183aa07b26bd71d67f94a44de1fd11dea4a7cb" dependencies = [ "bytes", - "ed25519", - "ed25519-dalek", - "futures", + "ed25519-dalek 2.1.0", "libsecp256k1", "log", "parity-scale-codec", "rustversion", "secp256k1", - "sp-core", - "sp-externalities", + "sp-core 26.0.0", + "sp-externalities 0.23.0", "sp-keystore", - "sp-runtime-interface", + "sp-runtime-interface 22.0.0", "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-std 12.0.0", + "sp-tracing 14.0.0", "sp-trie", "tracing", "tracing-core", @@ -6417,35 +6770,34 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "24.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4673405248580504a8bc4e09615ab25ccb182dfaccd27e000fda9dcb2ca1dab1" +checksum = "674ebf2c64039465e8d55d4d92cb079d2214932a4d101473e1fbded29e5488cc" dependencies = [ "lazy_static", - "sp-core", + "sp-core 26.0.0", "sp-runtime", "strum 0.24.1", ] [[package]] name = "sp-keystore" -version = "0.27.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be3cdd67cc1d9c1db17c5cbc4ec4924054a8437009d167f21f6590797e4aa45" +checksum = "1db18ab01b2684856904c973d2be7dbf9ab3607cf706a7bd6648812662e5e7c5" dependencies = [ - "futures", "parity-scale-codec", "parking_lot", - "sp-core", - "sp-externalities", + "sp-core 26.0.0", + "sp-externalities 0.23.0", "thiserror", ] [[package]] name = "sp-panic-handler" -version = "8.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd2de46003fa8212426838ca71cd42ee36a26480ba9ffea983506ce03131033" +checksum = "b00e40857ed3e0187f145b037c733545c5633859f1bd1d1b09deb52805fa696a" dependencies = [ "backtrace", "lazy_static", @@ -6454,9 +6806,9 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "24.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21c5bfc764a1a8259d7e8f7cfd22c84006275a512c958d3ff966c92151e134d5" +checksum = "082bae4a164b8b629ce9cee79ff3c6b20e66d11d8ef37398796567d616325da4" dependencies = [ "either", "hash256-std-hasher", @@ -6469,9 +6821,9 @@ dependencies = [ "serde", "sp-application-crypto", "sp-arithmetic", - "sp-core", + "sp-core 26.0.0", "sp-io", - "sp-std", + "sp-std 12.0.0", "sp-weights", ] @@ -6485,12 +6837,31 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities", - "sp-runtime-interface-proc-macro", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "sp-externalities 0.19.0", + "sp-runtime-interface-proc-macro 11.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-tracing 10.0.0", + "sp-wasm-interface 14.0.0", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "695bba5d981a6fd3131b098d65f620601bd822501612bfb65897d4bb660762b1" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.23.0", + "sp-runtime-interface-proc-macro 15.0.0", + "sp-std 12.0.0", + "sp-storage 17.0.0", + "sp-tracing 14.0.0", + "sp-wasm-interface 18.0.0", "static_assertions", ] @@ -6504,14 +6875,27 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2afcbd1bd18d323371111b66b7ac2870bdc1c86c3d7b0dae67b112ca52b4d8" +dependencies = [ + "Inflector", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 2.0.48", ] [[package]] name = "sp-state-machine" -version = "0.28.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ef45d31f9e7ac648f8899a0cd038a3608f8499028bff55b6c799702592325b6" +checksum = "df7c6680d9342c22c10d8272ebf9f0339b0e439b3e67b68f5627f9dfc6926a07" dependencies = [ "hash-db", "log", @@ -6519,13 +6903,14 @@ dependencies = [ "parking_lot", "rand 0.8.5", "smallvec", - "sp-core", - "sp-externalities", + "sp-core 26.0.0", + "sp-externalities 0.23.0", "sp-panic-handler", - "sp-std", + "sp-std 12.0.0", "sp-trie", "thiserror", "tracing", + "trie-db", ] [[package]] @@ -6534,6 +6919,12 @@ version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53458e3c57df53698b3401ec0934bea8e8cfce034816873c0b0abbd83d7bac0d" +[[package]] +name = "sp-std" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54c78c5a66682568cc7b153603c5d01a2cc8f5c221c7b1e921517a0eef18ae05" + [[package]] name = "sp-storage" version = "13.0.0" @@ -6544,8 +6935,22 @@ dependencies = [ "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 8.0.0", + "sp-std 8.0.0", +] + +[[package]] +name = "sp-storage" +version = "17.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016f20812cc51bd479cc88d048c35d44cd3adde4accdb159d49d6050f2953595" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 12.0.0", + "sp-std 12.0.0", ] [[package]] @@ -6555,7 +6960,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357f7591980dd58305956d32f8f6646d0a8ea9ea0e7e868e46f53b68ddf00cec" dependencies = [ "parity-scale-codec", - "sp-std", + "sp-std 8.0.0", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-tracing" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d727cb5265641ffbb7d4e42c18b63e29f6cfdbd240aae3bcf093c3d6eb29a19" +dependencies = [ + "parity-scale-codec", + "sp-std 12.0.0", "tracing", "tracing-core", "tracing-subscriber", @@ -6563,11 +6981,11 @@ dependencies = [ [[package]] name = "sp-trie" -version = "22.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4eeb7ef23f79eba8609db79ef9cef242f994f1f87a3c0387b4b5f177fda74" +checksum = "a9c4bf89a5bd74f696cd1f23d83bb6abe6bd0abad1f3c70d4b0d7ebec4098cfe" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "hash-db", "hashbrown 0.13.2", "lazy_static", @@ -6575,10 +6993,11 @@ dependencies = [ "nohash-hasher", "parity-scale-codec", "parking_lot", + "rand 0.8.5", "scale-info", "schnellru", - "sp-core", - "sp-std", + "sp-core 26.0.0", + "sp-std 12.0.0", "thiserror", "tracing", "trie-db", @@ -6595,24 +7014,38 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std", + "sp-std 8.0.0", + "wasmtime", +] + +[[package]] +name = "sp-wasm-interface" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5d85813d46a22484cdf5e5afddbbe85442dd1b4d84d67a8c7792f92f9f93607" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 12.0.0", "wasmtime", ] [[package]] name = "sp-weights" -version = "20.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d084c735544f70625b821c3acdbc7a2fc1893ca98b85f1942631284692c75b" +checksum = "1689f9594c2c4d09ede3d8a991a9eb900654e424fb00b62f2b370170af347acd" dependencies = [ "parity-scale-codec", "scale-info", "serde", "smallvec", "sp-arithmetic", - "sp-core", - "sp-debug-derive", - "sp-std", + "sp-core 26.0.0", + "sp-debug-derive 12.0.0", + "sp-std 12.0.0", ] [[package]] @@ -6639,9 +7072,9 @@ dependencies = [ [[package]] name = "ss58-registry" -version = "1.44.0" +version = "1.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35935738370302d5e33963665b77541e4b990a3e919ec904c837a56cfc891de1" +checksum = "3c0c74081753a8ce1c8eb10b9f262ab6f7017e5ad3317c17a54c7ab65fcb3c6e" dependencies = [ "Inflector", "num-format", @@ -6782,7 +7215,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -6800,9 +7233,9 @@ dependencies = [ [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "subtle-ng" @@ -6812,9 +7245,9 @@ checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" [[package]] name = "subxt" -version = "0.32.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "588b8ce92699eeb06290f4fb02dad4f7e426c4e6db4d53889c6bcbc808cf24ac" +checksum = "f7cf683962113b84ce5226bdf6f27d7f92a7e5bb408a5231f6c205407fbb20df" dependencies = [ "async-trait", "base58", @@ -6825,7 +7258,7 @@ dependencies = [ "futures", "hex 0.4.3", "impl-serde", - "jsonrpsee", + "jsonrpsee 0.20.3", "parity-scale-codec", "primitive-types", "scale-bits", @@ -6835,8 +7268,8 @@ dependencies = [ "scale-value", "serde", "serde_json", - "sp-core", - "sp-core-hashing", + "sp-core 26.0.0", + "sp-core-hashing 13.0.0", "sp-runtime", "subxt-lightclient", "subxt-macro", @@ -6847,29 +7280,29 @@ dependencies = [ [[package]] name = "subxt-codegen" -version = "0.32.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98f5a534c8d475919e9c845d51fc2316da4fcadd04fe17552d932d2106de930e" +checksum = "12800ad6128b4bfc93d2af89b7d368bff7ea2f6604add35f96f6a8c06c7f9abf" dependencies = [ "frame-metadata 16.0.0", "heck", "hex 0.4.3", - "jsonrpsee", + "jsonrpsee 0.20.3", "parity-scale-codec", "proc-macro2", "quote", "scale-info", "subxt-metadata", - "syn 2.0.43", + "syn 2.0.48", "thiserror", "tokio", ] [[package]] name = "subxt-lightclient" -version = "0.32.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10fd0ac9b091211f962b6ae19e26cd08e0b86efa064dfb7fac69c8f79f122329" +checksum = "243765099b60d97dc7fc80456ab951758a07ed0decb5c09283783f06ca04fc69" dependencies = [ "futures", "futures-util", @@ -6884,26 +7317,27 @@ dependencies = [ [[package]] name = "subxt-macro" -version = "0.32.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12e8be9ab6fe88b8c13edbe15911e148482cfb905a8b8d5b8d766a64c54be0bd" +checksum = "d5086ce2a90e723083ff19b77f06805d00e732eac3e19c86f6cd643d4255d334" dependencies = [ "darling 0.20.3", + "parity-scale-codec", "proc-macro-error", "subxt-codegen", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "subxt-metadata" -version = "0.32.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6898275765d36a37e5ef564358e0341cf41b5f3a91683d7d8b859381b65ac8a" +checksum = "19dc60f779bcab44084053e12d4ad5ac18ee217dbe8e26c919e7086fc0228d30" dependencies = [ "frame-metadata 16.0.0", "parity-scale-codec", "scale-info", - "sp-core-hashing", + "sp-core-hashing 13.0.0", "thiserror", ] @@ -6917,7 +7351,7 @@ dependencies = [ "async-trait", "cfg-if", "futures-util", - "getrandom 0.2.11", + "getrandom 0.2.12", "http-client", "http-types", "log", @@ -6930,15 +7364,15 @@ dependencies = [ [[package]] name = "sval" -version = "2.10.2" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15df12a8db7c216a04b4b438f90d50d5335cd38f161b56389c9f5c9d96d0873" +checksum = "1604e9ab506f4805bc62d2868c6d20f23fa6ced4c7cfe695a1d20589ba5c63d0" [[package]] name = "sval_buffer" -version = "2.10.2" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e80556bc8acea0446e574ce542ad6114a76a0237f28a842bc01ca3ea98f479" +checksum = "2831b6451148d344f612016d4277348f7721b78a0869a145fd34ef8b06b3fa2e" dependencies = [ "sval", "sval_ref", @@ -6946,18 +7380,18 @@ dependencies = [ [[package]] name = "sval_dynamic" -version = "2.10.2" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d93d2259edb1d7b4316179f0a98c62e3ffc726f47ab200e07cfe382771f57b8" +checksum = "238ac5832a23099a413ffd22e66f7e6248b9af4581b64c758ca591074be059fc" dependencies = [ "sval", ] [[package]] name = "sval_fmt" -version = "2.10.2" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532f7f882226f7a5a4656f5151224aaebf8217e0d539cb1595b831bace921343" +checksum = "c8474862431bac5ac7aee8a12597798e944df33f489c340e17e886767bda0c4e" dependencies = [ "itoa", "ryu", @@ -6966,34 +7400,44 @@ dependencies = [ [[package]] name = "sval_json" -version = "2.10.2" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76e03bd8aa0ae6ee018f7ae95c9714577687a4415bd1a5f19b26e34695f7e072" +checksum = "d8f348030cc3d2a11eb534145600601f080cf16bf9ec0783efecd2883f14c21e" dependencies = [ "itoa", "ryu", "sval", ] +[[package]] +name = "sval_nested" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6659c3f6be1e5e99dc7c518877f48a8a39088ace2504b046db789bd78ce5969d" +dependencies = [ + "sval", + "sval_buffer", + "sval_ref", +] + [[package]] name = "sval_ref" -version = "2.10.2" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ed054f2fb8c2a0ab5d36c1ec57b412919700099fc5e32ad8e7a38b23e1a9e1" +checksum = "829ad319bd82d0da77be6f3d547623686c453502f8eebdeb466cfa987972bd28" dependencies = [ "sval", ] [[package]] name = "sval_serde" -version = "2.10.2" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff191c4ff05b67e3844c161021427646cde5d6624597958be158357d9200586" +checksum = "1a9da6c3efaedf8b8c0861ec5343e8e8c51d838f326478623328bd8728b79bca" dependencies = [ "serde", "sval", - "sval_buffer", - "sval_fmt", + "sval_nested", ] [[package]] @@ -7007,7 +7451,7 @@ dependencies = [ "hex 0.4.3", "once_cell", "reqwest", - "semver 1.0.20", + "semver 1.0.21", "serde", "serde_json", "sha2 0.10.8", @@ -7029,9 +7473,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.43" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee659fb5f3d355364e1f3e5bc10fb82068efbf824a1e9d1c9504244a6469ad53" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -7047,7 +7491,19 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", +] + +[[package]] +name = "syn-solidity" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cfbd642e1748fd9e47951973abfa78f825b11fbf68af9e6b9db4c983a770166" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.48", ] [[package]] @@ -7090,9 +7546,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.12" +version = "0.12.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" +checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" [[package]] name = "tempfile" @@ -7103,7 +7559,7 @@ dependencies = [ "cfg-if", "fastrand 2.0.1", "redox_syscall", - "rustix 0.38.28", + "rustix 0.38.30", "windows-sys 0.52.0", ] @@ -7120,42 +7576,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.52" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a48fd946b02c0a526b2e9481c8e2a17755e47039164a86c4070446e3a4614d" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] -[[package]] -name = "thiserror-core" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c001ee18b7e5e3f62cbf58c7fe220119e68d902bb7443179c0c8aef30090e999" -dependencies = [ - "thiserror-core-impl", -] - -[[package]] -name = "thiserror-core-impl" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.43", -] - [[package]] name = "thiserror-impl" -version = "1.0.52" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7fbe9b594d6568a6a1443250a7e67d80b74e1e96f6d1715e1e21cc1888291d3" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -7307,7 +7743,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -7337,7 +7773,18 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.10", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.2", + "rustls-pki-types", "tokio", ] @@ -7361,12 +7808,12 @@ dependencies = [ "futures-util", "log", "native-tls", - "rustls", + "rustls 0.21.10", "tokio", "tokio-native-tls", - "tokio-rustls", + "tokio-rustls 0.24.1", "tungstenite", - "webpki-roots", + "webpki-roots 0.25.3", ] [[package]] @@ -7476,7 +7923,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -7544,9 +7991,9 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" +checksum = "ff28e0f815c2fea41ebddf148e008b077d2faddb026c9555b29696114d602642" dependencies = [ "hash-db", "hashbrown 0.13.2", @@ -7584,7 +8031,7 @@ dependencies = [ "log", "native-tls", "rand 0.8.5", - "rustls", + "rustls 0.21.10", "sha1 0.10.6", "thiserror", "url", @@ -7644,9 +8091,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -7671,9 +8118,9 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "universal-hash" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" dependencies = [ "generic-array 0.14.7", "subtle", @@ -7725,7 +8172,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "serde", ] @@ -7737,9 +8184,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.4.2" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a72e1902dde2bd6441347de2b70b7f5d59bf157c6c62f0c44572607a1d55bbe" +checksum = "7cdbaf5e132e593e9fc1de6a15bbec912395b11fb9719e061cf64f804524c503" dependencies = [ "value-bag-serde1", "value-bag-sval2", @@ -7747,9 +8194,9 @@ dependencies = [ [[package]] name = "value-bag-serde1" -version = "1.4.2" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ba39dc791ecb35baad371a3fc04c6eab688c04937d2e0ac6c22b612c0357bf" +checksum = "92cad98b1b18d06b6f38b3cd04347a9d7a3a0111441a061f71377fb6740437e4" dependencies = [ "erased-serde", "serde", @@ -7758,9 +8205,9 @@ dependencies = [ [[package]] name = "value-bag-sval2" -version = "1.4.2" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e06c10810a57bbf45778d023d432a50a1daa7d185991ae06bcfb6c654d0945" +checksum = "3dc7271d6b3bf58dd2e610a601c0e159f271ffdb7fbb21517c40b52138d64f8e" dependencies = [ "sval", "sval_buffer", @@ -7779,11 +8226,12 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vergen" -version = "8.2.6" +version = "8.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1290fd64cc4e7d3c9b07d7f333ce0ce0007253e32870e632624835cc80b83939" +checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525" dependencies = [ "anyhow", + "cfg-if", "rustversion", "time 0.3.31", ] @@ -7800,6 +8248,30 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "w3f-bls" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7335e4c132c28cc43caef6adb339789e599e39adbe78da0c4d547fad48cbc331" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381", + "ark-ec", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-serialize-derive", + "arrayref", + "constcat", + "digest 0.10.7", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sha2 0.10.8", + "sha3", + "thiserror", + "zeroize", +] + [[package]] name = "wait-timeout" version = "0.2.0" @@ -7848,9 +8320,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ "cfg-if", "serde", @@ -7860,24 +8332,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.39" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" dependencies = [ "cfg-if", "js-sys", @@ -7887,9 +8359,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -7897,30 +8369,29 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] name = "wasmi" -version = "0.30.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51fb5c61993e71158abf5bb863df2674ca3ec39ed6471c64f07aeaf751d67b4" +checksum = "acfc1e384a36ca532d070a315925887247f3c7e23567e23e0ac9b1c5d6b8bf76" dependencies = [ - "intx", "smallvec", "spin 0.9.8", "wasmi_arena", @@ -7936,9 +8407,9 @@ checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468" [[package]] name = "wasmi_core" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624e6333e861ef49095d2d678b76ebf30b06bf37effca845be7e5b87c90071b7" +checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a" dependencies = [ "downcast-rs", "libm", @@ -8099,9 +8570,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" dependencies = [ "js-sys", "wasm-bindgen", @@ -8113,6 +8584,15 @@ version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" +[[package]] +name = "webpki-roots" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de2cfda980f21be5a7ed2eadb3e6fe074d56022bea2cdeb1a62eb220fc04188" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "winapi" version = "0.3.9" @@ -8146,11 +8626,11 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.51.1" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.48.5", + "windows-targets 0.52.0", ] [[package]] @@ -8353,9 +8833,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.31" +version = "0.5.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a4882e6b134d6c28953a387571f1acdd3496830d5e36c5e3a1075580ea641c" +checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" dependencies = [ "memchr", ] @@ -8398,15 +8878,27 @@ dependencies = [ "tap", ] +[[package]] +name = "x25519-dalek" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" +dependencies = [ + "curve25519-dalek 4.1.1", + "rand_core 0.6.4", + "serde", + "zeroize", +] + [[package]] name = "xattr" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914566e6413e7fa959cc394fb30e563ba80f3541fbd40816d4c05a0fc3f2a0f1" +checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", - "linux-raw-sys 0.4.12", - "rustix 0.38.28", + "linux-raw-sys 0.4.13", + "rustix 0.38.30", ] [[package]] @@ -8438,7 +8930,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -8458,7 +8950,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 42951cfa..9ac48aa1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,10 +43,10 @@ rosetta-server = { path = "rosetta-server", default-features = false } rosetta-types = { path = "rosetta-types" } ## Crates we want all members to use the same version -jsonrpsee = { version = "0.20", default-features = false } +jsonrpsee = { version = "0.21", default-features = false } parity-scale-codec = { version = "3.6" } tokio = { version = "1.32" } -subxt = { version = "0.32", default-features = false } +subxt = { version = "0.33", default-features = false } serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0" } scale-info = { version = "2.3" } diff --git a/chains/astar/config/src/lib.rs b/chains/astar/config/src/lib.rs index 9f775f0d..0595c6c3 100644 --- a/chains/astar/config/src/lib.rs +++ b/chains/astar/config/src/lib.rs @@ -51,7 +51,7 @@ pub fn config(network: &str) -> Result { currency_symbol: symbol, currency_decimals: 18, node_uri: NodeUri::parse("ws://127.0.0.1:9945")?, - node_image: "staketechnologies/astar-collator:v5.15.0", + node_image: "staketechnologies/astar-collator:v5.28.0-rerun", node_command: Arc::new(|network, port| { let mut params = vec![ "astar-collator".into(), diff --git a/chains/astar/server/Cargo.toml b/chains/astar/server/Cargo.toml index 7cb81334..352efd7e 100644 --- a/chains/astar/server/Cargo.toml +++ b/chains/astar/server/Cargo.toml @@ -21,14 +21,14 @@ rosetta-server = { workspace = true, features = ["ws", "webpki-tls"] } rosetta-server-ethereum.workspace = true serde.workspace = true serde_json.workspace = true -sp-core = { version = "21.0", default-features = false, features = ["blake2", "std"] } -sp-keyring = "24.0" +# sp-core = { version = "27.0", default-features = false, features = ["blake2", "std"] } +sp-keyring = "29.0" subxt = { workspace = true, features = ["substrate-compat"] } tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } [dev-dependencies] -alloy-primitives = { version = "0.5" } -alloy-sol-types = { version = "0.5" } +alloy-primitives = { version = "0.6" } +alloy-sol-types = { version = "0.6" } ethers-solc = "2.0" rosetta-client.workspace = true rosetta-docker = { workspace = true, features = ["tests"] } diff --git a/chains/astar/server/src/lib.rs b/chains/astar/server/src/lib.rs index dd0694a0..d5214c17 100644 --- a/chains/astar/server/src/lib.rs +++ b/chains/astar/server/src/lib.rs @@ -21,7 +21,6 @@ use rosetta_core::{ use rosetta_server::ws::default_client; use rosetta_server_ethereum::MaybeWsEthereumClient; use serde::{Deserialize, Serialize}; -use sp_core::crypto::Ss58AddressFormat; use std::sync::Arc; use subxt::{ backend::{ @@ -29,6 +28,7 @@ use subxt::{ rpc::RpcClient, }, dynamic::Value as SubtxValue, + ext::sp_core::{self, crypto::Ss58AddressFormat}, tx::PairSigner, utils::AccountId32, OnlineClient, PolkadotConfig, diff --git a/chains/ethereum/rpc-client/src/error.rs b/chains/ethereum/rpc-client/src/error.rs index 03755101..b199195e 100644 --- a/chains/ethereum/rpc-client/src/error.rs +++ b/chains/ethereum/rpc-client/src/error.rs @@ -2,7 +2,8 @@ use ethers::providers::{ JsonRpcError as EthJsonRpcError, ProviderError as EthProviderError, RpcError as EthRpcErrorTrait, }; -use jsonrpsee::{client_transport::ws::WsHandshakeError, core::Error as JsonRpseeError}; +use jsonrpsee::{client_transport::ws::WsHandshakeError, core::ClientError as JsonRpseeError}; +use std::sync::Arc; /// Adapter for [`jsonrpsee::core::Error`] to [`ethers::providers::RpcError`]. #[derive(Debug, thiserror::Error)] @@ -22,7 +23,7 @@ pub enum EthError { /// The background task has been terminated. #[error("The background task been terminated because: {0}; restart required")] - RestartNeeded(String), + RestartNeeded(Arc), /// The client is reconnecting #[error("The client is restarting the background task")] @@ -43,7 +44,7 @@ impl From for EthError { } }, JsonRpseeError::ParseError(serde_error) => Self::ParseError(serde_error), - JsonRpseeError::RestartNeeded(reason) => Self::RestartNeeded(reason), + JsonRpseeError::RestartNeeded(reason) => Self::RestartNeeded(Arc::clone(&reason)), error => { let message = format!("{}", &error); Self::JsonRpsee { diff --git a/chains/ethereum/rpc-client/src/extension.rs b/chains/ethereum/rpc-client/src/extension.rs index 7a4b5f6d..b16f2cb8 100644 --- a/chains/ethereum/rpc-client/src/extension.rs +++ b/chains/ethereum/rpc-client/src/extension.rs @@ -39,7 +39,7 @@ macro_rules! impl_client_trait { ) -> ::core::pin::Pin< Box< dyn ::core::future::Future< - Output = ::core::result::Result<(), ::jsonrpsee::core::Error>, + Output = ::core::result::Result<(), ::jsonrpsee::core::ClientError>, > + ::core::marker::Send + 'async_trait, >, @@ -62,7 +62,7 @@ macro_rules! impl_client_trait { params: Params, ) -> ::core::pin::Pin< Box< - dyn ::core::future::Future> + dyn ::core::future::Future> + ::core::marker::Send + 'async_trait, >, @@ -89,7 +89,7 @@ macro_rules! impl_client_trait { dyn ::core::future::Future< Output = ::core::result::Result< ::jsonrpsee::core::client::BatchResponse<'a, R>, - ::jsonrpsee::core::Error, + ::jsonrpsee::core::ClientError, >, > + ::core::marker::Send + 'async_trait, @@ -153,7 +153,7 @@ macro_rules! impl_subscription_trait { Box< dyn ::core::future::Future, - ::jsonrpsee::core::Error + ::jsonrpsee::core::ClientError >> + ::core::marker::Send + 'async_trait, @@ -185,7 +185,7 @@ macro_rules! impl_subscription_trait { Box< dyn ::core::future::Future, - ::jsonrpsee::core::Error + ::jsonrpsee::core::ClientError >> + ::core::marker::Send + 'async_trait, diff --git a/chains/ethereum/rpc-client/src/params.rs b/chains/ethereum/rpc-client/src/params.rs index 60319c32..5eafd90c 100644 --- a/chains/ethereum/rpc-client/src/params.rs +++ b/chains/ethereum/rpc-client/src/params.rs @@ -1,4 +1,4 @@ -use jsonrpsee::core::{error::Error as JsonRpseeError, traits::ToRpcParams}; +use jsonrpsee::core::traits::ToRpcParams; use serde::{de::DeserializeOwned, Serialize}; use serde_json::value::RawValue; use std::fmt::{Display, Formatter}; @@ -23,7 +23,7 @@ impl EthRpcParams { } impl ToRpcParams for EthRpcParams { - fn to_rpc_params(self) -> Result>, JsonRpseeError> { + fn to_rpc_params(self) -> Result>, serde_json::Error> { Ok(Some(self.0)) } } diff --git a/chains/ethereum/rpc-client/src/pubsub.rs b/chains/ethereum/rpc-client/src/pubsub.rs index fe504c2b..a687c043 100644 --- a/chains/ethereum/rpc-client/src/pubsub.rs +++ b/chains/ethereum/rpc-client/src/pubsub.rs @@ -15,7 +15,7 @@ use ethers::{ use jsonrpsee::{ core::{ client::{ClientT, Subscription, SubscriptionClientT, SubscriptionKind}, - error::Error as JsonRpseeError, + ClientError as JsonRpseeError, }, types::SubscriptionId, }; diff --git a/chains/ethereum/rpc-client/src/subscription.rs b/chains/ethereum/rpc-client/src/subscription.rs index 45b64b1f..076c7ed1 100644 --- a/chains/ethereum/rpc-client/src/subscription.rs +++ b/chains/ethereum/rpc-client/src/subscription.rs @@ -1,6 +1,6 @@ use ethers::types::U256; use futures_util::{future::BoxFuture, FutureExt, Stream, StreamExt}; -use jsonrpsee::core::{client::Subscription, error::Error as JsonRpseeError}; +use jsonrpsee::core::{client::Subscription, ClientError as JsonRpseeError}; use pin_project::pin_project; use serde_json::value::RawValue; use std::{ @@ -135,10 +135,8 @@ impl Stream for EthSubscription { JsonRpseeError::RestartNeeded(_) | JsonRpseeError::InvalidSubscriptionId | JsonRpseeError::InvalidRequestId(_) | - JsonRpseeError::UnregisteredNotification(_) | - JsonRpseeError::SubscriptionNameConflict(_) | JsonRpseeError::RequestTimeout | - JsonRpseeError::AlreadyStopped => {}, + JsonRpseeError::RegisterMethod(_) => {}, JsonRpseeError::Custom(reason) => { tracing::warn!("failed to unsubscribe: \"{reason}\""); }, diff --git a/chains/ethereum/server/src/client.rs b/chains/ethereum/server/src/client.rs index be0ac0f4..d94846cf 100644 --- a/chains/ethereum/server/src/client.rs +++ b/chains/ethereum/server/src/client.rs @@ -102,7 +102,7 @@ where } pub async fn finalized_block(&self, latest_block: Option) -> Result { - let number = match self.block_finality_strategy { + let number: BlockNumber = match self.block_finality_strategy { BlockFinalityStrategy::Confirmations(confirmations) => { let latest_block = match latest_block { Some(number) => number, diff --git a/chains/ethereum/server/src/lib.rs b/chains/ethereum/server/src/lib.rs index ab200c43..44e35452 100644 --- a/chains/ethereum/server/src/lib.rs +++ b/chains/ethereum/server/src/lib.rs @@ -49,7 +49,7 @@ impl MaybeWsEthereumClient { "ethereum" => rosetta_config_ethereum::config(network)?, "polygon" => rosetta_config_ethereum::polygon_config(network)?, "arbitrum" => rosetta_config_ethereum::arbitrum_config(network)?, - blockchain => anyhow::bail!("1unsupported blockchain: {blockchain}"), + blockchain => anyhow::bail!("unsupported blockchain: {blockchain}"), }; Self::from_config(config, addr).await } diff --git a/chains/polkadot/config/Cargo.toml b/chains/polkadot/config/Cargo.toml index d7cfc2c6..4ddfdc10 100644 --- a/chains/polkadot/config/Cargo.toml +++ b/chains/polkadot/config/Cargo.toml @@ -11,3 +11,9 @@ anyhow = "1.0" rosetta-core.workspace = true serde.workspace = true subxt = { workspace = true, features = ["substrate-compat", "native"] } + +[features] +default = ["polkadot-metadata", "westend-metadata", "rococo-metadata"] +polkadot-metadata = [] +westend-metadata = [] +rococo-metadata = [] diff --git a/chains/polkadot/config/res/polkadot-v1000001.scale b/chains/polkadot/config/res/polkadot-v1000001.scale new file mode 100644 index 0000000000000000000000000000000000000000..1168eb29868d4b56ac5bb3a79c8912de11adabbe GIT binary patch literal 270808 zcmeFa4`^K1oiBdQ%pG~0Op-}EX~(-tcf32<9ltlxlWjRG`zd*nExFQ*Y%7+WIIlM2 z(ae=J^=M`?cSe><0xdMKfd(3ApoIh)NMH*sG|<2nT4-SdTi8Mi8`#1YTG+w{w$Q>B zwy=TU=leb9+_`^8k}JKo@0VRSntSg#-}C=_zW=|QcCY%tyZ4FAsMD#`+Fd(e>+W=V z?ea{m*6z1@3-!~dgs_Aq3!myw{?EecQ#a{RBnv`_H2z2KOyCo2nA?X?TkJYILY?X5;V z_`2-$*VY=fhTZD<%V+CoASb=e36VuNQzDm{>QtLeyH{DQHmhjd$@O+Rw&N{pjhAWS?Jo1-QBY5-k15cZu>KK%lj&~)~v2Oqp~!&-Ro8_(t{9r^x}vZ zjp>E2s3r0;+dp|~QiwukLQihL(`k2mg?hv3RC~3J=_R{6tAAf;RvpK(R%B6RWWLqz zZdRK`X{`uZZg=c%wby93%$wq7wS`G)cXzmiC}v7n`#W}HeWT|T)!)k2sr)ni2CGb? zUaRyPn|4WN`j1TrS;C^U*D6lqGv<{j2{BR@WejmdjHjnM-Nt64*VwWvJjL1hQ)eCv z?V|}H5@|7+rS`j6ZL~1DZnx}iqn58X)@`SkpXEQODYMP?x-%uGp0;aK>g@vd+7m)d z0m`(P9s;E_C@*BLwA8h)s@BqCR?c3)zO%9QoVnI|qh&ADg_w||)J%W!2{9syZh<`% zw?uZ?t~U2j68rH=Z^Q0d-qwVu>#ohUwi?}bYZDv%S_jKz*Xgj$;^g7<;paR?y(ks~ zCvR>G<*(W}$n~@}Czr4z#<3%EosFtvA3Gv*OY{SiU{k>*Y0U|l@3lLPn)C1xnWsUo zU`m(L)17wncD3H_nS~iQ{i2FOeks4qXWbGjvg1Ac=gx5-rgU)t6UF7)hF$MBX{_7w zv-%7==4Ggc6a_3%W3#$$TjC4yd0nBS--XKGBSsfm^#;zfCB7)Pb@7IJ6)J6sfK?$MqDKWp&t+t$MjSkULb%&P360ga>)eYf*o3E9Q`WymM5Tnbz>g`5r-4b7Q zyXdG_q0&c0;mX>YO&H1&e zDqIuemw{g`&iirkI?!sskx~>RGyV&h)Aq+ zqqf|y;ZATYIbn!Eto>U1x*Ruz-~t{&Eq!sORj^I1Lan{o0oiNU3yuP?)^9d<#-?1j z7psk?T~EtN7p&dwf`*V22JRd^i(T54){?K?H3mCYzR<4QhKNa6OSjI|@ZwhCPSq*& z6>T$Cx@_OkEQcjWtBUy$a(w07IhPXw>9a9YXxVoP`a46Y;m*O(#wMO@V8ZLW0RV=Kvy9JPX1w}GxBr|qBj<63bCJ1^(lozF;$z={VljGbNtPe8)LIU=V zQ(3d^TQUn$1x&|{xK`Yy)m1b3%gi=_U@Ko4@C-tV;w8f{h=dTg;sB}!Wjgb$jdn%) zavOC;J?)|H-8S`hnp7k(N{?Ttwp#7pV!M62-=Q|oSL;{04G`pLGk>W~wjhZDoa%%9XN~FbvhZw9jEzy%+^03-e<&KKt-1bJb4|cdN?h&O6?QXZ< zAp%m|E6Uee)h!&2>T1XLaa-R@m(_hy>S_8kyXelk72NDS;%8+R;sat7EL7&AaKG;cwpBvGE1O8{$a?TTj~XB#KQA%E3hGsUArjV#c|&)OJB+CdxD!2F4D<54bs=e; zkSjo}HNbVTtfmd?z{Ac4UlBko_=^3FzAz%DR_SwL)wXdLtU{~;bUg`yN}~-%(p-nX zWA7~MaqitZ#2_tRNOk44XoDAeZM2Rn1NRwC5@>T-nHH4$ER&+A}1VvSd07NuZ6BlwHP#fJ9NyQTn`QZ)wIKSz)Elfnwg*-pv?*vb zLfGMo(%O!y*fllAMlUq&YB#EC!fJ-9whA>>e9U^D=KU5=->rh(>Ted>Yglm1ufi~2 z%uH%jqvaV9!<~Ti!`=qcZLEXpNXyKf4P3o`(#b_LQyz+ns$o`pGcGyAR}1e_kQWSY zti;eSLJ*3HQFl*PhM-96J3%P!`63}|9h6?7)NdKEC&tPeE{RUfr4|J^YBUM!--fhC z5b1a|dQPF%@8XE{+yO4k?mp*Va`%`K3i&1-J5^Wx{tleoljb3?Mp?=U?g$58PXy86r z6bO(D&9>u=K{y1N800dzWFQ>h4DH5rFT6t|`<}2C4J^gH*ma!MlAgq68

WL5$?y zJK@Yd=*i@vf=DT>?i3)(?h)~?1p6`YB0FbUKOaS;B=)TkaRCv!WtTnpM;JBjiRK|fs8@IP++Q$C*B7`uw z8oTSD=W)1!wHh@H2Nw_udphK<3|~y6diU;U!jD-0%mYy8idVR<&HzqN$sSuDQ*_5b z23!F5<(wERJcCnQ?^f^Zr?s^8u$nJVbA$~DP7AAutwbX<%3`)|K8F!|6qxW_BvHXJL^r>Ft3_oB!Dp%S) z9LNTW5u?JjLC}IPbTB~R*js8t-zpdQlB0X0NqV)$K21HKWNg4fq@#xx7PA9x>)=pRlm zh@!Fl%0`t5mdHCZa&>bN(7=!Y%I<{JmvesAbsmym5M@v}Lipljfj4Rs<|bDc2DpTa zxT`?=yB9Li{;y?>_!SU>$~GTy#u8J@%hF%8?WJl1>~7?kOHk|et4$J_<>k2U%#}6f z%rm`4C-_pNpOrHOPcI1FV|%+$u*E^aL&H?tDBJ=7CFZQwv7c$D6Z!^nBLNDqn-=I3 zjPebaUhbf~d}u(O-P(PYznV2H0_hcSwDg38=Vf+uu3J@;QG`(dWXE6tU~Pf7OpFUT zy;W^C*f@YxnIP(d`!K;*J*YYsV`OB}g%%n&CQs?H-;|>eC9FbZE@Y8`SFmp0y^!Rc&YxV-ifYyc zUk-eL)VKzE3=#}Y%{97egk>eh(EVPa9b$wpUES@mjVsMM4+J|{jRi8K8ZRUC9a^hx zw(Pi8e5-A1rH>JV136-W`%Bl0f~zlJF#RA-cxRH*p>6=<;;BJMYlBsUlBD0P&yuJJ zw-IDWq-Y_b&@wNp!x~CR0#nxKl@5Zq2W&aDf(~DKte!-j{CQBT``>*d*&lgsVBUHR z2P=+)q8Gbx<5OtT*}#-Ct9Rq3xFj!MS(!UmSfOH&*$_nx`3z*Y1sgIwRV__0$yE-@!}us^UJc}ff@QfAPg)g;q7!{7-#_T>&k zcaa^>4PA<=z5SlXBdo?U#4gQ8UqkZENYPN*Bu3!532pnBGnl3=KA?H11(GCUzHS++ z8%kN#`CFhv>x6}vZ&q(<3Thku)@{rH&K?lHzCdo(U2<97_ttt8KBwe?%^C;SyrpWI~U?_CDj!7SYIa`$9olT3tCBsg=f_o zolWeX4h-Z-g*8fAear|%Kao>=uXQ{)g&;qn|El8-=t7Os0Ix}-$K2ZBWFSzi4)DDX z+l@iXO}7TRP2yP05c*;cyyuRZa)(I#W*E6=tS{35@eSzM`73=XsExmF_qaE7#g5HB zZ7w^Q8?8AkOo$#O45+BY-^xjU6>*>SU-#Twqbw7*>)({wRTx|d@pafBzA3&5 z8$=<#6@=@KP-aU&a%Q}sGMc)=TVtb8)qk?xrZxD{3}bt!Zrqcqw;gRb_cRmL$w-W- zv9U7o`#=?JZz)G{m^ILO}D-@7n3&jPXp6FcEN#^panr8pB8g+`oZ6<$^978(~bm_!X{|y!a1v@IS?W20J#t5CRj|MI*!+i~!ny5Ho$- z(@F7P?k!`iX?^?LXrGF(k#1v3XopXNUBOR?F&Ncl<%IfHZK89m;+r7EVoHq_mPtH` z8`+Z6tNl7C3E1Fi`6-g#{@3t$%&S2Ik!YIY4|3C^(jH7I3peU(STF<`jUv zV8ueRc*Skts3=Z6vuh`1u1ZCt+K;mbOIXjd@^$)NtWaShTI88a#qkpH|U+EE9>1pQIFv7^E!Mhkj36|G0u_ zg<6W?>9y3Po5G{&0P+4bMvuE{|E0{_(pWfTAs>kq(#2UYcIz~XG^{54HUQxlB!lwv zzjafcwh4F`SmU#)N)<#RGj9s{jzJ6o=_JTOW<+k>gn^e^)e1Evt^YtfH$J6#`5QNR zYeEqMqb6dvAu#OP&>!_7n^7Gg&eZi>+WodlNtZlu{Q)8;Xc}6cRV5U`jiJ%y)K%?6 z(BEW)Y2D&KhV(WN`=hCz06uqA$%0h6 z^?olale9WB;pO1lu?q5c$}EVM^uP!7|J{QKjDdr@^SKdO0OPSjzpcNc)ijn#{F$%- zp;}zfBuMq61B+~{2Izq|xDrFMinpf^0TFZs_JkRmgsn3)Et`6RJ$75z{3Md9?~3VC z!T_03=8<;;L^)4VPiQaR)hdT3@0&DvplYCR-hJwhka#jUcZ!H*>o7G<%xS5qV`7%4 zzgpj6^#+(75DnGlSiw**cQX@d>%MSD6tSx5BGocX)?Bpi(k;fy*hkO)9%l2X^>q&! z>~^nfD_WRtyumhwlnFAf`jtLRw0;kLy~q0J(8BY4lPC_nI<%7{h{a(74A@T5Fkq4LUZSK=poyjYf)#x$KkS^`n%=svcJW`gpPi7-6Mi2x-&5kpwsbPrw zJ_B?F!~`kBS`6KddH=zBr{F&(O^Fe z_=r3x!%pyJ?bS}SxR8JA`oKRV!qq5O}#YYSB7?^m#AQ7Q8;N01T zXQJ_^KX=YwlA!%=cPy$OcE*|g;M53?tpcsrh6ln|_l zB!BCD6&cSG&sm4OhrP{tdU9HnIX=(w2F!BnmU#J)=fl&Orxz2U07I`F@_bM~7L5CY zrzdB`xcWpEaTI3lRZG5mm>a~~nx`L+xp9*oP95_7LV=h(El-N_LJRg{FinLUt|cBx z9qtM7H0J5WSrZZJMCx$4Yl=JNX*V2P>SXG0PbQxTcp7lXDo;`bz zo|xu5J^5e0uvv4d!@Wb?2wk2Y48m|N9P()(lUVO*@CEm}lsa5$%Y+g0jNBhG?AjsE zy&Ij((*u7Xvi>3Wz>Rt4=|L#E*>fX@i<7;v)I9xwspdm6GFV!cT0l%1iopd} zRrSLY$yHc4mf@@Ssas1ZZTHTdQzdTQ9GisbyaMyj4xHX#`wRUZ|1Iliw=i(>)$^A| zeKNa+gtu-(3{8JLjV7#mxH5-7yE%5lRI6xBR0VR@+HJHSgp#zr8Vw~-6MZQYQ1SrA zNJvqM7`e_dDJRI{@kx6J{tJD??y;;+7@)2NAmgOX89>S2ws)N4QWi9jCm^fu`RjWt zP%royQv0`G(L7@j;;`H>*3Vc10Oj!gycGuj}|rraEkF+4?dfViPPj zp+ttm8$yYu<-DhcekriQa0Z}1dH#HRdunQh%-|J8{KUC)9vugaUqky>>jE&Hd8Lws z8YO-pM)S*B6&XB%3IIS&nod?)h%HsmQOqfr2e0U0Q|NGf6MrysMdql!J?I}4hB>YV ztOkjYNd7@4gNMpn+BZqnHG~X+*^K@h6;|vIW>&1&S>fJeTuc6Ws_^^p7WktWZOZ!6 zusxv0hA|%uDmo#(F}9u$#n?h9F5sp|rE5}d^r#`cl%0TqClHQ_yDf98J1|G`++@Pq z_K(b00YjSVQv^pZ46R;u!(~eAvwjeP8UQk_V`_PN5`>blKJSMTtO79e6cmTUc?|)S zw7%d66s~k&D|J$4%G#256$-`B{AU)G!*T_^ZfubSJq$B}yuFVU^|-xuM#?V|)}Hee zgpjhmHU-}oxaE_+82%!-1g3DwR^S2w|2wX^Amub{&~OJ|p_g0<2>y%yNr>nNW&s<6 z+{=C4qkzRaXa|r7E2-Tf<^f$*Z4o(?SI?KET)GU~Ty^Em+D@(8 zK+cOUd~5gIV0gZsr-tt*fWw|;(DaY zb5drBfr8yPhgl$!7G=&#sX-uquL`OV{vyu8EfU@7lEBxKhCzYQ_0xG3x>9DfnFaD} zbRf8bkApI#7$@tCbLU|51$G(%B9)WfQ|0pGB+U5 zHY9H-MxwB;`+LY0&_@+d2KrUlYqt=>1n9~2L{p|pIwDOhXc;8aIYJE}0y-k_*~|)( zFIYr`MMP`$cZhVr}Hz9B!3ZGXl#ZraHpLFjJ>E$a$HrqT*>5~>N* zJs85ODmf{R#)jjZWdLC<;2-OZvr=wGJ@{Px#?7M9M9aUCIiP0ph4J|N36X*W(U96x_SE=Ipe?`#R{R^hhD&yi zU9vX^B;cyfedOK1u2bQXS?vnriVD1*dK+NyfWDBnDRx`3Z`iK_;VlD%a1>;$*L9Lt z=sux2&>7@CsKYhIH%TE1DzxbSR^>Q?z`&VN#b6A4LnJsqdluPp)XvX4aL}vS@!h$L z2?}wGp<}Sjj7grqmGK zfR)NUC4N?2KR|C7&s30!2mnPp(>iipMY{??qDFo&&q+B;moM%NbMop)@DyYxf|UW# zgP`wX`i~4j&ayH}GOq{242_wKPRZ_qT}^gzBTpP1AWn$~v6@cl&#&3li!EWYs#@5CO~8 zC=L(~OOS-2*Z5wf9n9-Uo!#qt9wvG6JimgLDHG9(+fQMS7!W zpxwncFf&9c+IPT$umtjG5EDk!0H9kYcx4z`X|S^l(0dSs(|57N)du7hgfwf~VX*l% zcn-I_pOYNlhN7s6d#x|~!A4dE%n5bWTWt#A=7>yCP~-dTDUTZz6%fNHAlT96)n}BS zrAcbEw)#y-4ah8=LYerUqcQ9K!A%~5Gw6)YeFPi6=1~Y+|Y>=e9$QZ1F;7$f+S-`@ARoB#Dl?= zjD(5CCUJ7$kwkH=D0Wra%OOV3ORyUs2_6zZM6?0L7-76P4ENC>hEv5+u>==+#QmV< zxr=4W1<~#R8ek(_QVmKwx}}HXsE2|#096D4KKe9mglT~kAoX$bavq^J!F=Ptl;RHaNq#+IBVZ9nCMG+mJ5Fd*|bAj2xq?J{Z?AdQolr0z61|kQ1 zJgB1cR0Nz2b#~w>+1#o4`)BRCh4a?e{b(*87@C?V91?7TFuW(A<*}d?FI)$Z4u%%m zk->m4vmqkJ8Zdwo5nm`cI;FJ%FNj}+>nJ~vJM{@Ms;}n&@0b)Sg9cu|KonS2iqFa6 z!PfX50Y|8k1&J4_T2{QY3*n|!fmb@@WR;g0G~4c=yP0JOUXYlUl9CCe?I0gyA_QOF z4?GY+et6jsyjS)E4>x82Al?Lf`09Qjz8M7gW(eL_2I3$s`15kpY>AL&qX1HKgOj2^ zuj6W0(szj3K+i#9@6)aXXfN8cR1G_|)afJIA3q@$Pk?$Id^@l`{d$z=n|6DF@_;fK z%TXQU>qqiOQ`%L8l*q*zEGm)ajy>*H+FF$i$7vPt3)*EJ`3oWYAfla-^6!C!5pZ>1 zb&GBYuz!*NG-X^x_6Gx3Euu@hX!#8(e>UZ@h1(x6M2jlnV0+c9(u_pVoaTgrck)~n&v zl3oKb!6>-9(qvrx1JSY_YOnXJa~o&;_%W>U4|fnyTgU zJuVJehWZv6Te`3a6QYPxDn=nv(@H2B-RgU5LDe1B2FQ2hHi>MpDbDB8N`mH2K% z>tU?=T= zQh&k&dyfY8(}6nBz3@W_-YP;xtwMexVzm4F=Tdg&&4&mZIcR0bc7ZqlFQohq3mVNO zw19|Yj&Zj45-*;m3reosmJbXU{Twr^O-9_|7u_*gWzTH{EQDj?$D!Wu*uR=iH4!2M zYU-)M1q=ZOsR@gOBv@Akp3|iakT%ng3o5Ey5{EE0g0~xfJ_g7Iay`crGak{RM6_gJ=)_zJw!y$_s z4#|lqkme_@2#5>=u{mW>oe`)HkkcT?C~o1NVTLTEf&c(Cr{_cKSbh}_dg+U`7&{?J zD*Qlmwo}xpb|hpp+ck`4qi-k znO9e9?6{IaiKK!E*a+ImTSTpoYCtCBiZ+$@%^gH%#(E-R=|cAK9>{2jY|v>hv!tv- z%^@lGF5QkF@Q{9_f+F)!!|2Vy9E0BsIR?Cu%bs0qjp|SwBo8V;Y(>UBz@}XAx3D{- zt?u1sraXw1+%f`}Q=Ud>g&;W4fCTh1)gAA%80UgBt6(4+E#zz3rTl1BmGr=XFzUCv z4NG;EgktF12SZAeJX9Yb|5-ALYzvE=JM1LcZs^~qwjmJHzfW%?X@LGcv5f}x?=#!T zPoRH4wvBAqLMFUsyg2s3T)7k;3I9@w*eItyj8)95D4!WQ<=#Ci-00DSyg^K^a)EKK za12s5F2eb6BhTFz9d#7xp==6pOA?OCCR<(2B;@lDL~uk?id7RuX@&f5ROhgfuXBV> zSbfwuf+v}OP6|mumh5*<%REVzq08a$HY+^tFx^{gS($f&uQaT^h zg{}kMO7UZa_|T6}sXXdUwZ9tFV~Gb*S~CeXqz7&zRzH_^Of~T_F-?+4m_WnrN!7E& zLkU?YnWcKG>$p`;iK6QWXo-gta$YyFUE6dE)dVmp99YET3CIe5*WhROR6yNw`0aD& z2rSSgW+LN{2IsnI6=5l-hvL(%WU^ObH;f6&6JtRR_2BbdV+Wv6g}QM~JebH$yJApn z=2u!LF>8yWQjh9cT#209ylNYa(KxO`QaR4lp_4+pMIASYmQ+k#M0D%+9WoSF-xFf| zlL%kltv1zjQjBY#Q}t|#(jukIR8J|fI5^f9bgb+y?u+Tc>nDL4(AE)AUf#q`T4^9J z3@jx?@qA-lKODuqO5ZpLJ3ihcCN3fGW`EPXxL1@=+B{{%tQ%-Y1)WBn``~(+$Tou$ z27?c?h4N~`G<)t&kX3Z|o+XYYB$AgvVP3~f;VIK|0lI)_7if`mY4DS5+_59H@eFok zrZm`*!8X$wY+g$oPsj;2)x<5$wnS*NaMgA?h{OjOTKF?A*yD+88Po^ja<5mg*V9|4 zC)o586fA=X0z@Wm^c>eAlsxJFq>u>T3(qXL-aV3##sA%JAsRfI6XKCXHlqL*KW*N6 zzRO~E9sv)~!}Rr&mN=1+1ydROD1H4@+W*e~lt78o8UMRsPf3)Y$POzp>>CKD>t}Mq zO6>hx3a}o_@4fuqOO62YUyts+{N0v3f_5egcU${z>w$DV;qIt{*-@T7Q}UiWaI0+m zB!nU97wV@^Vehu=9`e@Rel#Ix_3e0By;*==r1nl^>Er2BH?a>V4JIWC(PI<40#H|T zNqJEN_vz|TA)XrFwQ>f^&xZ8aH7CX75?z+P1w_&$Y-rTlmWx%H_OZmTWVV0u)Fi0v zl18^^5>k4IuGYz#nNMn#g0@k}A;rXb1d=66iCvh(U z37rhDtOt-R70>U`u$%@O@eTmD-uWHqrNC?ZM1e+PUQ+TwqKCZIz`H<{al2Z_#hDQK zC;LuyvkJ~-^ciSqATk5q&0lTT@c)?5{4?s;h$zeoL0dq&rI#AF(fLNN z)^4;eAi*^z$9*Jg2h7Bo@Ce<>EoHAE{0T7O=%se60V^m=%*s*Tg%E*D*M8n?YS_rn zZQHdzX))33;)-3{Xd!u06a6kDIBWxES^Nz=*Z=OrHVcteaEBtX$r={Q#!64}b&IG; zDi{#@TQJf8sIzCoogFN^%;i9>)ChBrYPTQ~l#t<}=^*C!B5q0L&j+uSP4`0%5n>0A z2{Ajk!uIs8k z?q%@;f@hgd&%i1qD}C~2aQ!pnqa6Bx=H`6oU_5jT#`zR140v56Q|{SKEKo@JpPh8S zRmh{=l12JsywSY0KIn&lcecMOh<&h(Eah=OKrgu)R2k+OBViD01l2Y(%9UUPNZA|P zZ8^=KkVO(cWOa}DT`uy6J2qvlqv!}g2~JVwpWzp9Weo6Cv8|(Puf={;VHY~CTkxI( z2PCbZ`8lgSHgRA~*QG@EhD%>+3ZD(<+O0f9k%;9O+D_VqOS?V<)8{~ir%_(TRUJK* zkdt$@x>NNiGJ*neZVbaJfklA9GBpiC7M70BCghaCqT0^~j39I^{ctYwY1nA=*os`o zU$~i&|DrGL(s||5!*U!qbD4P}>8saf;RLSsB5qJHn;=~6fw&Z`jC%JZSZWjsiggFw z$6&^J9F;2a**U$8auB-93G?*EV-OY6_j?;e2lA?EoOpLEp4uVliz>~lK!RKb1`#9d zEF)KeED9q(n6L^^mD56Q4g?E+uM#UXdv3Gn#KDLao=RkP+2P^6DXxKTQ5xkl&?sL6 z$&s8PzC%2_E40vN#TDx#(Zo$3YOjV#oT?&m=#Q1j=d;50)o6rkG*peouDzS^?O%|u z$a}foZ&te)U3M8UCFrW#^fiY z&^Y?DqU>`6AD|D}%}4GKyPXUg*hlt}CUes!Q%Xl8QL?Z%zfT&~xC&L{zCY!AZv`hP z01#~)%;D~b_TV^8Ib8t_EM?iVtZAcDk$Eo>2BQG13ZZ{WX=lm+`9nmc?5(_SCxJ#m za{@fG2|;>pXV4vx+Qb%xjzm7UTJ6=qTjYo^abAFGfIJ|EM;8hxj~N2yaH8r!Zp;Ef zc6!XQloy(jO#kF#;J~Pb2lo)ZNCurld~nfFky|8h*ZuT6VFmn_Tqpopb}5}I_E!-t zD%luxFDs;b!9}4MSuKslRlDc$AhT8sRaGTR;j-HI`(B5T`qKl4z>;@bMNyg{j`lqH zc~xaVl%|5+_W(va2Xk^>z>Sf35XSKdH|&kE6$|azsR_7qL8SsV5%?83HchJ0SZ#F3 z0K^9XgJAuHX%L~@=(N6=kZ;n`n@HA-jIj?cRkuO-X-CD24ZB%)$PXn-DPbU@1-2}Q zf`tOb(VqvC%BzpOWQ~Xh)_=1QaDdoL1oiu*;-G4PG|35Cz`27G#E}*u*L?qX)PN>j zh1K~qDWiyj#1_Z=DI^KjcG3+X$0jU2W8Zl6|I)g6G$9b~yTR*1iW+H>1N zu#7-csUU}^-K=zFfJ2xL7@gWM=1>SFs=t|tzK&S8{Krnip&ruDs&eGVL=J@vqB3@0 z9SL^c4;L+!xKZ9D!&=F&agk$5Icc_=+F4L`1q?L?00DlM%yh65D(=d{2+W=BsF~XJ zLWitdZ<6Clc>~fHwPSo_2)4Ux$~n#+5@c&Fjs|x}sCVe{1V;)qyLWd&>z?3k;HwXS zqjZ>YHXwJwe`D7Q><-S>D+!sUGX_V^!0ymcXw9G;U{&6JVP=ABH2|c*vXlXxgwx!x zuHF}hV`>6U0j9%@48;9GEMdN&l+`gC$%H|K#vX(M8ByH*+u5SEGZ<%G2i-a#Bq$~@6XD^TjbOgvHgmBcFv@k-p3 zs{JOv>~by8gChRNtIQ*1@c`w~SLpf^^njQluj2uJV|X}ii8rVPewctz73L)T`-~;t z!iN!lc+3)C!^07N_-jji0}p9_n6$*(csR-rXD#s#9_|r2Y7;&9HlFTPPw2vT@sv?d z=)?E%bf0=cC*H-={ptz5_yL|CP*3Q`5Al>$Pw2>Zprut0=*W-p=_Be1J$VmLA5~B2 z%1`i=<0lmi1Er4NUHJu`^6Cj)c^^;5)Dyb$OFaFFdO}xz zji*0VPw2~U@Pq^uG{fl2Z}If7dO}}5z|$xA=`^NACWZJj^@P5p@KjJw=nI(5{UjJ& z{N%OABYx7#C#gi5*E*TvpS03Rm>=OSt#k4S|D;t;l5JF)*Ek6gIDXOsC-32(w7SWA z`6n%HGQ&S{F9a^d5nM3+9dykf6~Gv|CE2ysw7AGCoM_xVg5<$k^BVzq{T@7 z8UH+rpNW?f;=ZKU3=5Ktpmcx&>fqmlRQ{o)z(1T=oK|rx86q_m4lFjK75+mfa+LS3iG!Yb#$M%94OEA@&&?5z!zr3vTJKyO z;5OQL3!8`uET+Ziio#&xv)F=hjYB)FuWPUE-{|PI)@?-IB3p;ii?+Q~B?}NQA1O*# zp~FDn4a5mR_li$a=})%XbyChCFx-_j;CCB6E-kk2Jk@6n8!%CEuG@t{5i)?2LEIzB z%(zzY)fkHlk9Nqb_ci45Z|dF^XWE=K8$M}#^HA(B%t-SjGjz- zo{>T(%v<=sqei)g#iRhDa7fC)-1;u3$1f`gv9_K@Xw8@eq!x1s;@7ECV9dK+GQW%> zzrl(a5YAEId5Z{Epu{oIZw%#Nb8T%RTL?)Npu0iv)x#y-&liuIc^gCMk_g-YfXge1Si+7;bZJDZf9Vap{v zHUi#}B!lQ7(7yvi4`+Pn0o@IvhqDSjoK2pud>IMHXAUbKztHAn z`;`i^9Cxe({xHENG49}5%8r^~?r_vHO9Y^dFM+0dzJLk=EY?rYM9Z z4x-t;V3T=uLif8#c3qx5p$jYM`4sL9=4M`361#tB~>bmJkPuUa$M z3>rTegfW-Qd{NU4@PlR%Itf!qCDqk*dk415;nW$qDJVdoR&cXF!2Y>gy;E`8O_(aQ zTMJ3~O;Wx>Uc0PcO_?9W7()%)0M`%GZ3GSE#2KTIkC8Ry!n$T- z4FrDyLzzGyFfC0|ufb@pv56?KxVXCT&w?EfqBeCAl66{9?Jbf6@T=pN>$q%E%Pvz< z(COAU{rtobz-YHepP`zCp-Zc_Q*kE~aRvKLI9C>&euwOfokwVR`ZveF(Ba5o{Fku) zF5F}+Of;%JPOaZ@>O*#WYFg32;=nnpvIg>UwMtIqdKQU0A+PMNa~5F+H1ngPFV3oY zrV`3*DpbS@$_pY|LI)0JmoFsKd)nn?&u+C42ckqye27(%(`AU2)De#XAyhsIJqyqRK6`)B> zyqpyH#|2)Y06!^ylUZ(=DQvp)xpuihc;H{*T_o?@$3!|DeFPsla!W0{^(c_o=}5sQ@X3P~crE@PnklKQ8b?D)2)p zK&m1X_%RiDFDdYk3;cu%{DcaS0tp3vN(FwN6!^ylenAC(K?O*ygaYqVfnO#C{&9g{ zQ-NPo0a7-hz;CF)Z<7N5xWETg-~%c^Dkv174UtGe=Z3$u#z!p_IEn{WOrZd6lEi~> zpw$H)q5=<50a90?z%h$cptNvKTpa2I4jRtn1Y`IrWlMx65AikTm{Pav+9+GVK$)U| z$9*`k;DYs~3VH9=7&|He#GnW>RTKE?+RipZ9@kKuc!=LN55g;yNkfw(xE%|v8zm;apeN-+4CKYB) z0t!`;fTkAzs2h24*4O`RsQX#&{o|G!Ltzzqxk}Kl#K;mdIRrkgu3NGMqXYK;wCk~q zcSt3~b#ZA-ArBJ7{K!;+0I!wy8Vt;uU57IkOxTsMNC#2|!B*+C+fAQn?582##73@ek{lptPXaIZ$BT>YPP^FHDVKlly(uF##r3M5|JCJGzb1+)sTATDFzm&k-%L^@wOs1DJ2K!*$WWK(FtFs2VCj_TWn%~xE$aGf`vqYESOLt z9wG2O!9&apmkv1ssAYOabRZREo+y9{VHSwETJ=j{suU|3jxRq&CH0){R<=kS3!Pu* zDbV*WM8(vU>7zm*QJ5Qq0N4}#T|5w!`$jtyeC1_XsGz2ZLG_wG&M?G9<{r3!R;2T z1V9HP@tCvHaU@>xyrHXEf1@<(c)@nZfY{qhIxLdl0Aw zxmEJ!#4e#fR{BjL8u1-piaLm4RrNTb3zOT)gDhl`?saXj=k>sYzp0g3)cnmFB0G?X zngs#s9S7}W-X?>H6Xb)0yV_e0UH`IQ4jWkvXSD<=xrTr>3-Bw0Zzwqm!i7?5fvNx{ z>r{Ges15AeZP-7}nPf(ZphttQb6`l}IcsP%sR^_P;)+zqxZ%92ex9vwJx>Tw)0xCD znv{Jt&`WjLo5Cpq_ex|Od0~CeKcl;V!jL;LMR>)BG!+V;KMW4qsnd4~^8j}zXnSes zbk8^1NY)fPo=}{JSRiPDGkK{?53M**WEjXS6AEReBUrxTfH7@ecG_EE5LWPB36=(g z>*gKA74-_p#%dT&D#&z3*8w!n{DhgR!@C1)IjKx2-y^R-k7^_+-zQLk3V^fXe~l#| zTQDD_Bf--cSp~3o$E-sLkA&J_I(a3LtQ0r9YVZ z{ZZij6#?#BG@Htq)CyjrtQBs~d*U;sm|kAapV_RIs;e}?CL&w$YrMhZwC2;C-> zrj!cYx27Kndg4*XeZ>KTITL*ca-;%WDSj{?jp9OrH2`Uwz<Fi{J-)8nPur$YIwml=zn>39_A^iekobsqDZxo)tGkA9xb=P$b6DN%aDGHj zFFzJ_sN-q^GIJHQ{rVlYdIHwyL$yybPv7W29>o=W<_>wB3P|Nf@6Wi$XZDRRP;Y4|*12A^&L{R*0wwxL*wn$iPKn4~2eki8M%* z;hXDG>tDk=%`+{rP|VD4bT>PdHW(4(%3SI7K!SO;$-_}IA6X4BZ_p_CBf`y*frJ}6 znIL-naXt}@PZd)UFnQlGOa!-SbQ+*QV!{4d)ZUA(3&^}r_$x8MExW0RiYk=PxUGD% zP>9+mu~h+^Nx@J7)-i>5;qfTqZ%Adpf6bjRT5h@`F$R$P4M^p|xqx=&5&4nGp9h0q z?GXst`@CD!J6C3Zh0bfy`iJnw42{TJ9c}O#;6nZ}A@%5xK|K<62KE94Eq>V@6}4!( zGyKf`mGv(%LmLVMt?|v@*;*r;5F%DQN6mj#|F@{C+FudizDS*CH7{^P1lO?}AMoF; ze+my|H+X25ub9=H4h(aNI6%Nha0RgFVRlWO8k2dw9CgRURRw4!=c>+5t5zXH8dff0 zYj5gp+(+)}8Txu&eO%&i(DO!+cTrH#0+Z!7M`lFkRXR5YI1c=z3fb81YQSSrBzmAS zU^3${pxjqs4Mx!%)Kqwo-v5YV9>VnikulTY3xHvPyA4f8E5II3e>@61#a0J=Ucx~E zb(Pch4ISi@Q7af%6Oj2t4ZbVeriyBSBlLWR*^bZcn2owK5;;UQ3&EzI4-P}!&^k3Re@T*V#zPkMZ<)fv!E-%4ZS*rbZVfUFREmo zkhTWGkuj75Ln>d1-5cZHPFb1x*{ewKh_hB)ZS>YSoX_hR!?hNl9lK7!M(z5HN8*Dp z1FD>mvxE_WW?VGnd>cwN!Vk37D5SqePg7_{Wi}-n7tXB!(T4MZC2w)u{8=UIz+qNl zL6>dp@CnR3W~D-+AG>=N#$isZON zmI~mQi??H24h{otYJ4l+iJe$~+FpOky!T^r?R}e;>$?cl65EyFX0a#_DOLpTlzRJo z-;y2Hn;;m@U{hVSYj&g4o0`X#QfUK89?5t5Z?Lgw?szruc7|ieGL?eDvzo95v4~Yg zNNs0N)BXL}5!7Qlr^bSWZpK%r-F=sA63ob;9ISOQ2w(*oM!80sRL*+jyl2TJx14H# zJmrz$;oaDdEV>m2fK?ZYw84=$x=}xdz^4>ieq70g)FB&}lzFs3A%$pb{{Wi)3;H*e z-G&g7d4jr^DPeIs#dsf=S&pQIv`!Gz``(O`;s+rQAe?UZ+;W36^Fy`(QLPS+3<5_| zXX)g-b(Zw1kKe9T7i>-NWN%jC;r!{lmRM+1o+*v9~FLJ$-U>!%3m#g25y5DFKj5`S3C1Q=!OrS_Wp0CdYi6kdz+U>DAAj zW86;-^(WEaUl2z9Iig7U)Y88UtEGR5f}rnyxsQ!!t_8hjG)RxJn)vlTKn>P60OU8+ z|KB2-RqQ5SjKJFnpj=ph#2Z-^kOLs*szm~Xx$RxbzzE|5>VZrNnTn&t7o#W=+)0z} zoy2G^m4dyT!Q~1Cj_T~UNRqpZEscrPbV3RIoT6@=qbd3Cw49}2E9HVdGn%^aJiEw| z4AN7n_{|pR5GLP68%N=}k+?4<@DH8}52oI>-ho#_>?BMFyN5N%aR-srD}_LyMC%00 zC>BVJF0{7jGg2|7WK%yxmc)CN))MneU+5z!vu=(zUin;&%t#b4o;s190c>M!6cpuQp{6U+j% zF$H34?Pqur5rjw?hC0L_m^|qbqM<}kVKbx?=;NaL+=5qHg|4=JO+_*&Sd0LMHs;l9 zB|THQTEII7h97bR4p*WnCC_r>>&d50ssCweVVoIw6R}TH!RZ+SklO3CZ)43`eY&Uv z&_S#Q-Y|lUq0dHw4G)1#4YLpc`-SA?%$O>xYaKbt>23Cor;sLjYmE=G%SM9YAXbps zu$UX;NU$eEnnF){Y9UxkPl|M0-LwVCW(mF>5yys2pztZuKqwuQ@eYNK<_|{Xay%Bp zMNA>s!o0E(_@>OR!srR2I(W)bn5&q@-8BKc-YAOwvbWzJATYyJi${i|&oTtLJ!Dsc zRZ%x27qTYQH0lT_2(}K}m|i;&_9YZt+gItp=K93&fn1Dp(nL_77KQ-0I!YSF7H_c?s z^pd(ue>f67*P-^&wS&Q|kEZs{;|KOL#iw#7fdw?a3E;G(Cx;^wSFRdDDAuIf5B(NQ z18t5e5y(*H|9)T-awe4Ns~!I42(D<+_^`1`aAHwx4@EB@LJ6kX~vTHg$+E3#C_mCM6e_^{if5Lk7Z{&AgdQ z7!J9A<+$gLuD>B=`Dr89CSTXbckgq!SJ>banl~n~tGylKkauOS#mw#vM~^vOx=6GI zj|$x4_{=(`sP6HoNJcW3ip}6QMYOpCN>3;52pz6s!I;BmD1E2*1{_CR6w02-oP?io z+5>qmta@-mD#LwjK7F7~%Q?>S7WAD$6nmTrk-djT6OXb%OKDfoZ8UDv!dt+wLOO zXDaBTpg*8YfjFjU=;08!x+toxm`qSUHaLQP7{=v?O~j*kYqU1)6({VAr%gwh*c-uw zX6z5<=3IzBfH^i44jsFU&Oijx&Ot=wAPY@7c<}+r(Z{_`eF!w8oVG(pVq6(oS5|S* zTL{QT`BCj9HojIdjio8U_OVeVM9^_n9R%(Ot%FK&1LF+XV*ofTphCS4PI#~iz)Zng zU>%7h;8?KQMy$dxlu!`HKn(ynm{q$JziNeQU*)EVSU8fc=+9|rgSGEXO!(?~o-1vf zu5J#L3@=Y;@;$9!z?oI@g6H{uDm4(JP3V5OfX8+CUn8|$Yjirbf!uf4MEP019Mi@Twa$g@r7bP!q@qgp92ryrp8z zd!{xKBo7P#07FR5HJA)T_Q9lCwoF;n%i2gQ_Q$jI zsUWRD-KXKxRSxI+w#j(qp)X{XK6o@?k(WD_q4^+TrkO(zkR!o{sT|5r4z>X$2Qn-Oor#!ikVAQH5B@t|2F~`wiN? zYAR#$j_3Ge-hj1)oidTRPa`F*jgBUdqq($b_y)BZ9@M59)TVDxlkT9DsgHMD@4_I) z9hj@V^NlUWW@a$H=fK|S@eLqgh|dLw=r=*|C*JL+G9~R8yj|N2UB~4ti5);e1-f71Za-O;n+J3rdR+i8yz4?R{ zv;Yr*MtgPjvTm`^-=y?=&=baN zJdomh!Z-i-PXD;dAd4t{==j2jEI-3ZbyOO`bkLh?m*HUsZkQqgH1bC_@}oga5;H7} zSSwqcz5~q%9cTp4QV;NfHQK{_f*h{d%BB(k9SohalS*fBqOWT#5xC1>%aVQ?x$$0r z#CYoz0y6_CG|WW@@+JK=()Ixj&2F6zeuR<83#lx@PH&x>*rbZ)AW!(gK;}timt?jH zAy$7GjO{aXsK9?S2&{N78B0P=)Oc*A4D>e* zsoO)YRM=@vl9Q9&Tc9X65Sd`Z@d2~M_$MKA?^a=~g^pO_S2Ei_d1?}Qo=W-ynzF>p zDf!uF?CS0F^~>>pL_ZBvq zWFOxDRkBul8MYh|7O>NIFgA`^N8txxKRW3jEM2@-7}ut#E7M`;_N1qUo!P>wWr;i!1aUTjq6lrZOS$SdBMQlKoET zWObDc*VhC%yf;#?BYi6+-f|(8J*5L3?o5~fTg-pKwit1asUX#Rg_}GSo*e#R}pgKoMAC$-warIui?y$>cB`Ntgw@V3bxE zd^epN28_L&k!2X`LyN%)KYyH(r7QfX)W6p$I8X!j>6+fH!r>e$bv;g%oAkYu+?Z`c z7-P@1$eOV3+W|P2^?4ZMT(<9Mdz>pE_^wjSAqS0XGY0n{g{(8&FFs=q^Y(~XB;Xn{ zt_OIwVl#M5pG?WLnD>;t0K)(n5Wq%C8Hd4*#S{#6X<%AmiX256KqwlzYNn8GdSVu? zIgnha7ZwOKxw4>XH$RbguYflhp#;h+i?mvi8!c`b*^Sq1LcJtTr~h-Meyd!2#@#W>@h zc?6HcW?7zKybSO!fTX<)@JGeO zRaPl1_q!c9k|D`ZVkGe2Y!|3u7R8%R?$ z7^G^)EoFGY(kAhOe0=;j99%S05<=CQ5@_+baF2e2?$NhX;_WC1-nAj(wo!iv=$@<6 z&6RHH4O~qEZsDs$Ue$1)dUPES<$pU0 zuCHl$=ct}E0o%~r;3bflb@2YXXj2V9Q|;gz#CM}$2aAmsuYpWoL-Hh;A0fTCpSG7G zKhy12cP1<`D@U0rnYc-GGQXX)#M=q|dXiX&QGR{$F-v?$vlJ&Ey9vriy*~}1fS0vN zi7cYIuKK0~2~NK6(mo!#A)CG2N6b)xmKleJ=@Kb)>;%w{z+c!emUtJ$nu$aVK{QfO z&_#kf9l2}uJ|pkkNhDJu?_aa^K+3)A(^~u>thM+7b{OWE{#fbk4^!fY?ri6=(v6;z zQ%6p26s~O9-8ICGK=&s=^iy;(GO)*tOL6O(Nh+n0t}7`?h`RgDAWQdSQq219%8N8R zme}yUyxayChqikS%Hxjw?B}cc)&-$4rH!^+kVk~t8>n@WgS;;uOyD1yU^EmP*LjJOUepx1y00hWtS zKWDSTjNAtfhVl*5wJ+`$rE4ujVC-=l4~TJ{xSnyC$cjnRzgajZ)ot;hm_|biyBeFc zkBCWhR$mJjft|%i#rR6Q4R0-pWO|u$EJH-v z(i}W?NfCKiY~&sT=!78Vf;iOo6sXBM(~}k0Are73;Uh08)G7|$sQD0)*@3jX9(5NOt<4+8OQJEQ4NF(4p1oO*NZvn2>-%e5#PNm)4+^cB#T<3i%RV7UVW(fzNvYd`MoSD zY%ts6m#|czY4)&gQ(BpWZ@8I$of5xx>-so61w(!>$lCp8&#Yar_STxAm#Sl?0 zYj@vB3~T2}FFi`c0FK0&5jQiQ4@W(LogBje2D|5@x*942Iz_1Ni=K z3?LZ-?~wuY%tjV+ndW;io$(z~wK@KO$^1Q%*c6l)iw1WYV$ouN-l?{Fq5V1vXN<;XwP_SSdtlh2 z!5fAxJO!b>Ka63E2ENw`d64)Xy5;rN3?ufgURjt7uC=4r+wjnlZAWus9}MHhg6haU zabrLZMdHR7r;8vP=Ks1E{wuW7n*R!~&%yFv1H=@^f)&sAyDcXAED`MGs3;Q+RqMrk ze^`vG??%uQe+7KPfMSvvp7SFybo-x)B?Z$Eq~wv>M@X|rMv zq0|{^S?2J*@IQujz{`Z~W!oJ$V^P3z+K$ha2W5jm;~Fd1D6t5<2|w)-qUn@E{Grhr zeE4&*q>e~%w9#kdFT^6V`u@_QC=jm+sHW>wn`S9aBs?n4M@V`^Cs7B`K*%PonmU>A zsir6|x1rhN5qAiO{G}*@H@MB)1U7h8V&H;@ve0ieQO53u_xxXpG6=EV0OVEh#BlWz z)Bm;tK~#8L7jo>z6b5jD5EZBxsIRyiarN_Y1Nd(&ry5e6(XsWPXHA}d2(Diez#ea z9e+swhX4xD0-4humLVvR`E8Uy=C?%levlF$L_r7(WaLOdAd`aGh?n*kawMWF(E^$9 z90}nO$aqB(AnH?5fPHQ6Ng{J}Btjx{GzxZ5B9s4pN@T=+BU-h3+9Q3*hompT%OFbn z5{t!mlfIM{mPM4mwYDW59+6-6D3gtLdaYe9fZ6vHeFCi4B>5*+d$kQC0*bg8uoWL1 z@mktGG!nA3eF%amYzF!R@y@Xkam-!1fOzMtha=t@2g+pOh?eZEm}f{7J{0QQjZkM= zQ4VTSs|ZamK4xqkFsDl7^>Hyy#silc&L(XllH+Lc&jO??NVKg)X~)EprdpqA_nUQB zzV|0g#~6hbMA(xM6CvPZyQ>6MVpQZWw`UO{Q9LY4bR(eUO9;vM33Wv(iQ%826YZrz z?zaL-!4wz>$d2=Uru9oKRr>R2dDUM;%c}-NUvVI>dL&w2^_OB+%kMyEAy6!dK*V1O z9LY%Ah_bPlfLTOoaAe6O;`oTNi8wJbFp4?0ei{Q;-utDT(7FpjZu}4HB-fbzkm7 zJL@1KAq?_KWNnF)Bk~L3@f&Q%h13*?$rU&T0C(8+eO86}`^f_s;29ro#pN4J>UA6q z0k@uYCm@2aM?^3$wHdy`qqR(trqbeZ7k7KemR%&B!3)lnbk2a&2unI=qM8VmgN0I1 z(ix(3=0>6|Kj8GV&skss6xD(tCsFH`ReGc`mB|`xK-uxC^>BLFxb# zVK-bFVVlw=jc&C~Df0}7ov18IA$^{5ElSNNWtM~GnsV()^(PGLDFtH7qN2) zHU5E^{Z!R0c(;0O+gzdnt!!f?UMt(63wU!xY`S%Q7x0H#Swvve#$rLj`2Q8HEUxGe zwX!S%wnV&e-*1xpp;i_#J3rLQQs^JH%KN=)Wx=8i(aQS2?&W$6A-WH>vL9+?5zXL3 ztt?D7AqDemBQ3-rmjPhCZ~zkh&y8em=?#X6 zN?Q$f>eP8zbG@C8?c`Rl|8|hW0s;OVna{1Xk>y4}h@Y+Q*bX#0`~lv)t?G{F5%JF1 z?%OROUL46x>!$8(z~s0Iw^Y54b8}lTnkR#1nPJnbXG{ThVk65+ogrx)dHrB0x2{tb ziR+${WV3Y@;iR^PSCXP0sANCavsvF7Bf&{L_G+41HGSdMDPSyoQTj+kqz>mR&}nEt31zkpRT{dn z<4|VSTM`><2fCbOsE&Ei}KEam8HI5VCYQ|u~d6(_4o3K z8r46+pR)hK^`lt z&<=znce9Rw8t@iJdxdI2`4-|$VGUmWPNAyO7B=m%M;PjAwMnr83S`pSDgXlJ&NPK{ zT-%^`O?$29_ODQag9VE9@tzF7>L2nk8t+|cw?{toN~9f1&d!(#fuCWMDh^ zSueEOJVhRb>{Eb%_jcxEb}oLo8*SvnZxDs z4^d5a7O@W95+*}ApSk{BTV{>XgI6OG5JvqZ$2DN`) z28@glyXyK(fv$wY9rWB?>H6-Q@2!yxqF^)W)<9H*9wK1)b|2q%rSgLQ1`9zXRgQ>Z zDXf2=DUb~+_W<^lg?5+RH1MOO&flE|x~GCR7pSM7?$_7Z3(Yw(Hf7+m`6%u0s5atb zUR(d@X}m_x-gX`Pl+U-p2?j&JM-nE*c71HpH2NfZw(m9**57;DRO710G|3V0(c(P9 zU#Kx_d(PNar&NUPZk6*`66Fg+9v!7zk-teGpursStXG}?kG=N~t?aJz|If*sncQU3 z-E=qIPx|?!U#^gTHv^etTGJ2d7-ce(sWTsEI_XTNwjW!Po7_8-*yP^y-kX`p(uE2N z3JMimP*8B8f`Wnt1s7IOSV2KSVTBbGEUcig!WLFoVTJGG`Fg+K=bZa1ld<~w{PTsh zlbrKD@1L*t>-P_^SovnNu?tvd9i%JSsD!dPKhn1`E(zI+ktY zRZ2#Lthy%_K-$66A(Ky>l>YM9XGtS0J5T*>Bd)Bloh*aS|2rR}VDyMWiz}jO7qHeay0` z+ay`elyh)IpWA+OG0D#zRwDXt zvwf|zTQPUFyM{2`nkB}i(@TWz;yfnc8K*x=Qg!8cpRm?FkBb5kWfFIGRI<@&5QdUp zz^W-GSRE_w+4gsDr@}Bg{@uz;#$t*p0U?5hoBI%nS~_FfVkiKGK$XliNYM>aa&%29 zysGu?|Djt=A|k5Y^(`QFEV)>OhKeC3e8I2v>~%SG((@*V0X*sh44^0a1cVxZ4BwS0666w1dDy+R zUr(Jg9%F~Pk?ii^IarmJy#@*Yo;()ssXB}Ou}C(7&6l3uS30Vvd^Pwu8~2Fwg>hcW zzUi4O!i}32pvy&*oQK?(Pv6B{)X0bbe{1>!@!OC%mVt-B!UD!iU1k9egGhc-=EIzk z6xOB3mq60HkxEwkCpwN}$rlcvwVxLx@SdXf8~II;qjGy2&6J}aPS!@x5+#?g=qGl0s760l8=~P!W z$yvB^wtNY_iiLuu_bT9*_ss}mUM!IRP z8UA0}L%~w(Kz#-*lMB}yJLtd~_3Ln1;sL3#s@x^DZ{d@E!FMLD4v)}_Im6NJP-Yb_ zmIGop=O{3Dd(ES*5a$?8eI04Xk7J0fWrKAw*QWnrm^5-~%XK%{dZv_g$}jiSY0klh zzFSmjH_Q1Kt@64Qv@=UimW)TQA?)5?2BNs@>jhpib>rjoT=P9>@lwAZV}3#vI#mydaUbo zA$07criR8YBSK{TN-+w}i{hB*DOeh`%iIs}c)5k3Uao+zkTFc_?AHN#vv0zgavv04 zlM><>$Xc#x{)|h=?~N%3=*f4_oXK+YXNQf2f}(f(wQfcGvE?j36oNM!q!PFbBnI}+bv6u-^+CCNMb&d+PfYvnt?-^wJga=#Ce z^cFdGgJ3!3;=Qn2Yf`9i^MJ_I=sQOob;33-DV?jwXcfk&Fxh`F(wkv9o)J2jEuX8O zA~RHBz+>bv!!nqZzBV3xKR2pwRBp9M#NTC94V-U@3qgxprabDSW_E`=8<%B>cbA^C zEdCuOuV0aERd5rofT^%#9;0jH`Y?WQpy`}-k=eBRs!FC29oGyi6i11ZfAOC=B&(^2 z2$tNEb8*URf3RSB)mI;xd|V%PGNCVJo0r z+2}Lsywbe2Z@Mzy-@1Ff?hv0uvqt??Hc@|wQ)M^b3!1JQH=Aw$31O*$lW6Vh!V0-M z=LJnWU#`)lZ=*hhvCz#%?c#K{+&bEa4R90GR@k2XD^p;c8x682r22GZTQ}v2 zXb+a%rX=)ll7nENbT{qkV`Ffe5)Kf8xu!<$*v|lJ-t9ynAc*n6iB`=%Ny{+!kP4wr zz0PRtviSWv(AM;xDcE9kh$_lG;K&DEtPx7$XpT zkgm8(0E#M11OeKAp40vwDijZz*(id9X66pqO^1zeSoMDAx2kC&x_dz*W4iiGaLSh< zt|aj*A$cy@D9D5ipIH>~$)kHRL7LYZ|Jpn@f*6C}fe8P^2z7l z_mguTkSe!#bJh#p6~M|pt)^Wk<+Y)GF%1<}!`^f=JAamZL`yAhN`4sfl9R&xIrBcW zn^|x?On;2asON!issu0Ei8eO6UWL(w1RuSUmYZK%TRrURKyySS>%V=BDh1xd4^l0N zyo0(NP-YtSLr0I{o=V%{$+Wl=E$Or$P3*`{tL?>Zbg@$Rr?8Fq{G8va32{;b8rG%t z(Kw!0O4qUXsIsGff)#PmwY1!HJ{0@i{gGmZj=zZ8i zF!WvaRz^7-!c^e_HIO-!QCIL+OOo8(Gv|H=hE*zi=3l1jg)1Pes zwtsK# z2IATonvnd!w}3{W56GxfUAIid|>##XU22bh&5YrvYmY%6WGf$qI0Gw$2{%m z?Ms&3M%^Mss-=!VkMVf!I^fJ(hiQ`J-{C#jwS1xos*>|zTfL>fY=uKW?@pb7Iy~Fw z#g*GPjR0Oprsn1jB;WjpTKeMgvVaBu2R_IT$F#-XBIc2!$# zE-dodryR-bBABLhw$XO9^UO~F80@d-Gd&w-y5#E_9cij3N)H-u?WUTK&AvO4 zOwl~e65YaSBkrP!w>hVD_3$}mP5?*QzTtb$DYyXqA#=JX>iYHJw|sny(or3k+*F_w z)Yqs4Be%&^}1_)<3v$K3ppEB3s&o#UJl2_ zeJlKq>vQj(q4c(DUZR;jJNDxGygwn8^3rWCbQkrm{8;i&9jo57uhjM6B|KNyyr;}) zX}sK#At5P!rF*k=4I9==`Sy0Dd<}&KY^uty{qX?fp4Z|xhhGcx_Qy`$N&oC>jGbL3 z=7V>a0`@CK$APkp!aD@|7PfWYFr@gzKp>xB^l=o)~J+*%x*pg-4vVQA6iTbRI*n<_cmmVSNxg%29e z-^TZU(Bzzc`GptP32j4rLy4Zg-j_q;|21d^77ap(8`6$)Xmj!V&gOyGoB_*~{WjS* zF^X?lNE4whI}K!c4D9>3wqO8<9_~psWdg8KVzGX%c^qq%;v=xFGg~M8NS-Nsjg+Gw zTNdH!W2gK`h%Ate|H@@85fO9iaHFA5Mi4E(gg{f5IvY9AB&DD{MI8W~-xECFIy_V~ z9Am2o#NyI~z>Ofyh_l#*m??_zw@2)*2Vy3SH=whrPoAD zen&#;fN#oX*94;%W_j%1k)FRFyiF6WokqJ4ZYeFmR;p-f4UO1#gEh_(cGIe@aWD9D zJU&}^>HM&xU5*l$xN?aQ7G$J57#U9)cb4W6~I z60v<-ETAla$(Q*?r_!y^is#yjDP9|({26-!glXtUg2Wx&YwjDwVvAcVQzJMGmE^uT z$S6GOCiWaT61bV8C^6px;J{tH3-MFiO=*U_Sx>5zIwW0l41tYdsvTHFnu=xxb!hD_ zR(3IpUTd9x?K(xO9l zoNwU7hUbjDnf$8( zJAvP9z7prDSzbcv<-Bq6nKjJsyNO4tS5zoV%&9Gqm#*L zv$Mq*ziAssETLIjUtGWFHx-uV=61`H9Lvbki@pb8ssXc15M8Ajl9x)QjmMY5e1$k1 zRB0;+%8|b{JZSq4m9PCiYiNft%sJ1^Q>)pkSp@Yr{l=N%mlbC1T~|U@W(c%#s_E>x z?P?GJaE2HFH+>h}fBWMZyB%wqcwe+TEjDD}>*I=skdA_x6x8zen3K>Scv2RE+)KuhWLsLJi6>z&pSWVU1K74>rPBrp+Hg@0_D-t@G=m10 z3+Bx*NHET01&4%`l>w;`6M4Lto0zf@d|mlzJXiiw4LgZZ3CK26trJ$M?SYYhiN7Hj zR9->Fq45UHE+NE*F9%Pq>A%LiAxy3>Y#dK63bhN5WUELQFCv-j)W8rRK_a>O^Q{97 zZYPre&>aFF@vRZa=7B(sB|3Lc4~M$x{<>Tj^9jmQe0n;0p-SX_e{Om>`6u-advlYx zMQ6GxfR;8S#~wB7C!NKUqTzM81Awg`o*T#6rBNu~RFW^9p5+604RX3@u@9>aSmkRK zJhJ<4^@swDa;%&oWXlkvHLQov*Y7EejSP>GE=jw!c6W2P7a_bby%cB*bHTzPp5cMv zc!kzy&g@`wYPHXt!SznhQ38C)g_EIg)p@ap&z-*#tQLm-GE$X}Uq>T_mx0rd^huY0 zk8Ju=USCG>vaIlZJQI{?+d6hCo?SE(Z}P%Y&rGBcODW@w4b{S)08uN_N9_5)DP?t{ zXX7b!+RX!$ZbM_w$M(Ab)q0TPPvy$7$CyiZwSg}QN^Y_p6k$K|J{m0d-&Ou z<*;125u2l!Kprh6el$`qIUka|2T+AN?)Z`?+`|g~`g=PrA4-_oEb6GeFaYSqcbprr z=EF8zLy2%usEl1$ah$ERqnzfk(u>_2k-=uRBT`i`HzIYb2Sx)i#%qD5Bw3ebUh=d0b1LPpkB?pY6YRwEvCGnI}mgNru+|wAVA&hIAt90@g~^uP6oOf9}Bx;^p73ry#g2gS`h21H5Z2R zc9t?c_RQN@O5qg2S^ITW{Sj%}s68K7ZHC?}w^Cj|&%v#~n{(x~cJ0Uo9Q)QjEL%L2 zX$ZtOX%8wE+d(BoZJMy`r}nBbOsuNs-G+glHrJMntqY=HBB{k zsb~IxO$qDs=9GMQd{&0-`jyyANIh3S#F@#_Nm(5n_Hj^n_$^BW}8n*`<C*8<}c0MJ8L0oXB3i1>LoVpLj|hM9mY zO%o?ynr_X-;};))g4`j4@1{@Re1#%69u7O}@0?7&X^t~4%X3lMa#=hii1DMr6`-(} zuKI3dcDz+HTnalups>8OeN;^!Ce;fsq#J_dkb*C zwZ%z&8>?6Ybho|Pxhv*zgHc7GU4-X!#ZK^Gm8g_j8%d)oiU>UnShdeu`oXl%*Y@y< zxXk%FPryHeO2C?Tv&H&j^xh+TcF#oM{hcf~&<>e23nW_lwpYS|>1u3QSWIKTX(}X%htMQWHeL1f;eM&h_|%QJLtV5#44%*R|0gg1C&z-qn0I?{?8QF-kb2;!AM^H12lFPo zhSNYC&WkvWF*f)=fOiWt(&3NHl6DW;c0W|?FAR%_s(bg3Jj_gYJmCL+l+A)|;cCPd z+>!4HiqWkGH7(&hL3+x=89v`8|E`dQIF>*VA!1VHhzf#b$YdxD14=+6f<+1!u%g?9 z%=7D>WgG8j8~!qRPy7MDhI|K1M=Q0D?T!&&qs?VjeUIH~rRyFOx@i|OGX7B~K2dt~ zs1wKi#J1d6i@qyZs26A#PMRtks}Nm~Igz!{gFe@DoV?AgZkFkx}*gnl%#Aee{g@{-Q{;Z{$j?p?+?h&KViJiL&Nc9-_;f8 z)$V2(B{yRKKuUy7%i$E%0fAAHbS0Kz-M91|HJa4uaIOV zZr&5R9~vI-O#beHJfQVfU*L!*rq5NXPuaQ3bBnkY<+sKUjM5&Nv_V>lnS9HOSL9eU z@%%Ps?kI_(hlfjZ#f&K~i3OSZ7nb(+cF4bp5tAetn|T;QG)I_|(!v;`VNlo>d5LFF zxJi!;Q`LjOQ+6y1wQ#k~f@Nen@XW*MbRH^MsDNikGFv+f*7C?5dmX z#r=0ZPE5tLwNl#TQ^Rq!wYTPV31`muUaxD`x1#726F5E;ogN zQ?QaIe=MHakSms%wF>|~Ew|*JhhW+@@LH?&*l_%jm0B}sPr<6K)}rr}=l1t|sn9$; zIM09A*Lb1EPYg4kNyz_hW#@@u?i5L`GVGo`Vrq39`y0&z*Cu+R|4O^(6XCwOV2hPE zi5+lZ!Sh;h_Tp20Y7E$xm;+S5x6-AVFIbj$+yz}j+Tb49D+j=twj%5%Ny=wBLaZNx#gHw#`gc`JUNB# z;L=+2e?=GE#~zLs{KuY!iK22R1kZOuZ9KhAe)%;I-rX;koo6iI9j=LY$&WkkPWI6H z@)HRU$18i=txLo4)Dr&^9T~-!(f-t1^51FHyZfET{i|IIPo3E)x-^`Oop0O`s9qTc zk?=oiLF>LhGaT_l0-HC6#-khEr|rzFjt=uNWOC6gXkX8#1`TgkqH9E zPj#;_8i_ApE0KQ$b2ZjafsNt(EMnA*5B92a=yjiOOD3WEa_wdX^N>()gOp9R=veY! z*Z0Z!NHmqYW)m!hnI?c|kXabE3-Cw)R& zZstvR6@B_Qya$8aJA^BCWw>Z|dbPZ*%?Ah7Ha8hCv4OYy}p?3ptw{-HFx^!z{^+qe-GqD-j(NyLYFd-GHrf7I<@58?V++*t1 zP7hcUxedhjXq(Fa(I48=jq|41<~sd*{xl@I3tkB*t20a&G^pX!%QA?h6FMt+xa3FP zIYn@69uszrggq^{h%*?XD&TtAGvfVUN|RT0G1g7m=v&4p-5oA1ddTC(SXn0QAMneq zHmZ~Meydajr>S$!LoA+*OK_o?)Q_{1_oIFyiC6Mej$}S_ADn{M+^Lal#|61Y(*>18 z`1IxBm~b=Erp10e07nxB*MYvN!zYt?)_>!e#wdEZfiuO;reC*^ zVmw=paC1J~A8gLvsa0OGoWCL+kcov4@Su}aeAJVQj~7VAM-3d8;@Rlq!ioI($^HWz zLV^+pm!B$h`zdus8M2N`@!4KN^jX?*DLy+qwv42Os~~#D)_!XZD`{=2x_t|L&_b(F zTee@h%~Q|`5>Ol@(dUO_6eadYp+U6ZeAQ{PLPnE%5`A$vexdVO-h3z`K$=mjG=KKm zQ%Uq?q=Mp;yy>xs5f7PV?_3ZI7Ck@RJ_x#lRf|$PbH-nh_Q53uIzaT~i+us2C-=%I zp1<9^xu*1y=6><_!|~j+&6`RsX@5u2-w%&Z*@iW1Q?2IXPdxG1lVg0+)k>C~{Wjr( z{6}K2s68;3*(iGBzHiny z{EhvG!qxhQ-Pqaj=pS^)`0HE4W3!%?>e}=Yfbn%N1zmV~fBUw#RQhvA`-^29%A36a zK>`u_zp_JPY?ZSwVUDsZceSLVOM^GYj+k>q8b*45?cnMiJgiz<+k0-LSR2j(caHW#+x-VD%pbc$oqnZ_TT!ETI))WF>YhyI_xsOmiz^f_OsGYjXDe6fYIsficZ2VH*FboKH!)P``6 z1Hc9Su+wmWq`v1B2<4s7K)T+ng&22Jt;ktd*-XJAmoLFB-c+d&5J{NIP;%G*%E$`s zztc5?ix|EFMx|A9U|)j zqrDce<2$j&y7E?*YCu6lp~LhAn+IwqzjK*(;ka@Hk|D}eQbDxOh?Px1+1q@+{(!n? zmyy`~9+I^56X)_ODq%?S;^Vf)MxM4#(nTc0D}*rni`$BZlW#tqB`J0iJ!haBuGr;G zML(@ysoV|i*V8%QgTTENm6DI;pKs|=@hfYyo-X)Lo}xzG-_%;sNb;HdBjI=+7C-at z){lVkkC(>gVT&thm$r6mxU$XO+`bD#W@(S7pVIF)9(#NNXpJW0@qPPsq*U7S>=Vk+ zOivxo?HUyZ(BHPW8q?1{wp2Gz1L2mQeOwp&fl_I~e~qZ9IE#4{82a~e4bOj5AfXK# zkhO5a%pCvTos)V}a`5e1&-3a1x>Rs<{$MHo_guJJykXDJZ|&D#TJ*4Q@%`_$+?*Vk zYru!rriD^t(c8_51ySC!)+43((}f-{_N! zC@CN6**R1@TAod@NJq&d3Cp(6eguSuAc!vlCcHdvcl2-x6!uUldgQ)mH}2$DvN>jx zdq?l&p3XAAx1<$>x=%UXTBr+4*;u)A zSha)EJ9_lKmlU}ry zO3|gB=`P%;<37EEzp~}S9H5@$rcax6;VKg5O9EgKd&r*=h!m2!`0mzYNsKq}<{;JM zv=>L3EsheJyP2<43T~G~ztC-T#g_8=Wb{la6DvGo%JQYp+Y&$q*Z078@Qwf-zXcV= zv>sn_YKa*a2rdxlfQpOu9E*w!D#*Kdly|&G#ej~#H$Q50WAL`wA{ayEP7B*%0)*hY1F zuGNX;BL*8VUOEOZVzSGU{x@XPXeqv@z;m&{XqXrrZ|5-2Lfo@mPCz&mezKI{mcQFq z`!R&xl|7$KwcESoY{tH)5*2vTzb7sPQ_Qq#a!1;(KO1`2_O6?hsK*}7Hk$VMl+}B3 zX|e%z?IjoPp;#{L7LPGY>Od0xQZ>n?3PBilI%Ra(HBz-G*|?M+*;?M2EkrutE0{eU zF@@`SjpdszIb+s#c}-B3=oz8p&}GV>Kiw!0IM|*qgs+-4L4yToYOmdAnza9NPI2G0 zsypk5AP{eqQ4^-k?YxE3n|Lh)!a}&ZbmD|{acUQX3aD9G#X>3+NuKWK{8JpbD(cDc z0x8g7t9ESJ)tdzZ7L6r$!$RgzX zHL#=Gwrr$Fv@9c8IhRHgtC-xjqzLvcyBvCe$rSlPHwZI?O4VI}Y zxB!FqgUOTerI72Glgo0tVb*rp2)2-1G$!s>+=k$AkU8pvJC7C$L1Dj^G1eX@M1PTd z8de)aEIEoi?8>XxfeZenFd8CgsT{sMY{|Kn+#cC+2H27cD75Duku^t8HU!>GP4`^X zOcl=T8Wb=9UtBJiLs&`|{{5 z1!l=iR<2Y(B)N&n>xzm0{<=>lZ?9jf)%JMFV>YRBGY^FIDuHZX8RBY1f92AmcF!w= zTrJ;a^1II&{SOB3d%y})P&5J)s4 z9u(x8w_PV+jVJ|Z;7Y9>O(xHo->y*)^`q;LY<2``u2vd@FeJ~}9k1>4KyX7hj?&C{s6Rj1pkI7Q3xlsW3ozZgY-TVQwK>A8Nr zoX5nRN2pFwP93O#V7oNs=?hOcPy#n7j0!@?fJw@!EB zz#9b+*g?RZg$@u%0I|i9%!OH+F*+N0M^h59iD}u~7BuUS;+= zcpOe$NHs~GR>idO%ZvxhKeqx%a8p;5|Dl8&7W^L8DsZ^T(^$uR{crsqOw zul1xNH+E)z@E8xk!Gj}tbG(O-ZrxVD5XRSJL;|}@QAE)aNSXOLb52yf&zm$0852sGGSCa4#ZOWtnB;d_HdDN62!XAsnlLOxN?xCJ)D zt9Fvtpz7{W;Gn@@;?R^hS&XjIVoC#)p7ks>0UJm{m7Ny&>s6jPsREUldm6ZC7x99u zRG6r?&{&`7Sm}b8arrrmOEJgKFPGW1qNi}?EXsa;=e`ljcfDof`voNaT?3Qx-^S7Rh0gi&hlgyV z_aP|Ey;J+?_Nk!eq!2eD7Nk8cJd1vO$Os0Ic+vUAmpTt9Kez}Lc!!raS-^9ZE8uev zSSSG7Sl;VkxJO%_m$?fcz_L08MJJu0s#&;ZzsKzgMXkSdgf9KDq2Qh(?#owKv$Em2)R1f zCok_2-|0$;>9Sc$YFg~kjZ~OM+#F{1Zo1eVAq38o*8FfB;+77C{jZX-)s!GKLy}d% zMc&2p$oj_;my-3qy7BqANqKJ+z_RL85er?|&CPw~pGud#b}-zM`Yq7;$F$tAQ0PKn zzymz6J3$f84zXELC`J=L@Fds z1kvYs$K=^i=_6!VS>LAsXS?Q#s=+tyiComyrH0Rmr4+p_jQ9T~5^K&Am5h{2<0f*u zEw4Ny(F~fc->b_iHxUF#CIsLV_G&o!Lf2kN3zM(Duw!MoNIBuwP-}lWbRn%Fe#>>% zxN{TI{}TIzBeS(j7X!({-9;ORX8TnhnJPb55xdQ0-D*MxTV#@!Vx(w4iY8RkLyt=_ zU2{K*79lfv1bmX@T;IKL@EA+*C}`}n%p>< z4M7~vksG4G3$>B{v;z%A(+JO$FaWg#BsPK5PK&DC`PLTVxu51RtlkD)3rLJMR#b43dA8O zS{uCR;2WNGI`gc^L6tZ&xmy^iTf@2|kFU4ToE-wT)Yc=8aa$VO@WoN#Jq9%q#|XXo zT`9hs-4OT4UsFF_<~so+w{!4e(nr``WZm0!rOw%}1^1750$HxP3r6{f?`$UA=B~?1 z?cM0Dfd@Y2mpe#CFU79BNsfXz9w%HC*}&g+$iHl3w*dSW><*&C?>gH3zPH`)UAx~8 zobbZ3-$%D;NhjYb9}&ya*Tu7vbXIQJA`Q1tds5`fV!Jvdn>3T8RD;p^zXwX5kHJG5qD7+Vi`7tT0dzyk@V|GaWc zK>G1wb}P`5SW%hm)q>ymtlUiYW`(m@%kFOP`#HT2x`cO(#1rTD@i>ID*K<*9>^u46 z=p6%hD110}_A(l?N)rH*h6+d^-vM!Z#Q(pZ*NcuPZtgT1&Ek`BvP$n19z@ad^>$5p z6Z5Xd;|VKiQ)q@eTD@BQdmR7Lz2bvOw_U|Y(G1Qm+i-OF!!x~`#x*}W5>uH2KgCN5 z{4d{K!-$36yX)~mzsGoeKRR-V|6|@S+N@I}@z^#)@C#Wi#-h`G_O!1|GT$kaY~@s> zTQZrsSZR5bgKYB6ydmnT07d*_*jV2N_FXxMjDs_9N8j{0ad1XDd;o#G=)IgHra16% z<4<85MhJOK+@!axhE7!y0O1MSI)z`%As3I9j3P?f;2=nX3TNMKT3kBybi?f)oIh$lw|O0o!wRZ&I$N)Z zQ$ZK}Zmh;Mynh@o;WiMC$4eI$Dk+DOAoq9!gZ3diQdT4zdY6Pbl6*-U5jtc;)J+x? z>UuC(pzs4`!~i*?$q$O(^_hqf0k(wPo7$UQ>b06ngQFTq02W?SI04~C91IFOpB;JT zT#*vb=i-t%gbPxt?b;5#cHA)+ZGIV7!w_l1 zBrffe_y_9nJ#9laxCcH^$BtyzEg*ZJ+A54kM)M76` z5LS-hhqqfc9S_#Z^67Sl*--a*XU9wa#qSa)&e}5cUAW|hZ{Lj^d-^J6T<#eq^u)-( znpuOGua8|`|#44=uD4sRt;-SFe8!r@^sRXWbG>&1qOXxKoV3o;jE>w!Oh6c%v(E-aN1Aa zHy^h@+ik3z)?|;oiD7g?XP?nxaS8tkGLGCL*S|a&2 z7vQczoZy;;%G!l@m&c=iL$m%`S+3mB?+P`&cI9&WK%D2#$>yUhKw;6W!c`Y($&pW0 zWN>$42ZX5ttJ3Y#62^BnrSwt`Ec<8|i7Dy@mL!DU2ub3_oxG5l<%Aez0&JVE?cONx z%19RV#d)GPY9Bc57M>HX6sJU}f=+)PAo^b_10iOk6>tJYB;GRyC;Nf z{LFn{{u^G1d%ke_ZbeyUZHIv^(hVNyy?3pEK$ZIdcU8pA!b-QFGK`*dHU=Xz`pTVcG$UhmXYz;iLkf zysT~99*OpQXVMGy7cT){lgUnoe!%k{72sO0L(d#wGl*)zP5+8ZYDNOb zR|pk11H@VRBEw#2tS#k>BOV83Io9_$i$9R;g|metVl{zFa7TzIV;gY6r+m*bQ)(hQ zip%`|MgSHA1-V95@eltP?ZXRN3tr@nsh|YoxR7t!*?vFOAVVY0rq}^+@Nft;8h3I> zX0iEDz=cK#Bym)*&iSu0&`6)ldR=jmquy=p!Q?-kbAnlZ8k-nz$l1H)veO|JYSF4O z(ISQw_DytDV`QTqfj2rZH1@Y6lhNPaHwOB!$3Pz~V4x3=ltNJ`cH!>9;)?!H<~J)@ z4nZj*66KD)YhJYR>0@1*K8gx>3l&PC{3F7_tlzaZzPG23#d#OG7iY02d@_Y;K0FeA z+*bNYR{F{NUg@X&O8>5~(oc1*bZ!ZlrJRn@$Bt!=!}@Q zjk>i`B^R*qJK`lTds-DZLt|3$p!<|n(EBI5&kxE16QmxWsm}z*PYI|tGiUB^DVqKgEbs1`7%*=_mA z=5z#9@Oir+=n4ORBy;xLC0`>3ky``+xL?LQp*Yt`=TIC+b7IAUo0wdj$Az?>JQhDE zyNv~A7rk)?aCy^SZ`44Yo%hb~L2KOl;z<070)y#KP!`SN1YiQcc;7d^4~zEYoK*?i z(tFt!&R%g5ZL3=-78MT9t$QW=BeQfrF7G>EfQ|Z;&gD0lT;EC{V2frTh~eQ&;;u?~gnfFz1lr?y3=WruMt)eEC=*?ixoX0fX!1#HDa5dG?$&|4V& z-Es|a187S(kcKlxb2#}~xFLm{`C>N=2RfpSmx=VnChj8Fnl(COK$C^P)7eYG0#w?9W=JoiHUSEa4-oE?v~0aHQ(=bew&9-fNGzRjxPG=|Q!mU~^1P1j zGKHvh?7h+9n+f)+5M}y-CVohH*P~2(sle6r8AB5rFoJVCRV_Q;J(|!^xFa9qWbz+N zgC~zyO12dpbI&@JZ0J;*kV5Gn#vG%z>$y>{;gnbz>R^C1o!5=MgF)?m?!t_USx9*nH z7GW$Ey&kOIMH#N!0Xv>_s`NKT;@8~tr1HZHrGR}q?XGY1E^My&WruCLb5Zf6_cDh- z7F<#gVJGD^#nYi^5yPP-4++%bRiM@{r-N)9izb&W^#KV)`@N56T(#geN+fpiT1gfN z1bYtBLHzC8!(cCVpTxuBjfyLb@YeXoebXlIcv#2@`VTp2%3#N-m0YxYa3`Przu``f zLP=?^xOqxQI^XuW1>#rfxs{S=W2$Wg$i9aAm7Hm;|ccbIKn|gO$Td{#D+4%oRtuh3O)Em zLMJZ7tDy_=?cjV-8qkkf4{FtSZtmzN@Wd%4E!++bvph*1={DVO73o$UpP2O16@(3U zKNPfEJ!gmqvT-~gs#xZ+X8H9xBzybTNNF{AxG%!3vqsD(DIghIynr7j!&Q#H3WJ@R0(!GatDF4Of!8s9VAX@L(z|QcJ5vS6tVT*G9vI|7&*7D1n?u z*Qg(FLxb!~OC?)?f&FO%`-5}^7?;K}KPhq6L-3t0dP5?weURM~pZ+l-weVf%yoOsb2QC0W0uzT&@$A}_mc7XdSeHZ12tz0V%CgU zrtP}Yc1q!EPPDk>w0<}ee@5E`L|u1YIvu1x|4M#tEm9fO9!}!<3w{#U^#G;51or)Q z?OP|}#qf$~ay^QoAKo`XJms?yKbqujS3f@T4rnpg$@Bwj-!AL`VyrS8!d8e6Y{ows z!TW4dF3ru>Pe@{HMe?WI`qSs!FivFzDi7{A2{}aQ)JdJ8jsS=brp9;@ua`+z-1nX{3Qi-(lP~yR ztwe_eqfiOMYB7U{gGKbR>p-Y-e{;(TXz*I!)aWhS0_p1gsVN#oaoSEA+vNlAn6h|v z^Ny4qb~0obLk;$stLH!9K4lwlKk(pZ+VMLQU&-{tt$*Q){DaAfU8GP$gc zyy>6%gEY3LO8+btG5BI3QHQ!_wINqy!2S;;pR=WPZY9*i#A4&){3U?8IeUc%H+L(6 z872yoDh@SUH*}aA5e{pgLb)a!xwpeS|Hvm;4Tb z!2cAjba0PEgHD9kyqN>d(dC3Z>O*#*heqRhxHFH3 zRc(j@J$3?N>w<&%pnacEVzt&gM&lPW%r*V7*mX6PbFy8#M9va5k!S=f_|V{K6Al_? zWHSa1kd-A3RFe3W5Hzt;Ym%QAN?9C@kO?aX_wZ=E=o|WWyqI;S{55n+wMRzdfAkIV z(VX%B8n25s49vl7j4BY#EBLS7-l?rAK#gdGs_&wp74xmBmN;5;*m%7sB;j>)*Lb9( z)pl>4neD{dy<_lp*{<5gcP8DW?BoD5%Qz(gge#Z*^fUb)Yn=AC5^ZV!22+CQO=9)> zzK$LpJW(9vT`teYj)%lQ;L`4N-g8SUy5@8;y+~ozy>@xXQ^#lA zhz3ze?it9*h7tsm=5_F-a2F3l+u<;+0hl%q@}BeJv>`>xR=!;nczV>~z$g0Pz$g0P zz|*53!6!#Sg8JXkdqyLE6yU>)rT&vSB$-IB?)Adx*dSWfL8Y}}@hdpyHpJaIQWqs3 zTPn|JOKa6ruyGAoJW45Gv@<@>IhkM7CywG}AI8|LrN}VSm9d3zZ=#DT4i@fE_QjAH z&K;1uk-CN{U!p^J%uQv!hEEWmE_Yj(BoFgP!Pz&!X4d<$WNS$bci*0?9(A0n?ZA3d zAn__(NK>og7_P*f3kgcVJUm%!OYlL}7NzCF7qYLDD+l$AbuMWG*=EtUQkHX9+H65m z)IkR9#Du>m7H{nKOY4+8b$}Jhoke*jc*2Trt&8QhlElV7`6g;n*v>B@W?2Hzc4OA$ zjN09b7^_+27GgAsqW1{qRJx3kB%6y%19pPUmxT%WLEUtiTT>f`zDPMmLr!`$=qQln zI%_N)I-_*iiE@ZvmMnj%E|-8S82$*8@GQ9^Fic}CW?a4!%Bo-Y1+<*DSp8{@>bojs zy4*R$?rR??K8I$RB{(bhIobgPk|jzLr)&w{vnzwH-5M#p)aS1I#QN4b`BYvXLU@re zJoBryGmeT8AbN}VP^T6^)1Q$#u#A()!*CM<*h>9)yuJbm*V<>!WJGO^VbST5G&U`- zG7HI3^pZ`_Qi}#AvwrJR4EOIjoe&m;FNuMjyMu1`2F*oac*n9M{x8<0?IB;jswT@3 z|JruzC3NcMgyTG(rHW*CxyE@QN9}HH6Ga$!z)BNXV2!>eX+rBI11;^QP05A)6Y$rN z^H(%ldNE#dS1?4>v$r2yUt#*jQJp!njNiCxz5b#umYK=3PP1Lp_Il`J^RbG4)0xBF zg^}bZ_{q0QM^Lyw@|bC78952Z`Hv%PeWAOqonNK5_v1EMYhES1FDwA*^*y07Y2}oG zm_J;9eU!7n0SQR;CB7G!ZMc@&zJNEYS(l2TYF~w}W7>6rKZRzPmXV(tWdm5Quy(bD zf1$bTdn^ei*{u-CXOR>ftcGc&3%<1nAY2VUmzhAqj&c^^ST#+bnp8KMDLJ0gF~#F9 z2Zr_R0xJTJk^zWYpsJ;-%g_)$yjZzigSYhnP5xQat@OPE_!_;u4_8|}hIEyiZQ73u zRtTcSLN2pAf02A8yvWqnA6zFkfYL~3&d?~lrSbZU)42bUT>{fk5?z97XMZ{Y^)E}0 z#ioU*DUzgYZjLgdo7%uTbhzubg}ta&*F9#Rb5{@IR$Xdg4u?G?^cCS&z8uX~`Z+8F zs`=sYEjzO0bSL?yIM5|Q?LYda9`J?!l%NEBVak?nU{7CQow-wI9QVP{@;>cX$6P%e#<`40OrtJ=)9Uw+5s-^PbLvn$qYLJIm)aj z8%k$I1Q}4uSWQPRJ3DOBl1#5dCjUqB z2^?_>UwEn2D6FL>11!>6A(uIdOi7gKIf(5NnFJQCAwq$Y$e0?WR9Y=lH-{@>F(;Dq*wU#ut zwdGQ2pu2Zw_8m(4P=Fi(!7HL}N_DhfM@{ik&F6u+;r{ZKLA^vYMT-`hfu0$S|HTVq zmgTIdf#}o}k>HG%=M=hgodT-J*HgH`E6etcQRigC9MwmzXyTrpR}+ww6WX4+Z%O6} zZ#1JCMV71J#(nqFC%NMD{r9X_7@8FO0@29IFN_&=$^bWil}S1>eF&JHXL0mxqXfG( zrCT?0A@FoQC0(-7h8=X~z~y}reEKZ+G8;s^ZV*H4MtX;Y1*U6)go7HaIsYgm+3#!T z2+@<&f0`cr(8rRm>*H*(`}NZXT3K|oX9(7>DdE>-*Xelm zoL=qkNl+}6`?N)>u9$C2o<}l@S1PT8`X=>v4WHO4 z?6&rk_~MeDpL364juZ>&5{v9LZg(uVs>y2(wwqxU#SMEcTVr;}s^lUyAyx0;TI;o) zR@jis));dt(Av)@@i}`BHQU}(5x9O$s@BAJY-ihQXtpiI<$f%0;5-@p#jtqPzcHvQCNrt#&9U3B z-KGSauZCA_bun+XfoiGC#2?S+uTh%!!0;^$wR>x@j}GQ3701-;n>{d026(J9Yd(pB zh0hMyw-q0=3+Y@V70gQ&p@*r{LbR<3j&I~Vefm{ypiIwNlorq^~G)%_g?Hl0@1U}5j}O`idG z%}%dtm9Ki8PuM9zb3j{tQPFDnARr@4A?PO>RiwbJjYj-Pf&1cUv^_e0bTZP*fh3FG zcK>wk&a>tX8YMpyS(ZN+r;7px-3K~^4swJNEW~$1_JT9Rz3ryEn*JL}^s@f_d&)~3 zP6H=fTX?rsx4gtkl7Y$rC<3I=T2)T9TC>zYvJ9>K1{E@E&4bbSIrzq9-I+zD=GmGp z>;E!<%_|}a&~w=uyY5|dpeg?CXv7aYJvSG9`0%+-TRsN?@Ya&cV`5kE+;-cdL9dy` z)ygucNXLeM{KX_*>DL@8lZkGjMnm+`qt0Ltorxo`UVtkOL6mGfr}_&~IUX0@{P~G^ z`aJ*odpQpCw{`qD2G7umHjJo4lti1&Z3=%hznjD)De*&~j`EKeFS4uXTQKQ+ENIC- zTVGD%b@oC0`~Cuq|91PT;#)4aHs-|X3(!$i9Ny}(yNJM@$Xz%xRjW8_-&d*Q*70~g z+#kcAZ=Q%}-X}!r78!l~@LQ7~X77z@e*&S$v@NLOLg^5$&Nlp2LxKG&W(~~zDtpES zv4Fc6yq|_#>$fiIt{Y;+`uJSy0Z zS}2BPnm<>@Dw<4sX;?8@C*yPL!Zy*}R~_y}J%8jIi*f;tj}dpJ^O&2YS>l ze^X1(hEKsd{~OAoTr97KXF`K5oJTB$hUf~vV0%gTLW2wl#~_hGDC zD@%D4<}E+8;9S4#NrI1f!{dGhfK*)iKB+b{$Uu)zjGhOG;$oOAr&KXJc8H_ zC!e57MF#s|KtP^odw;MUS&-6$rqC$>#!)7w3Y$z_6GLM6sN5mpi=Uog|3% z|Fz=d@(g*{PVZJegu`h2;1oM$a%8&T#}M`eaHGFW{xys`vjIfO!_zL^EE@NhP_@_d zOHU^4_GX&*wT$BAJa$wO8Rs;L!hS0}(OJ3sMwgUDcsAYg_n!?AG>eAg>j~IxZlRw4 zC$V@Q!O+6Nwg`W27PO{lI`>eSVo!NBtM|9;rQ9n{>c7Zsq*BW*^zr|qUV{*fY1y;_ z-euRTM?mF}M*$KWEp05wGejTVFja)_wnZ(rN8+VWZA}JTr>e;Mm9ud^U1`qk>gVDE z2361oB3ZhA5y|ue&{kp_n=i2sh}&+`lgWdzW}RK00QEQ7Yiu7}lyVcaX9)k|wJR%J z8Q)E~7y(RdJGr`sVKpFH_gCYrxm>T;6A!MFAW)^rb_#B2b zLkvOub+A*L{iZjc%a7C41fWJ-ArMyZ2gc?lgTKiwF3;N8ZSQ34<<29h=sqbuZcx#Y zwtyvI!fTaoKLKfJR>+TfwSHdOx@VO`KM`ZC%s?LRP}i(e;(gWQg&+%N;&q^BpBjxH ziA`00K0HEhsKIl?TI1sg13lwm!Z^*^T^$h)90e8C%)H8b|n^G=u@VX9el*`!r{P&YRW(&4Hf_ zyz)2wCWGL@89FeQ;vSB{0VB(_$*V%GTdzDMTo5+=uycix!q)5ZJ-?f6j@65RcOfT* zu9$Ww``+)*r@K$P)kmsOYBy8i8*3@%ic90+CYLElxx?hclox!*Va>3|;@%C`@^3mm zxwmHEivl^+17Fs^UmcCUI`Hbv2~S)l6A+rus;hHY8aMtiiY5StN-K%pz(>%2y?|-u zVDV{g0~MzRb~%%`brSkmJd?8k-x!T&3LH(m+9BaeZ4aZ8DTKyM3xr@AePi%=h3+Ck z41uc(?%NL!#U)kB`iId@KjxpG!0-86a^m|gyA$zSH1wU(=sO)gu`IbeCHWgPWZn8` z==-A)KiuY@pWyo+9@%yb3E89hK$b`D5+LPe!Ak9AzWs zJG$yxeq5Tlias103b!YTI76yu;ttO_MpIq@APc;mZg>;VnzG0=j?~}m)NV%6Pc^w8 zC(+OK@54jUn@5`@qh8*=S=&6=Buh{{RhSl2F%U;V59$LZrZq+5+=)H7>}JXI_0+dH z7OjZSlYPa%aLtowm2$ITy@d~sM=M<~+y^J3=$8g~4-bt;zdp)Jj8VZN1G`(T$&Dsx z&E~!Qw5B`P`psy(u5+f4?G6@kabZfA(c-pq-Dl1Jc@MiuSB+-JXB%rrqio-o0F;B zWztiAE>PL0)o1Wv3pQQoHuSKupZSkTjfsHk?Ndx6%?xn5|WXn{9PMlG^#p0XlVD8EcQaqoVdoxzp9LP~P7 z`$xj;Jal=!7cnbKbvvBAe%?ha1c_Ga3u(kOyACBnx*odo%u7-2^*vi|5Xm#WM872m zR_J2rZn;6>(V9pkS~1%<=Y!#|iG&iLMF`Fm7(sc0?=H>LeEat|L=yv7HR?P@T{oIT z=CA9*FAb#dZnFwU;@Z4q9r|7FfHJ$0CzBrtKn#2WoaXLSK~rZkQ?9H!f|xXN5-j(? z$>@Q@5e-BS`3Z3az3J*XGtc07 z9&V6CIR9?$A$m|VeduKL(84pUmw@OIZQ|+U(L0W?o>{HOuO-6ZbRXly11CGp26wuu z%=FAMF7Lj)X@u*-P(0@YxGtjH0D=zLpk-8216?YjN44@(C!5G= zHy^LG_SRbM>X|dQYnx}z=nCvFC@e|CKXx+W2S$Dz_V9_rX{mu!FDbpeDhMl_%&KKj zq*GH1I`F|eANfiuRrC6WusMkIO4eO+E20WXi8Jiz%A+sT7H%7rFhF=U+t)y_Ep$On znqZ`Kr>hs)UCw)N6(}p&1Jwf;-!k$CI8|4&!K4&q>zG9N)I0XN0Fz@0zH)uLDeCmS zPp@SlNhxF1(XXcE&(zzMzR=mFHv{AtE)mc9kV=+Elhnj7&$CC{Hx>O zmA}7ct#Yb`feSEHQaI=(M}#h@vWE&TZfU4+uz^AueQ9+ctpC&_Bp9$^OCTqcU(PC3 z!c;T3(S*&kVb zND8Z0L_pn_H5o~MQCxdoNzrg;uq5~d5W&n~JClB-r(?f2XoFONi)D=Z`iuU`6m}>> z;wiapy5`rp6(^HN4HEL3bM)Qt9$JOXIInzIg}os0>VA8R_5BUg9ZPQ5P=2}QGNmoB z99QB8{5r^Cs`EDPxbC&DcEE1auy@)iWiw89x`!T6BO@Uwro;;Kbo2HIqX?fF4oN=(dqgQj?TBvXdAGujUHS9m#n`nHNfA0#5CXUF0w^-$T09g$;_^GVah_2LkBYj;^nJ!0$m4QabieY#z&$g3zoG{bn;j z?8zZ@&MfL7yUAZ9pU|;oHhDtmRP4r?kk}>5E^-8}@kvp$FUHY(P7YGC&t~fLn~f-% zkJp`VZLU5SmnUzF-O-pLDn&+7+@G`nxPnz1yK60s2FR};++TQi`CX5{2n*o#m4lqq z3S8*Y$rxK9{W%ZxoEg70ecT=j^gSD4x2dxVyV{=Yrc*7&bKFm7OF#s{`EuIxxahj08z;R287CoPGT1p*%aWt$ z`NJ8;pvLc0{As$KxwaIyL25TfkrC%hS%c6`L3vU19$nKy? z`33J77a{fd5Mm-}VVM(RrYlWx1U!nT3B=Ii!@DT{fizmkiSZT|a zMU?d{tT@-9>u81X45mC)JTClPIT?RC%OaBw;T2a^_u3)c)fC5R*&udwS%ja>1fh! zZ-t~KHyOoWOCu__$=5A1UArq@ zgor_;Mmvu3oY`_vKm&~82y6M2Z@_Op@V$_GklL{rz;XIJnJG{<2(*E|?4K;=?D<-c z;qhx`cRV;bu*6{ZlzU-&p-0_c)xo(sH&Wc^3jcK3Gr$GwK*`+2TB#N5)`w5)Vls~mq2Rb>{Y5g(O=$1cfta;yIQ(;<(WRJ{!{5$ClxG1 zK?E#-z;Gf@Zfz){lz(VCnML1}Z7>spCFl1|GgWbBV9-A8kkGo1p~6%Fy>^E#E651a zZg=nA4x+yMtVaC~7}AWLmkoHy2yrP6`|04>Q9tg$_TE13bQsKnJC?r}Y5B@N3VO`O zxtT<0&$%8V%Wc z!g;@wEO_2pTyF6Zl?`RoL1^`+1+&;_^EZf|v9DVn5!+$@GK4>CX>IPLKGtE}X*6Ft z0w()g(ZZL9qYn>84~E72@Svq-ousaAW^oUcE?-=ZBD`UbT})>#3pic21*ef@A#!Sg z4|7QuYS}NoPTuzGG7HZZu!5(RAh^j`l*_p^<=RKVuZrVGS>_PvhH^?%FYywchheB z#FR##Kgxce?VeVb(JmgFcv=~hxT>lq08D`!5+!opf7j#O%E|mm@o4aoiT-}@CC$&f zmyLO0`6=y0$6bqjE+BV5dhT2NCsC1lzsaxX zJ$KFh7)ndSK|OtMW-b-^-n>hmpkOJGz)koVBSdc1?s;&J;6y!&OMKCYO#(P8@{$Mm zDHm%YDE4_kOwRAqnHZF5hjbrE7lm|Eb}r`JkS^1I*E)_nJCnXa#Bkx0hFWs8;3+po zj+QF6rDZvPTAk_>R(LX}P2w{2f>Ppz8_0;)k==LT-hQR|6>q0eHJ5`+^W1eQ$7U@d zSFw-vJaG!>5qGsxUg1NR&`Cz=EVi`FIx~{IR_vnXGasQxD3-LOfO%oA4vMrutRi3P znXNmmKG=NTbIezp+f-SGuQGwwTPOlo9uhTddx5l*lO9v`c=kHq_)O00^!Y9DMybP9 z&gGH7ori!)x)2F5#?M1Nk6bkor;;}LlUQ?#uSg*#t$Q6}cR+fh4S2b_g378_n}!B` z*MCN^Q)kzN?QCEWg(B&GniSkKhPV{vtLq(MPRJ7C2|z+9|J>2@eB~mSVM>4|osZ8a8eaZ~ zgg#h8bZeRttYYr_=DhFLYoy&VscZ&3NWQaE{&x3j>i!}x{+fl=q;upOYj9g!AlF|y z%L;sut7}E#F{;xR;;S-A@=~3stZSl|1ld@2Gj}C&mV;TXhc@dMpKab;R&a8G7keoA zx@9@aX{0`OiL}TmDAr#0^Vw^7_UKb&yCRkRE2}By0HJV4w1=hy<|u%!*^nVm>cpEj z(VPXA%^GPC7nyZ$1;ZClj?MTyKX*5GJtdocW*<|A6r2049$Gr(m1-o=MUIjGJZ+CF z-nyxA%{(LdYd!~=JT9++C&ou;zVw{ zrM7C{Fk6jZDdL~yamRhL#~%ph;maLD0Yi6tY9Aaoq2Q|>?cV4W9^P=mgZ@cMrBd{b zlch0EYdPDy!bD2XKAuG1IgWGo<4Wo6CpZ+9o_!bTvrq8+U4`eza67kN$C=BwOgNdH z9*@3*F~scZIJNpLo}5+dko2(MJ(*l*cG34w=1G;lYds$vALl8;AAkO^AGEFdWn9@t z;~iww(;H-o#F8OV0PX5d)qfJPH$Uz;nfaaroVWA)iS65X^wX34*va6(=0OCTUX3!z zNLqFP@rig=2M``J#?Slh$<{THRJ-Ps8KC%EVi>MjGJ(=X@VDwgG+p&&Nd)o7RCzQ! zN6}46c$b%KG9KT5?C}Lk(wJiFF!*~&d4_m)3z}7Dfwmvo){aT>KU%$EUZr}3V{ zAi~flMNz}jp~k09I2aC;J_-3$b<69}afR0ItDaD4NyB-@v4vA;*`+IWrLkwWQ@Bhp zsF7YegpCN@of65AzfB-X-oGgQ9;_SrCN&2f>`5JZv)oedIaB<&^cvltl%Lw(fg3l~ zfT>l3uae98!;$l{)~ZQd&iWr3vz^IyXl`SO$ zNrx>%oxzT)qA5i|o%#(jLGl?2_MS+dh|gz9ZE=})&yDEk{Zwn@N~90Yn;NsVJnL%_ zUX1a~ipUwpkX7!VU~FK$RYcCs%aTZ%UeVWC1@25qhfe4Ct~AZ1JY+;o22u``q~}r&1EwUEkku z2}@W7Vud*lWg(`-WEWm{PQqo}3&sZD%?7YO=B4gz?uG5dn#zsAWhyA*Jabzd#hlOf zTUk{`J7HvxSAk<0s@(Zz`c`~+9C<{m*|-x*wf$M*w$Yg_GC_ww%QK)BQgXNhGg#s1 zoRaqdR6xM57;>LcBXo|+J)Hx>t^i=1)k`g8if`*GxenYgT1-1YAL+LWM~0 zo4HSVeY;$)3xp_9V|2MjUM zTqcmw+(;%|3UtoN%tnwh3eycHL^IPX0bH|pf|2YPYbAXJrQ-`OG69N#r zJ!y7%(n5Dl%~OZBCv6Amv0c;G+%C7_v|WKzFss`>jQ%Wt!qhl^RBQT{0*fZGsdsd8Z0Ac)T@?Z8EU9NjMjqAr%X0j) zFN8RzwRKKZo2?%$b+WxUGsgqdBwO7cV|+$kTVOwAdjUEsl0#O95xHZAc?$0#+A_9KSwa23k z0+Wox0xM%)4Vl-r8J$8bP$R_oaaJgocUXB5V)zsXjo&JtHN_ASqxr#(h7dTFaasy3 zuM=g1D-iTFTrD@BTu#tlhzXT-7yH-*ISX+`&|LXEMP7^Pfz-e?ai+^kNjng?Fm@6M z_2sp9js}Qr6%TJ`!e~BD(~O>`iZ7Rw^V1!=$j*##u$tnhLdp@m=SYGh!1hd`ek036 zjZCh9#ZfOUlW2DcLnxuuA64cFMuGu+Y--P5bP|Mq19DkPj484ViHS%Sv|2Qp&70<6 z+=@+q2csQ9W+}wt`CMv#xyML6ccQfB)Y9*8WtfVjPSo_8S!F(202B%@z zzyQ?KD`bupO<8hW>+!88wk~a5)_Pj&8Lg{Z*S03dwYGQdR{FhuPm$jNO_C-V!K=^W z@=%qG_A4*~zgH<`Hkx6VJ1`W#u)~ThQ*)9WfAFR@dQ)}Mzw`$#YK^tCgOb4Xg;q{H zcq?nXl}R#1I-j`0+UVQg*uv6-x6th^gizEjtA3WprH1a89lY`?uZ-D%7)6p~c<-Cz zqczZ!EN@L)Ni5CHJgw~=gx&=An#CrT4GpxyZrSf?+EnVr<3^34dRXl3EN@Dhb=ZVQ zlrB8Zi;w79cswjVcH3i9d_2t_=f}s>?eXyV_%eH35Fc0AV{?2w!ya3bQUIgNo{z|$ z9j+s@X9uh`dv?g$vS$bFS=qD0_U!E0fg@{R=+B`$DtmVDo|8R0d`HLUQyspA*|WoU zO!n;XJvV!H_@0+NJA8|>XNT|D?AhUae)jC}y&!vb_!ei+4&QO{`K1ou3$tg3??u_O z!&l0l9lqnUXNT{E?AhUaarW%+Eyj7dWIhWd-5L`NO=x zA-y>-a7b^-3mnp0^8$zT&3S=C`bT+zL;9Ayz#+XYFK|fTnin{vf1DMB!{_$Az#+XO zFK|fTmKQjrZ_f)H(s$$q4(U7d0*CZnd4WUvCwYNGdS_nXklvLQgk$L4d4WUvp1i;z zy*n>(NZ*?mIHZ4?7dWKv%L^RRd-4K@^!<5(L;8Wdz#;u$RuB%Pd-DQ^^uD~nA^lKZ z;E?`VUf_`4pBFf!599?7>7VBX4(W&U0*CY?d4WUvU{(;0roYGw9MX^G1rF&$d4WUv za9-e${$*a^kp5L(;E+C&7dWIJ%L^RRzs?IB(vQc2Q@fn=^k4G= zhxFg_0*CZ_d4WUv{k*^-{r9}UA^kyC5YDJ4@&bqShk1cR`hW5QhxA8zfkXP^yucy- zNnYTP{zqQmkp5?0;E+C<7dWIp%?iR9^>p|n37TL9O^^JJ$npq5s zg(p4r3!(`HZf#yOGe&ChcE4E(eNECkr+R0hc}Oi>Co@X(A{63i%+fQ`CAt}o$lRfU zbaN~5f{W0k^UE1&8s6bX1l6_>5ZWFhHYhiGx$*L<%(#x{? z?TgnA4$7vPR@3(NC^plh(j{58s&r)jLcLl|(GoT#c%LL^qb{5Wq&r)i7o)>cQlk}H z$Ezqh<4u(E%IQuQ2d5Wefg6k{J7*hFcG4uF3K#L-c1tzdOf2!0xY1U5w|VQnrsPUZ zE4s0XrljgGS6f>PDzt4yl(0oZ30Em#!#T2VQWhdJnimI?XH!yZO;KQ5ox=Ncw|J+g z%5F-AcqKd(UjgLW(?c;=<7uZ&wK@rC%J>%r-|BhELab!C6dab6uwSF$C(g1d=?U@5 z>xQ_Z*pMihpY&|lzZb>wWSx1#@`WiN!Irk3lCcrgbZPU{iey2;z2JkGSFsn4O-!RE z+>|}ow7A<`OR|L5+_OI+gnQ@^hBnuvw05mGr_@bY`=-VjBG)^T5Eg?hjyo|NQp0V8 z67RK<*5)oSD(0T8cg2*oJxT>g{!+_YbV+L=ls3MRJ0^K%0@4_POg{%z&4{ou@B8L4jtfO+Rj}@)0xj+=WgH|=302}RLu$( zxuIdCHJvex*FF8b_7t#ehb=3HNHEq{o$Rxii_r|HNr}Cw=&)f$4qVl+eXeOO?w@Nk z;KmJf&C|oN#@4F<3|*(Vu?*qbI62*!ZYun=EtDqmTr^8~{rJ?gWfb1(tM0+@8a-hS z{>BmodK12?UbYqLZ;HhUSsy3H#z|^0S&MU?TxTo!&LeJUO>V%tn33o_=NcKcdn}8^ z_HfOWf@YeUbV*HXx+#PrlM;(aoqi+N?WwMQsaQIUIq$~O&#h$Cw-=L}fMDLOt;wwi z?cQ#{F)Mg>KTg_O%F+xcw?S*-(|Ty@s*Rl`rCLaqWVcC>P@*;M&K~s^xZtUY!Gqfl z+ILs6;jDYIrEQbBnd_qZIZ#8=;o;gHttt7t%w@KrFBWjcSV)VE*_fl=C#h4WDcv*| zvy!Hp3eCnJpQ6>SV!q=;%2Ux3*2SGp<%c!n{+)CM7BmkT@5i7!*L6eN@;7kidHRco zk~v?+O$Nk!4+_M2MP$GeXbSH#c`AX8mLy%?{Yg^lV^J-}t$<i>0nJv^*C;^6e_U+hYSK74ET)eqp zu<=U8*sKHZm9C`?CF2lr~hMAnfJ-od}*t*f$9ORX`8tMB3IrmPUZ+>oq4NgDFyCXIJ&B{Q}|k|obEI8ur;4C-<>BxlcTjqx*BrsQqu=7g`hku_DLL)Uo`zldwTAar z&vt!ZjTR@M4RyJ9awdhC_PRe*-Ji53 z{PVgO;r-iC_vf>b@#nluzdvt%+GHdbI$J(h(vAlHJZ&pFIbA&q+N-U@`3-Niw9R_0 zrOn=JX`A!pEnUi~N`%rLm{Gf=rtu7f26oEfY?9znZry8ZOIOIjJ3Lxq{cWUAlkadm zq3qhbWo_wOBxq!49b!e+7A}YLBNU?9_B5b%7P@q%U`2W%j=!Y5C{UH+op6?BbOt>+ z$o;t85Lg<@T(CS8bW=lV|E_5g;lwaeyXsZH)1zOH8TW2{P{VHTfO^U7~ z=-Nx>Ie2Odt~jbKB}&o0Dj}Wa0W|Jk$;^|q$KI8{iLQv%QGQHYdaqitLjxG@)2l)qr3Qoy8} zLhc4;*6&W|AUVD*-5bu#koy|W9Rb=D20(b8`^m)gZqg#CpA*|sa#0$;)3GJX%EPa* zH%6Bn^)x6Hllsn>UdN`U)HAI0XIJ|amnu1i4K(lAwuFC1)sAaRj(eK!bQfE;oU_+M z`G-~+PR+)=jnTtu)=$at4O{)^vuWwiotB>1@ZQqdBw?wO1bvW47K*t{LtNgLEPtAD zjX%|X&Y6UThrr(*;&qZxpX}zKFEpjwG62@+<)GUyMG2DA8YbwB*%NezPtX}{%^OXZ zGKwQreX8D%bN%k=u1s9sL3*{$EVp0pV7j`El`ZBDZ1W7(g?B)7E`#XI(&clTm&FAo ztJ_-V>Z~>}Sg-aEOiXj}=Avz686O&8)siX~blOiVSH{A%T0|h&FelVK8<74k4c_&p zyl7ptWol#>%C2^99Rc)$dZ}0AaL3ZkZRyp@1GX7m6inMHuY(6ER43C%F{nj#f|5oD z5ApS+_vuHQ!=nLTGCy4t2Ap+^j&07db`}7B>QRz!JV&sz+fqWRBD#f<`g*MfM-;rZ zL<$qTvaPqRppQfSHs^Q>jT0CZTW;#=GnGM{ex+nWUrNS^!JTcXR8RWK8DXMscB^Sa zE$%%H^q7mZiAq68nFFVG&IwiQEbEEsJ-;o*Cyx_lolrc0pfy$@Y8w&R^Mzm+wI%$6 zZrp}uraI^JA1Z@WYuJX>+1s${+i-~YT*)H^WETpQ5#BWgWEWg#(4UO>%Oh>gJ?z<$ z5$+eya=Lq%78=_%L8Zvl6Ms6eRf@3oZBsh3xNoC2xgC)NrOhH=EL45nXIX64WG(9Z zIKfH2F^!V1i+J7LTViy;;YrUn)U>rpN+J)BjxTnocinrwIq3^PtmF85wQl`$1yT!| zv4)X$7Dw7SYot>RFHg4>-=1bNW=xEVnwqa@yQ(d@g0J&l*Ot6)uDRN@ft-DV^5k_s zRgh}~7FEYr%~f%sO;J<0kr|}!B7Awbyw#PX^`|YaAR`h9XD*Zlzu7C-&QTs1VAKc9ANMc@@A@An<|U$_SYdCmC`E5m z+Oa)*AkG4G9lH!Wgk7V)GflhJdch7|tDYpc&NZ}!8w9R~)9HX){=EoyhpXt+;D(fF z20oLN81=>>|1XSX5evX0%{v=9xodVO zcX=oJnD^ecgnw+x?&;>_{cWvJVMkjyIXzyhZwkgNrP5Rsy(jq#5n$<}MZW6k687FA zH`pynLm_d$n9u6<3)Ajcd%d2)EVMGZmZP5lsY2qPMTyKhLh0;av z4&CS<{hB{D`#@Vd8CZBDjq+8e=Bfa>f__>jhl**3k_Q?l^1;~?`JhkagNFbmn*IO` zofhG2=vKc8NVkFx6QUac7^2%#;vz3+A&QF7=U&z zNXLsF{3}=5E33l$(7If$jA?CXL3$vVSYzhBiCI;!I$#(b8i7Y^O0HOtULI-?$z+AI zDjbotYpXOR4=zZD!^^uUnDrvQ?3`Sp;aotsAl)C{4Rn3h>rDxyXjqx?ct35<0NE7^ zXH~%c9i;>5RY}EEZO+<-fWme5H)D@Hzwzw3_vL3+K9%{-)%*{Pl1g%z7Pv z`QDMOqg-gq%-q_XP5jUZN_dsds)0v+A3;R*sR`6a@6X3O8471rI67GaX(FCRGA*2{ z4g5RJ>Fr@+A!Xsm{!8uGSuHF~mV~=g2dfBgEg6&{NNKP-tI9FSl5_WRst%*wCE_8k zLKvi%&Z_b}*dX1j#4?`NlAZ_o;QOq%7A07e6@1O=ZD`3>kGnxsHtY3cvENRbil`~+ z&0i<5UGW*SUdNr^ZHSXh?o>;LOdcaTM}@`Q0XZ?YpSN#qNyoE2K*_AO<@&Eka9H}L z+kj32>QqM<}8?&BugY6O>8nm_<2kE zYjSP&|^lGPGY3Q*Y+1)AhK*yJAC;ok`ogW389QLre+)YVVRo^N2G5Fl}5AQ z(C_o(jK*J)oRoB)NyH+iX!bh;JO7CE+E8~l<^5Cs!>oE8%x#gwf=nKvEfn%J)y4Yd z{MW4NFHO3)@osi9G$q#@kzQY@o*iJbs-Bi~c~!;HVH)6W-1HrVn);ewg*&VI>Deu% z^N-ZV%>cG~vtD13v`cBl9z0UmpS>+r-mI5b`KanT;-_>aF$v!_oms8H@WZT{uLw0` zc5Cv*H`a`~jc3(-rHD~TJ=~N`2Pg~qh-cL}6Hf}Um`&sWP5ZM^MkIiG}XbaM-8eb4^UOoTg3llGe4D3Vx-32bvzYRCT+jhPmy- z(>@c}POv=rmY^XPB5HZgCWi({drJ&`c&WFiydrZuS}#(DNX&%+_m}!G#t#z&8J(OI z@Jh}LODUnK_mIHQv=roYkONiVK$FrUA6?Vc23363d8e!euSv}8a0WnqQ*G4yUyFm9 z0pOxhse@=r)0r;yu`td8XrMcxp?hk?gids39mIaUqa_BSq)8TGetXw}r(1!hTgX{6 zt~h&ZpfqawGEV@a(OPD6F2U-~z?ZSq8pma?X>}?`kl-QaX#wV(yHdx9rCA{*VSJsG zCni`a+;xbQBlrkamlDD33cIAeU7&MKbi?cxfh2sD<5wOX@L>eLmP@D^mFKt;f?C~= zqEeO#0V-y*k{rU6jFfV4rW|RJTQrK@P4G;GUb|^nDzwWa1r|zyzEiShE5jcOn&{T z$z@}^!^{6&lEgt}!j0)%Nqy{&2Uw+HgO-{^KzneqGWvvY;|Xyi+%wu?pxBPaNx(6N zO-;X!$66N#FK9!}iUYr@?-do2LzDBj(+c{=#)k&#B3xa^FK9|SPE55e#)V(IYLl1M zxT&lPqViIygOv7|d}x$40^4vg6}l|7x#!9^7#h-S(6M26t^TGtfLN755y42#PD>Dp z(1$k?rZ^@60$REco&{NM5H?ONm?vXm5`$A|J%{QWQqRa&XRv$rPA(f5R;0YG$1oEk z9|c<`S>8ZvyAdzz0u!j&ONklR??ZJ`Y>y5;mMs@!jP-WckkzdvO=@ApHV?{|#8eXq zZ)<~AcZw|PO02?4N$f9GI*f4n=09_6g7xWiJVP$4?O$498SL)s($H?A_dNrTT@E4y z+MHTTzP47Oq5|@)1jM3}b!7_}JN7%F``M`e&v~=4!E`}# z_4bP=j}8a*8mp$0@6nQhRC-B%WX2?6^_8a7@oZFNlpq(#@X!c{XkbxbFwnG~u>jM- zDw^76|25rdn=dA^4J-#!5lDN1`zWulu0_@igP^R?R$(pq?S@9CMhfKBCNVxM-$=$a zkhsezD9brk+E=TMb7RA>l74Yy>&|k|oxHSM>e=PISBfYL0DUOKj~Rz`Za1YR2!eC@DObj@7Fxr{izEIzBZwd|L!BV-2Cs4zVVpD`2L^2f70)N=am~asqXta=iU6aSB$Kl&-dPc zecucEey{Z&y>r7CzOm?@zx&(s^v?Hh{n*_f_>J%XMCG6U)QR8zB&F5eB z_pd$dFV+5gR?VMS`l5gPeSQDPZP#4C^@2ZmrM|!H6CXZ$+g)$FQ!xMNe-?h>J=@36 zS3Ab0HeFf5^kY~L$sQVo`HH*>r+~Cd<&GUYPFsO~ZTHarmXw4J3mspSW=!@#)=Mw2 zc6!6NkkW*xwQ_QXC_9gwjk>Acm*Rwa{j?PjbJ+6}#HNvVYjT?73N=fXXBQq@Es%Dv zHc&2YN67>s9;z=FMfdz&*@_3gW*_DxvaZ2L*l+?oG+`Hz3D-uDvh8XM&_!v<>f>yY zEaw)iP}u(td%AN$Q5TtJ-mVj^tB{??Mj&hCzUgujxIbC)f_Sl&&IS#3R>PtO z&RBK$a!v8Rp9=`tn>Eo@Q$C<|U|^No34QCu!5+ zT_Zxz>unMQk!UYEC|=MOsD^xm@I!mco$P#5qKB$e3#O@?q|4Iu+9bVVK~SZqrcm$c zFzb_XT4~Z*Vy^A4sjsv?NX%wAb380({v+U2n!HXh4bOP7VEQX}${vl2t`sO~0tf4j zCrR^@HWF!5l#?jWZs%F?y-R|#JV_D*wfvUUfiUr}>w3f_Bnv}aui}SQ13BmnBbe2D zVQ>b4V^g_cZ{*&_0}n%{zDW z2_v;tEODf8c29K#*O}2h$eoPWGPLV=Npw@X#?9zZ^+~ovyb>>Suizz{6-W^mg(&A} zS;FDwwdZF&@P-m`9)p9pIqG0t7$?1;==$UsKI8Sy(q2rhoF<*(C+)gC;E*_n>tRh^ zI64)KrVrI=rek;rGOY^JlI!-AaQxGSf6I(4!(!UyV&mox1Ov(dYx}v^V7LZdje}!8 zZ1{d{AcY&%t?U|r3=K#jK@6j? zm<4cXIwg!+`bdMt)(Dg@qqYJ_sR@)8bvQQRqakhE)C3!DtW@bj+;cw08c~Wwk!IT! zivtPh*{MkctFk#X_1kr#qwJ%;bGM$i%r!!l;)0m?W=!ya%yep532KpBZG+k%7>DA? z%ALKVLo$$)AaO8BZlYx_DlEnHcig~f5_`u0&Me~G0NE+$Zj2&SGU<3}Ajq^?*?}Ub z!s&~c$oaj@U-lfN@pY5`W5!s^=&Pfc#zo2k5e%pACdWx`AjmN*O%A{mY4}{x0a6O-b^~}(l(S3ANv}9Tksqx)KUZ+@4RchhknGR(agZFU9d&b7NGFICtYt$DOL2*bTiy^xhc#ZxC za)BT~PG0CLa)jp95_fA(C=zA0o#9f!*e<&~ZlaEqXdJk2311kL5z34WJhW@;#cs5W zw~>k5H-usY2R}`45jeOs*i4-XGIyg#$@AP6j`n)Fw27g~ttcuN7k;U<5$Pk-kjBaN z#+e(53${hr+)`@mVHC|*L{trbS_qP(rVf~(BKBr-ZH2M&G|INqK&Qr!N;x3s*n8y? z_8UtD>8lipsCNf?>egHl7VF`jAfm`-A{^9V(71P|Z9nO(LqD3IX-V>4kp@mPVIEZr zXPCCF<~dG@;Tx;w%IHi5T_GGFofd;;#SNJ6A!LCLt4ZA7*^ zLNnzA@!04d6KG1%j0X%Hotjf9Y;=Z>d`f982AEmpr=@=NQ=mueF4Q&C%Pjx3?%Va+ zMwsJ<4zSwRLLs2Dn1fJESE-6FK-v5yn+{1tb&FLTo*#ieCPpfs8yGs}?vD*nF$_Zo ze07p(MXk;`gUSaa6PeKDd3tVUI>KZ(0gEJun`+s&U^v_`vwc~Rw(r3vD0&x|ADe1x zF}tsZvn>p+oGxeIciR&8ME|~0rNt?5>-TIE_{|fx;20z%@<&o+*dmT0^c8lPaH7nC z_;z9`y>=$_C~btoDnSIAA@eyr zxwDq|1n&zZgoAJ}aAkz^>nNxVu9N;wVRSe}JkN)^(8LZYHvE+mh99#WIK7f3CYQ(7 ztzEYvQWK6~@g9N#%4KguRGpC9dm@ArW4L7D8e`Utd=}8LUkXPe=#9#-;8T+T5?Asm zp$T(M|56c}%}XdF;@*-wYZ_))d62I}h*7H`|CA~N6`lAf`Ae1MrDY`^GrLdyc3Y4P za+F$zhIV$iQPM6aQJDS|1CAvyG{lVIFl&XOs;h2Cb`I#<^<5f&b|g!3s9SW#u|-g)v&x zlOwvG45t(tvOTFEttH`J!2c5B7Hcof2!(P*0#VN=0RlVFWJPGBds&w}Be88J8b%e! zUQkkI-3=T02;kAKi???`lT=wz;-P2FRJmlgJ)8+mTMKzHu{KD5x3gmrd^JRx3czz( z2m1@Hnf|C=R@z;}FHzAnerYNNn+l$gOfx#y(mqu zZ(59YOZMkQYm&z=-53aftxeP2)<&>TM*&+XA~A>L*^n9&H)yw2K?2hJHiHTbnGOw$6e&*bZYN&qTOPtYSq{f3B%7&xQd!qotj zC{=qV;OCP+}j(4!&dW(8#JCwc*`d=H%UHe!Qqm3VFJT)CvxIg%?5< zi>4~J(Srpi_m6HZm9A*lFvKgf^NcMs2Z~(OpK~VSVpZJrn9FV?N5XUeiY93CVAEr0 zn1hXOc%9iK*s&}GwA}AomWD$Y*CBO>MGZ?B7uF;y5v4#`9Ddhu)JM`%r8vVCce1HU zzh+FmD#iw76ElvUjQ7TXJxz~GX*?ofoVO@L!BUD5tOy$%3$UrfMi_ELlyYFif|l1t zmS#3%8uqQZcmxV8s%Fb1(rw)9thUR_HM7rrGLlb9?6@E9l{-;};9r$bNgfb>8H?Qo z73Uy=Rz5KT6hshXl;H??QHrIYSqqf3(>X1tVM>NyGv6Y-Tj)e~DU(ATn12*OeMe~v zoWfwBeM}Y9d2TosZp7;8HNT^p!-$X+sKP9m7oSPTuYs1!gYGAK`|6Sx<)fWdDIH1E zH!a+_VLvPs=O0W{PQxENvQPHI_*Y_;L=NNm8o1XO6s-j|Lv2oHWL_QRws8PL z+n~&vQK}$gi36*7M*rF%h7OQUylsXjWeMJ{T~=4l(88i{a{;{v-ETg<{4clvh6|M<84CgYmD}S}L1#!dU(_vt0a;3yf z;FnTlB4x17!PsFRlAmR{6DZ=2a6p>Sq8nb#f<$J@!Y(n83=QUhN29a75j?q&lICu7 zuWg{GYD?1=@2n_y&~DgRp=EGu?v^Ey!u?@EG8*t2zXmB7E)D{BLtkmyJU`jkhXy*N z2@F}*(mBeSd!%qDV8^`PrS6|dlljeSl4S5tKKP+;w#8kWtO!K-95>acNlP=fxg>o{ zQ)Mg6p{+`FxS^rurulu~`C47MhICKlfwgaEf3Z>pt|Rl`1WCn0;8tBa;Zl;lX&MMx zI>9#b7%olVa%~9xaV2Krs$kz>D%qw89P%zgwWintc2Z{cu9yZ?(L{EFjO_}V(-~bz zLZ`ZPYZE`lCS&Fs*i%7ZV6g$?# z+z^HVAYU0*{7j$#TZXNbj_UZ(;F>Tzy{s-pc&TBYpq$xEAsOm+LEOWDjawfvB$+S0 z@skd)Pe;R5;mlpBFstQcmDrsL{MS11ut0^frgX|FX6TC0Udz^(w~S{!E3MAH_G`Qy z>ip$NUskJt3l-#T)eZgiYYtb-!>16khACSuluj-cDmEa|%O81K0BEGp$I_QO3kNR* zX$cYj1j}YgQBiKwK*&A)-}!wY2cPX_4y**w&o-gGhwZ38?+3P<7#3G=bYw zc6j7i8o#`0#W_(y*60oU79(`Xvux$u{~;*BG9^L1+!rMBgERy7hZhR1AVMj84Ni{e z%7LMA?k|$rg;NAw5y9uk#skyhM`72rG0mL9#34`*+C`01!xElh2hgBik~Sr+qFC^F zIb6&&WWlucI{d{>Sd<34liAUEg-|_R+J{a{4&c3$I5uIEso^JUSjU=9pEOZ}B5;Np zOPpDuSk$0~g@n=))@{&~P%$H7Qa~_e9jv_{@7nG7HychX)L?4jZZ`d;`4HRz7+Dx{ zDn**1Fi)f0r&(UKj#&>QvyFe9FIW@6R>3$ zuRBX8@g^`Sm=t9P6OaICHU{123WF(St@W3o)c;z48NQS^1}t4`ngQ*SxpfSX$38#? zOw%)k5oU116v;l#?$f|bjc<1r*6ReH;HV&@8H|wBSnHMZ!Zgik@(%MrZ+*P6?GXzp z(N4}@b+pdFMqq?9hF2^n2gFPp*J##Zku*3(d^~oJdV}9Z8M0ykw{~qO*DpxBb~7b@o4R`d~`-UF2-j?!({!mNsD}% z&Pot1$1tbQQ3@z`WOPD$#QDkbAls&?2w0$94LgRInSAPpCL$SNr*Pp+Ld1Q2aa zPBt><)Xr03eqn3fFGDx?(wv`AJ^Bd?%8&{(8r<&)77&RV#hVCsQ&06F&M~MUYRfPw zIhEwRxBzy`=#|c>v!~EIu3X8&6bdUBi2@glopegOa;xCfxn9zw%`IvdXf=gq7lYf$ zrl($`M}9sH|}bVTWvzajF0OKf&yc}4pgvRm)x^~xpq zSx5y8mIZ#-Ceb<(bLx(=w9RD0qC;x5^qizNH99u?VyKWo(Ku}*3WKoek$u5L>l&JN zqpvI?O)ayY$l?*5>+BLhE*Tcp0u*{KEWdkI*|9z}$uY=a3xPd~6_#$q2`~6e7ovuh z^)~;r7N(q3g^@HOji`i2(^MI3a zHd_{c6!;lfWcFuyiE~2+*46v9QGefz8#Xz?`!(l#=$8QxYIxK3# z4WD7?pxT5n3L-D(MA5{yvY|4YM0G|K{kN-jx118BYZwDJ!-%=Q7q*;Of|V$4p}dyy-)BEJPHXDbuZ<@=p^d+*Z0z09w{`pZ{XHAD z;r^%Bkk_CtI(QUp3CIYOQaP&?Ye8pj?8zx}eDbL?7mmC?pCO;UrB7ttt0x^!l?!rg z!s6TjPiHjDZkVWERKY37Ct)87A!(fEFK_-H$yt*{`!NY2Uy0vmp0kP54A4!1TH=<_7^ZZquL*a-=LY52>_Ed)?KTS#cVoQovNQGtc*i7+?i|=5vJ)nK`mpYhy*%nnarq(mM3_|;WlhNCn7T^Z{q*`>}?YG*;pO@jBGAK!fP;- z=VYS>L2wkvaN{Y6@az8iy_q|nHj1rdEt5`Lo58gKW|NljNczI-Q(FNDaf5LD*Bu)`D! zI&)_GFEqPjnENjT1DkELbI5*2{`b0vOc(JlGU$x@;CT%O68YB{s}@aE zu3<5EI+Tv?0?4M#01^-!{7gL#c^0hgzQVW@eoq{;btsA^Eq@gUXEazC(FcYm2Bt=s zUsEA;n8(f@asQ(#Sz2DRb2R9F4OlbX&Tro!#mplX&_5M_4~omMJtPboGv`<#esH4P z;aWnWS(+#hK|9#HR#Jy$A~0>CNs!B=i(@8POxkl*xu4{X42UgRJo`UEE+`fw%8s1$ z8PjLG+Zu~U0GjnZwUr-%DRF*TF_}2p2g7tzONvrSs@zus@P7HDz>hU zSOHI|Tjm0wAiBi_n?Adq~&p$B;eSvk|<^s(QXTPJs7c``*gLBzl9-*6ZcuahRH@>Ml|_MrW%oT56T4RJkA^ogZ8+X{p#N?q0qV{n%PLleaIj z`ay84bj}AeHvro?QJrD(0yg5tQfH@Pu|GKzTj{*p-_3c*_}Y${3XMwVmGZqa1FKtn z%9fpy?5s|N>qIC%<|jJ3zT7e?1k4xJrUUUEdyZRWoGO-|EcGhnqCl@q6_ba~73SSv zt>ou?=@pL@=MT0ZEKxrytjWEVsMaa%nZlID^td3F6Gq z>qqJhZO0zL3}L;JVw;fw2`q18zpe)`y}X6rFd5)OVVwI*%3V7^<4+2=T+3U)pV^0K-dHXs{-B*s{;d8;wEgk<6X9`2yN( zPt&;@730G+>KMk2o;wn4M-U!ldMc5}DN-ZAQI?aoa3beurYKQcHd{5pA-s*jIAtxh z(2!&pSZ}>2Rw}O_{X+`6cpPnUB7%9s#ZtViT-~P);S{DjArVEu9C$jVkq3v6AEXaF zjci^{0rEp3aBrGf5lTfSfps2LRZcjSAn-Ga-I>NVz>=qfW0vwt2iX~<3m~4>l7(Og za?%wzjAx>VlErlAsN5Tw|Mh#PM)wgMQ)1aWpw4qoK*jChykEg2q8jW3)XYWNDg$42 zltV&Fh;nH|!N8RTaRfG4))|68V?WTh;p{uJVp{v(XLw99Jr1vm-smNVXWzM7p z1{y4NNy;^yh$XH>C}a?-m(N?zP1DXpg#M5fYWq#;Jk)%gT(_4>cK1wvQa*SinQhZf zEU*}cOfF6_hnqC@+Hdx=1z{9q7U9(U(sEzv;>jgZgeJ+YV0q>B)&OP&?T7CdVtw{#Ij7sGW zhvwDTd(&h@ssRyd?ojdct?CdUP|%GbASX+yLk=00*818#C}#DpT4Sr8wGvc$~e+zh*>k`iP^V$0&xA9Qja!dJtswGV|^&l;s2} zOMjA(C=Adm6bn7%S;489Cv9ma~y*%NYpoq+aUSh0tl6 zkn})C#+XvhQYhG58y(@6z;OK3*mtKYVvhwi%t+3p_oeL z03g2%(CzRYDNN|Z!rOtMJ3}RkNMY>=1$%pGwh^AIt_A@tSc8M+?yjCqShUk1FN%S97qX$qhQr@n2?k^NBNKrX75?t`hnzI-N0P zcvRkKw`Ai4leG*FgqP0cFv(48U9)79)Y$iXp9Xs7D8L*1A{lV)) z(INg^Ug41NOyAZi2^%d2*vtZd6knu<5 z^lNGQr6#PSVt#6a+d|MyXDKF9ZhwMfoD;C%Rjb9Yl)hPr4#Vei6nCa9MDoBGGqQLh zN2i;Z#hQH~JsR`_oeB`DSr1XMsIefBD$cn!dM{_OhpPo8qK&IenBl&IlB}u?0-(apwYVY1AOJ%(}Y&!5rqZB@z>ASTT^oHm%d(r$L%=yVY z>X*a@jE!!;O-Ok;2|u5zPG?V^(_k*cIrkO_tApL#sbaz9%1rohtD=WNLku3QHz9Fg z8h65RKxXf=NA3_fPiElg$TEZ3jFEuN)DX6y?h@sfGe}h~9Ppy)_tW&h7k9-WtwXu? z&gS-Qe+4tT6Z{Q+2_lb9H#ApJa3?-R>dK1i+@c%kU6!H@gCmqsG!htWqRVJ-*TS|C z2tF<|Q7jj2(jrLWQ!=PB7&=kA*wW(UFIi|AV<>MbLQEuxj(OZc+TZ#4$0Ik*r?d~@ z$2j4P#C4l9fHz1D_^O;im4?HRmr!6Gn)&EwbnP6*UCljdvh9qMu2pDg__NLf1Co15 z{9kt7xkG-c=zdAf0-ZT?enOPGKeFlkvV;&VqfASrn3FB6eI3#w>)L)2bHV~pq2O48 z%^9BC0gL>DZwHm{qAJd^Ixy5&NQhD{ZIdtqpZMP9()jc#lM{9BC*wR6ZpW+1K$Kuz z;PzOT+(i#iOc3WQPJ|V&YZKR?GC~Pix{xBuT`+hVqPMprTqUhWbmn5|9KW+IEb?RL zb2xVmYV~H?h_Yg4w}dM^I7JzHNIJxW1sd8RTJVaO@xfFkK47`1D4mS_Tj8)gKVdn2 zfAbvIuBEdsVr$mrSOCMpVA`ttnjdKXQbd?v?z4G{jf76b?{G6*1xewi!u>mxvt~@f z%u>w-df_@rcFqMuFz@*ejR`)qMC`-26wV#B6(}SpcyJbzo(>Aqy(d%fJHaKR#ZbO$*^-{U5ckiVB`F4XV8K@ zHS97~g0iqeN(n%0KYQL7!+?x|AI$A->M4o}W4ony0vVJPtDOEY<*!*H%{iKbpzn7Q z9;+0@^-M3RWnsABVnl0kE2iO2AgpT@W^0%Rad-2Fm?Pa_AqlReO#zQeKs3HzPHctO z(L4nX#%q6sss7$Wp@GPkfubupP|?fCg?JC#n5A|AC6FQTpDOogNLn~BB2tuxuHl%x z-gYt0JHotb?{%vWbC7TTO_EGD$I1^FI)}an^?Y zX<q_Du4YFuD~lc|Fa9%*K6v!aT*u{8jnV1LW$ zckp0bvfUj;$snJ9UAQWiPK`8j3d)OkXZuG29us z%(0a6xLPoT=qZdL3_FYV-CZ0CS?N)GjKpTvlnS{$uVUlS$XBjpH(|o|cPr)YhH5@Y z=c`fj^&Mos8wL>N2GZknY~~JG<>%SD+h)A0DOrR~M9q+J&VG@2hbqMrim|qHu7%b) zPA97nC|m_s1f-@twT&1#rJ4mrOc2!Tc(mAWQNYYzu9Nd8q-zR9G4RdR(yMlC-EuX0 z8Y1K&#l73k+#yxG-HGKtB85sZ#sRQiT0YKG!Csx<21Udrg({mjX*d(IA&T{h4#D{_ z4AjchXvk4t(H%<)B3RlJ$WI(Xy`0XUm(EWY_Uur2naM@Ck%WY0Gm_m%(z5vtL?n=A zHY~`I%c(_9i*w5IjTfdkWBkgpfEvET^@tt7dQFMZC*_NX)0+>=kNYqMav?&Y>mw5!M&S1L14kcb46i`WcXAZB%t&o9bspGaBu4uwBL*Rs2D1g@)3(j_*L3+Y zPh}lWAf?qd%Le3bR6$;xJQg*E53CWAyw!5|S`L5_3&!CLXm3x&2eHe~CV$&x$o$Ni zKn7tOXCr#T1nsMlgD2{|C&W>Q3lYK)O?iOej}!*V)9~(^JS2k82IH#^)=#;Nl$D`Nm!!RC;jCjU(Q|sb-VbdFMKA+r{4T>t5W;yaa;@stKv7;;`SqFu-b$W zFIn@N_8Z_-h>5KoxL11>ZUXo9)?^==or(m9U(b#@_?eX&W z?ep5b*O;V#WU?f%;l0I^jdO*7{crZCkQtH$Ja8ypW#b zSKautlI}p<5547sV#>Vp-}Yl$y0&ZTn8t`PT^tMg!%_mil`9U$WY8F&SAnJTxT{4!O4l#1aGHNu9-BI5&co_DYA zLC^siE+^;Y=kgeoVkopM3#gdP%$+~4=bkrk)Kan-&r$x2F;8wk2!}Ow%}-fSgbt!* zgX4n;;l(@9qHt*XAcq)a(?iyb&RG|$bC;LEu;9fm4RH*0FQf3(4Pjiwu2z!s)yOjR zMH4k{ucR0tHvqsy4FMWPZ=f!Lp%C4?rATlm&{9VJG{9EZKd$CHVAVwT8GG^)SN*a!%fUl zJdd1pct3cVi(x5MG-|jPcA&LIbQess+6PT`$ccXnSY^hOctk+wy#@i0*wf zjTJF`Yww8POfZ|DY}U*luh5TN{xVbo`Pm$RE#(kG1TqgCa7YKHuXt|;FDB^`91+V2 z_@7_Uvh~%ae>!ke=_yk*E#9H14;K@YV-CZWsTzc8l`r#d=_}|fhEYk7Ye|~c6Oa#1 zh#ppwve9QN{KODKicY1UaJN%ad{igTb|(aMIcBWY1O~uGC#0yioTeUa5Pm_UN7A)M8>?v})yT-4GNPm%0%A(>nc2DS|2jLamJYz~j}32?)w`CbE^ zfDN*n!2ru{gpQvuy&`@>1+ArQOlS#y>DB1ijw2WXKvn50YEp4*4y%C$gXY=d;b;7v zm@kY`ZZ7~sWa?xCf)+z4Q9Q6C+DSux!@Xt-E>-W8W_v*S?#cTs5zcPMLj8u556a&G zY^Nh=ZO2BrWM-)YV9Fn)6H`Dj=pehJ%QEz=WPrP&P$=uRSL8UNwoIc}PG2`Kedpoa zeyYf-T#~-xzLQVMmWz$%ndiecw=;(A)+jjpL_n4?V1&KZb*8Qn$y@#GIq3fLKT-8Q zVVs9=&TLjE5wm2e<@saKQU&{tU+fwjKrvK|jSdF4Ijyu+lm_LM!&Y8*U| zI0&T7aX2tTVJ7jCrUK6~Fp?8T;&hZ=g{qmQ$|POQu2w{4A)9(U{{0NxQh=;Bo2>W9kzeT90v=HQPQzF~Af!o^^ zUfv8%qU03$wDlO`=?X?XkM%*=%LZk={e}A!fCaEqrs7s_Kg#FE{0RbuVUFC9g8=b7 zwh@hyqAhGQ$J zp`SPaHwC|Las=nKxqs*_Z!D~-kB!78BBp+Wl!7dN9C`?dUIDsa^P%+X0)w*q`jXj; z%lVY<%V!x#rFcgLU)?W=*&7}+65Jq0W*NveJ7Pp4wey1^XmBH~v*yr$0DNdJY{%K{ z$&a5zbRLDL^lRC+aC)b`7W?9uhS51kAu3Kw z-Ka-ddFdMlV2kKj4IUR*Z~{2pY@+R0StrZh7IV(Q4v|BD`icPjwE+pA3dz%3TaHTz z&cw9{>6QZ}d}~?~znMeWyxUstkkt4l+p&R+;~2+PtD!>Sc5|+yIxKzf;jK9Ln872^ zy=$u|^9fif{ECuS>8Lzj2FlKvvPD*;9A`R_qqqf%`c$YU4`^v!ly283n{jjBGq`6{ zBI#Pfn;FFkd`yJ1oZi*)LhkN?NXh4fTTQ~Z_D=gY-DsbFsNl&at_)ak*D~=D#sd|NW$%|H!KtgU6nw+PW5!BcB9OZu4+bAOxh{?wULYrW^tR}MhdpXi z$%-JiCvH1mg{(Mq{z#(1jx&BJbnYW#o2!)|8RL!;L93{%4Yif3V1`*Rc; zfFdyXG|udKJacJuR@WIM$6w;z;I;x5fIaJAb>Yvy^^^I=o`(M^_fCPd&L#Ydd$V;5 z1PXLQ(35j2AJsY<2(ZZe1evn^Zwf}iz1?2gR2$u+G!w}h4A*w^o=J9aaX5ckPTkO0 zxL#VBI@iHS?j=?fl`1$Uk3-Wgf~huK&!L+fH{Fb}m_e1~_ZV}-KP-LVw_N3$o ztC&8}azfIrq#%Q~k3?P@9~Z94f1N>S4-^Qkn*fv*1YK?*&p3s`M~+VB4XAn1Sa(`! zzNgSYV^tI9<$;N2Gc4jaB|VCiHWZ6k`mJ%f4ByxkzIesqx!e1L&g9rH8N4$|y$d53 z=G93Mk}Yb1;NNmkf^U$J8cXD!Bw~VtA%$(s#TGsr;NpzGCKK{RWH>gD5tvPjQ}R zY}T145J(?9V2YcyIKp!Jv6h!4dp8899fTy^fH+|!d>hoYmOjOA9SgUM#LBfjWnvfI zjq2QV(!-{@|hgE^_k_Z(E#(oS#veLpP`SZiscE?*B6Mj?c}*;ij(ACOToe5|IVn1*X+RfL45?$C%0F2hD*bs;jrd7ERf(4Kas<|PKD*`DOtmIYicvk=(> zhah+S1m`ff%@hVYR9A9MiSsnkF);$ZBZ%al2i?sVMy~E!!4Xkx-S74b%N6AmoGfX;L_x4?8-$W_-2O; zW{fioD>rCWI&3rZlQb3mPE#43PUfY=#-XU8OFN?~R*09UmY@Km$rSSh70 zN#&96*R@As0eQ|;>UokW{EER!IGtH|sr(gqBSSTzHjc_U8r7$?9u}H~zFv;p+Ta$3 zcv+2Wdd%8kEYlcE=oS)7Ow0*j;;Am^lP=G-8-9_akq7O8x|G*U^@ynrGdP$TY(-?m zqY;R=E2}_x+#|>Q0W-CZ7}cbf4uJBunMxx;|#PWE9YR|ZcGsUMR` zN%um$ToIP8wAGe2B*Kb0F+GmyV4^y{H>d*(*Ak&TiuX_LBsiKZrBF|uSV?j$G&*{f zLkW#@GW-X67R%85Bp5!gbW(PDf-jJO>ZILH#9Uly)z3nfUYd zj+!D(+>?MFzBbt(`Xn_?=%U|xuawgbhoui3zOg%taMTgs-Y&l`bP_!xEusoxZsP$S zIDt+_FJl%$o&B@wguUgwL*F{gR<#MQmt_?63x}G6NjlC?uC9X8Delf9AOf!x(bQQ2 zpGERv;npB5%zmxb_m@r}nu|VhDRAEk?>r3QLI)@gzW|bi{r?@14$J~6b{{z`@&Vz? zJ2Xm89u#ox?Q(l6_#}^p0}U07P`^_9)ySdqQS#cUO~|1l@O&)*@v#h*+f4B^s1E8_H?l5C7#2d`*=vz`Fz+NyvE8Z18zhBX50iKe$3bm?WZ*vv+8qyviqog+12-xt6Rsviai^=j}|7e*5_9BmUv-;}0%; zQzn3V6pbj94i4iwV;{!+lf8kPV&c6!!b^W}zS?69#7Y@?ah5gU_KeoZ9YchJ-Bvxe z8*#@b+odt?Ct~EIbYzGhdy8=NJB;2V12#rgMs>58?O~(WC%cO4x+a@|?MRb|n7R}M ziX3#0BeP6>SmOK~FU&8?gKMC%#cVKhV?*yK;R7kcCd#vV1`Et=d0Riwgk6;8s<9a} z(&NnpC0S_a_OBd&5wONT68Ts=QOh}JL%6*dK(Qs$we7z`f_VPdbi1N$mzh58saxCB z(3<1W9Qu+wt-XLhPu-%dq~{KC$;|{yaSvDDGT z;pmj+Ut5=`U<(3P-6T6$qUd_nB!4?$vphbcaMOqaxy=~IgL8OhKDqcY7>Mq z43(~2;qC=ptEFl*#!h~PG*L&N1|bEYGsg@jYc7hjztn|JC5>PmO^TiF{D}s@b*JjY zp)-e{;4@H8*tk0+Ly0-5P>Xz|b{0s^8Nvn`_-Ar&aL`DQRhki#cMO$q)11`Z+L&yb z(oY`V)J+o^t5W}IOUtpx9~PZkfArP^H^aRpcfSATf70ihddsID#^*_IS$U&A5Btd9 z{Fgr0J@kT65tSF5HTCcMT=5$_ub9v0nP06eRwmSIRt$eupC9`71AjoQO!AB0`u0dO zpO3%b`Mcz!f6uW$zC;lP?Wg_0?ML$Yx1SvQp)T)PyKrRhv-td%Kl*Zuj^e+0{HiY> z#b?J|AOD8Tk{=$w@kP(&^9^gRxn0o*uREgUVr4u%{o;*RzL3ug{{G@8kLUBi_nRoIlKmh1@y}kv=dMp2^)FZRdG<#~YPay&^oIAm z<1Rk?&b;LxKEme>pL*!@zvJ_H{fp9n<@3Q~K5%&x6lwiwZ~V{W`Mm$Xul&S1K5yN# zYTF(@7d*D*zuw5_2iN}2D<0%?-fPQm`vIS~{LV)nIEjUL?&jLbyZOBLrlaqE51-54 z@Y_fJl+Qc<`IgSDEXcc_+uZg(K0kBY%RYWA3v&AxuDt1bKG*%rH@~oug_(ElKeXM+ z=d-7d_`$1Ln18*leBnG6=C3||>*#0seE)YYx%_=B(7S)_4KI2R3v}PZrPY7M0=?wX z)zA7F3pD=m^Ov5}mL&i7-Y;MKB^KyEZ~n@=U(W*l?Grth)?hGS^peUYufcV!DRw_Ns?Ug)(95{>*PFkTB!77M{1adJL)PgvyT7=nHBCA`{h}9s z;^Z{>uZ~luZrPM3U%28EldDLpbj2ed{MiX_Nt4qr{QBg_Kb0nLz5iS5KKP3?XZvFCh#e)7F*Z`}NY%MVX}^6u+j z@c4=a$+drR(N|t_L~}Cl=4-!o^pBd8|N8dA^%wm|OY*fJF8lLeJom_?{O4aCd)0ZZ zN$bul?{|&;IwT zubX%>xqe|~*_*Flm_Bju(f_#NYcEYpH=p*058r!Ey6vk!`_uPcaYg#gqi%WNtasm; zc76QcpZnnlzC<4QjjzA?jAzZe{l8v)+{DLw=RI`PCFA!!=h}G(e($;K-}Ut`%zNm` z7r*~)O&y0Fc;ETsZ@ct&4tr>9+3)_(+V38==Em3F{l-7|^`_*8mP?-ZA(Hnz`x_S= zU#iVddLQoX8BGsQ-tdukeP{T6gk+ra`l}XSvf#kpcXz+z&o(w6xZ|JRy8VF_Ey;uL zdHld*>yJoIp18NPY2?TQKYZxumtJ^(YjXRlPk;5>9nU&&|E@Q`we(ldPQHH5jeqy4 z-#;q3=(U?}eDT#sC(r-gZ=BZj7sn)j@;9%(@&_+nl%(xH``0Bue13A^$9+Z~WAi z?Pnw}dGEp-KXcV9lSey$c7+2Fsp{7Eip}g+P+L7U`9$tjhB1r)}B`h zb^$jL#vDhPzsRoI@yw1w6hJk6oP17%B1}cul8h-!1aU|?0$TbKTs_IaAcZ8e?~}P) zVsqZHNq{ByZP$CT@5~F{1Gwx3NysikdoB9A+`DnTi;}Itu)5>71UHh^tzaS62L}_@ zM4nZI~BcR66-lQ&b9J`mOrX@4%uqoQz|v?>cTFVwZouwPXU5?0BcfD?*;~w449Q{f_>K%BH}P0u)S=jjvbW( zhk!G~2l^_+M&ux9z%G=jVMO|U#_}>_nSSTga_!LIJGHCpmj;kEex?9g#uOY7uyDz6 z8r4zD%cpj)D90()*s`gz{RO>LK5VX4S>9PXwX^in&QiHtz9?H>5qhHvL9N^+tMzi< zlu88ogjQCeN-TA$OA9ii!m0VY`HS>bn;a-7U7+6Pcy~ntl)bKy#ze1JJRJt6Q?esi zcKevnfsR8Vf<1qBWtlDIhC9+)-N9JK_elmBCC%d zl4ek3qp=0;jswp~gN{}f#601B`tz0(lT};%GBS44HXIh}>CA#{o#+Z)g{@90@a764 zCVw_>xc`#7_iIKK-OH!0de1gqMCmS?@OaA%&Jv-B?rIX)Ci(T=^AkFzVN4ivvvC9d*V5EhD5)ZgPxNCS!Oc7>YYCZ*Itlga%aL`wo9Bt+tHg=x15CGeB*6n3HQY;7VhWwR)0-DTMlqz!o1>MZj>54xhTkaIz2(>m?qq$x;<~zGO2sV*J6PH+X*wYLa zz^j)#i#Veg-1$c^18Z=bwWSm@>%DFSgP7w@HJ+`aE8;B4BP1-*-{ z5p7}tG)C|)@4Ha-nf2`&{JifI>09Xxy*za2LI-H)J{9a2R@C+Sew&1Q0%`%E8}2^WNGAE1olWQ{Fl|*f z<~_$3o>7+_oA6Z9gzFXt_tPciwEVgt-a3a(@XO8!JE&}WaH!Dnj=vKL!Ab15X}kEI zdd=I~G&Z(x%KTO2Ti5>8(pu2ge#a|bKY4cTI2_ag;oK8f23?a#Kjao&Q!=mx%)`V? zaGD6aE?3c2lk+xFA)FR9DT64}U0j*T{y$Zw22FOV7&SEC=||WO*{5 z?m5Pp&D`DLHIs-mI8SOn2ziw4g2{5MmaEH}^}{3+;p_?rfrr^%gu98{f${e7&ixz+ zdpUxwDWZ889KsH0)*~o5j6z$u12?6gJ-m5Fg4)rs@!@*Ym39)%U>aC~kQtO|-)QG6 z>@t^4hoGnCrX#wJYdphja^16Q8SXlfn7E{Ai~x*8MbTt(0Mi-4bC&%xE-RV=bQs8( zky!vuc!=wZJ!K!X$#W=2DN3ygVDl;~^nH2BJI6QAD4GJr6bfW|k?OE1g*KybK!}s~UKOWbVHqnWMRkgs)J3#lkIq$|$p*IA>X`>2 zQ~zIk=N}^XedhNW-K?{=W{+{JfCLJRQ-!RO)z>RWzRIecYNcI8qFQ^cUH__WW=6ZS z(&GK)on2ddB#``Ja3FyMnsNszTp*z-+(FVN8G(97rH%ZO zOsOHPi5}xQfc9eLbW zS-ste%WIWFQcT$VR=i@KhZSY0;$Fa)M4q-e86s$2oG%%hE$tt~%C60DE9t_rghuq1cOA+-u{oH=rO0YXDAXfqg+`Qs8|;xj-67ibEl%b7av-ZEay z`Jtby90R=UfaP)XvK88Z;HF*+xyrP)$Sml+Ofc6(0sY#vaJX=dQq#tzkU64=7q9ZQT=VMSnMQGfQn@!Ews z0u#o229I0A8RE3H+C!~fBQ_W*fTEc)RRmgD>bD}dP4uTR&dg%E<^xlI%ub{tbz90~^{tE7Ai1KM;Ap+sagZ0>APVrd;#X$Fw}>0MtsWf%vp zgHojG^%7KCRX;W-qfp1btk+(+@6;a{5Z>hf2s+>Wf7B5FlmGF5{^2M8>;I^K^4}_; zUj8$}pY_VW1c&(qFST#^&(J?wUi!E3T|<18%-|5`koMfOA?PM99Ji1ZXXkK+gN+U+ z`W^M)*vGkS!oS`#3fQxLlZ3o#p?%LCYp})P8RJ>pd9o9%78A*%&=2C-G$*)uei5Kw8bx;5^g}drSI{VHRt%v|y%`oPMMI zki5=ogL7GLv~q>CKB+xP`R}GqeM|Wc`Qn+2yVM&DfLh$vyL(CO#;-(_vr@8?C2Q4v z!Zd*1rTs9Bq?5>FZ(gk%He`@?9@qI;1jD|e0TmE4rY$Muyc8B4iV{unRVpb^(cF!U zi2BNXAE`}<^at~}I{HiX>W9{~s6(3fgCUWU3oVmXvN|NV6Kw44if5dZo}%c3gw2gD z-c+$hy|yOH@m{|qKp2NM;ZMlm5N5JiLZqm2E3_0a25s4$&YFZo)b0#+2F2H~GrUY& z3YK}2HQtS_4LZfp?J$ii2p8A(EC)l9wY;RYpe7276qYsaXUUdm2Nt=b35)U2x4%+U z^Kz}spriJ-C80{$b)H^fs?$Mf(C+sFjOKV#-eBpv%Dg!!bT5{^bDugBk!iCEQlq6r z6DBFoyQkQTo+|2}<%DZzYG-(@cXfS{o=;F$efVQ@VakQ7wb;A3vTbd(%>DB9#;1T# z15qUiQ3t6c-W&0R5r7eI2K5A}MRP!~NFoCA18nB)Z9APorQdaK~d+tGz}g&;ODu2snh}Ky(LW z{7q!5KKSFt5)EcxPUvJSzU=PfR@r`j{NzUwbm|%l4WFOel z(UwGE2w;##4TsB*v^|G08O zYy&+`Ty0es3dzRYv0h4UC5pO~%&3Q6R>oyf|AIK*m+t!`r;OBda?2?re{7x4)aZV$ zdhIK$==jB$$1=_>QMq?Ole|ABLA<6PBgK$Da_O)r4-ex{FJG1K;kZl#o;*r2Kr`qgyM8ukJj)4k#1z341|- zbj%8A_RG5QIkQ7d5sxMS~}`zayX5A8vXyjEr&I`^SdhiLb|TAn5} zs&aB$PIpM>Q9?tfe6WKzr=xw+d?R#_d3ChCs6xl2h#U{T=)5GbC;R6Uw#(wDPlOIY z5~}bxju;+9@}hS@wrfqyWxW+Q3l7fv#X|YD8v4Rxa1qW2{0mmf7Pcwq6%Z@%aT~^Q zI%!AnFH~fql=A=aq`s8-f$kE))O^yQV? zjBv7m4AfxFC_u=9swC~ekI&60Un6xzR=4MeIOtlU?_oglX?v z^a^O}ujoL6-Ihd(<>BE{5U$9az&+J^+>cCuiImfOc06Vt=X&lf6Vp@DjsA3A#Nga4?nqAf27N8YrcNdMX3% zG7YB-%e8v&!^n&hO>7L?15%mQ0})(kIy6`}K5~^3N#a-3R}(NmAt%d}+i<4zpdp*k zc4reMOMCJWrLz8Wnp#Tlp{b?*Gk0O`<>e_?exWPe>{0++MS zU_+|)is_+MD>0;A`&*Wru9&f5;0L0(1K00M=1St*XtHX=1VFn(g93_fF)kpP)`M94 zv0wtX6Hx573)q(T+7s&eQ>Y+HHx!vxE#a&st1N#B84}FfUkVUykAqFFe-^c$m-qOT z4i@>`(oC0_QLa>T{IFH{9eH9LHf{qRy0!v4*`@76Xx@J(=y)f}00^*-M?^I}gVl@c zl=`*xKK)&B&&r_|1N^;I_dhdvB-igL(*k)>VXR#!J$C>WFpB9}40+wUO8*;Y&u&-{ z{c4;{`oFX7aW|U`6hr*#WTNKEUEw8%HwQHST93M4qMGIk7b5vAud~*sSDA)1lV4+z zXY#E{zU)=uvn{yxQvhD|2;0+gQ9!FCB%z{+`I;gipY~G!;;tsd-H6FCV3*|res-T0 z&_bv{S*kCz_6K=-MHei|hVeop&=M4wgJCJO5{zpI8WKgxAv4XQ7L}-nS5M{{?wGr< zd<9MwX+3u67i9U@npbJ^FOP*SoRiif6PAn7m!HMJ)+p-*?xuhLz87YwM@~- zeo(%QMY->esM{)6>2c+?hT63glft6h!vX>DpqlUIlM1v=37#S{>eCfXdDP*K zC(ZG#c(Rr!uio;qG3~w2O5RHklt{8rvbN%9nvh%HWW-WPWU&v8qAxjuq&@i=X`HMZ zBJZt1l6q3GShFb%2eQ{%L?&s(sF9a_Ft@HMO~sYVmI-u;gM88f8VnIu);#H~tolMp zr?wR?`B3{9!)~x7)X#K$j-<9><)<#N`FO~^j=sp!gT+Yat(LI}>s3Quro@gIGZ7D3TJzth{M=CXvv9%lPRTYI3e=T7;a z>B11V)M>@HWB>|+$*q&VrbL`M>A>naUj)b|UA_Z%$5-1oguM>p72-g&X zD=lueK}7J}v_#uH``i#N)s@!0xW(QtgSiQQ)#Q%6Uc2 zeMW!%Q8^7z864$csV2}*rfFf!d!D?Jma_rJh3XdL97~sWMWz9va<>v~1I`=&zZZ-+ zvq<53-1V$^1F;FIX$|>Jd{I6L+fMAsoamcwx$0H}aXT#&2)jCM(Z$EOW0$eabmC=m zb&7qY$JP<00T=N>s%L|7@Y|cPZB7%`4B+6vo9OxQazqVqx0D8*fnhFU z`IU%Y#9BSIQ9ch|GOj;vMH3)JI+vVPeex%g>!kLOwvhIo)@0Je0;+~f(ZI;68&sSF z@B95hjthYtmjaBa{?ZYePdI~4wnaWI(Fcep$-))tBv?zj8B>;ClMW?8M4G7aAwQ#{ z_L;XJgjkYWayx5rhN7v%P2HCT50jST>+SYC37LJY`BPhmg=dN_OLN_UC!o zvQ)Bav7gZ>0*((nU9!@no!?v8kHvZkCb^RVowFt5s_|Zjujcqltj>N*IOe=Jqd%PI9q<8>4x&??s>ftxs0K(lullY8ClAw@RAw!8cayR zVS6X70Y6cm6yP$)FJ<+7uKkn;|FX%YHM^-JK_i90Zpt#|n)U;%P)$5uD;|zt_POq` zwxP5SRx)hwVE}`nSNI|6^eUaUXBnyd(IZIh2V^G9pO+^fXI>yOc^ z!`o$wj8U8{0U>3$p{)ZQszABAF33Ah4bh-ashfuE`sKiO!2?1@z7Y#S3Y*L`*R?7% zu79vhGJDlyDEQ>iN#I00y4H?cWdqZ-F&kcvyHtZH-xd{biutN|hJ=9~oUedv-r2|{&!ni=?mbMv2_Bn%&wR#}bf98o6NawZ zt?NZWT$yX~3mJ|%{G2l=NQzp>moeCRC!+TQK!j-Tv|O=%VVVj#4!b5~v$dh}CZ@3W zjJ0RH7@RT82-32Goh#HT;HQbF?KJVy%0bH&(d2G%KM!DM+x%^CQCYN#bxc190ViF= ztSt$IaCm+@3kr)0;r#=rSUBOAn{u1F&LHgp-!*)g8)HWBLOxP!POoj&^?%KUX;c+8 zKAB}1IM7WdSoZI+L-%t4J;o-MXeZ3w$({{@;G*DHri=tyv2@U= z=FV~#$K)sF4SlnJj(-6E4G6ZmDS>XlHclpJ>|ajYEj|0hC38#}+F2CRR#W?&%V0Hn z5nbA;x#0yrgt(-I~A1f273M+muffv-leG8m!hw% zj@?Wb@mHMy{EWPDa&Ez)0=C7w7t43{OY*>47Uy0j>E8xub6x-ig^ibrA7~&gs~pQ` z^teTO$4NcEHBFm*%=oQcx<32m4t@$FqZde@`uG3oKmTMb9Ytg4E_bjpf@zk|pt>Se zxcOi-3xwt3X%U;%f}e$g`5xm#g4ap<6n{an$T_h{p^; zTyNV2zIul(x-oQJ}GJ}Gb z%sKd6=py9&F#;w=V&?lRH5E$dlR6P;4>g!S|ty37Yx`)-4_9{7O-dP3vbQ~(0=149FebE1n3`zlCf4nfNebkc6r3+z>KcS5vaN(E zM5`Lw{5ij8w7n_JJP5QE;y$Zqp2m%Z*Mo}@a(JcnmnJTalf9CD=9~u`+&CgaHEpF7 zO;siZrkwKJ8DS*>v99}OJdP(hMM_>GRr)or47hF;%^NH0+&P*InC;NfyW?|#e8`jD z1nCH2p%s(1HD|7YDG$J_h}PJO(^*+`>8&jq4YFLcXD&ikCS*$#3-C9+%3fameVgME9D>3Kprih}dftRkbs|7ws(0#mjl94Mj`1r8DJ4_%XPh^l;PC<6$_>Gh8>Qe7C zP<|;g7-EsW0W|{1Y-@1t2_1xHG~^myryTO01|+2N2jq|FUd zm*rmAvxDN64-nVlf(RPQde;=Dy3D*8y49{#Xy}rnt4c}*8&8dV08$$L^Y(n?bLcRH zPg!NorxR;a&>^4TIpttRb^==CDYrskq#A;Z3XUX|%Oo=0w=*%>@c3S-ta5qdWr_lqNQQwZ3b>oPl)tBntZ^uK!T5e}~TWdZ}~M~Q>d{haa&602vM zkL6q~vv|m45rWW;<7LHPBIgy?hMNm`__236@edL}q&?~>K7LTfW{gOoGU<|LV-|ld zKa91eSlZaRK^DK9+1=O`DV;Wzd)11Cncfyf3xjRZMYi%&0$aLm2B(QVlxGvRxGj_| zthA67z^0wp2@}yx^U4p_dep%b-+@aEL}Wt#FiAu1%JAzqNZP`vEgmMt)|Fp#5)v42 z#>KN-vVsZTJ#hI&@o4zMVxp@OIo$$rIK6@75h2Hb)L}(DG`ehwpv$dP^20rzlztMG zGe0BIWoprOP)wj3s(4p;VY_{)j){%{6fK1BP(sI_as+V)Px&hZZ<$1Iwb)=Gb~tmp zzep$iEs^A!&%TSx5sNYXVjO`|RH#a7Zk68CrcBJpVtmx|j|bC{vF!QB`QwpkD+R~T zkukKomWfm`e zT8QpwIy8Iu3D8Kn@)`@*k7>j}7EL~K)N`t}wy7hvB@N{0QHz%}?({{BIrNLi*Y`~D zBomB&k*3C#?CikkQjEtW#b?-bAUw_&;l8nFO`U3!#YrRE-gnSq{2AXs3KTk5!bRlH zW-x4J-K>y1roBK06>o{$Fqo93*tIfxvpQ3tDPy0tF2Ine*n%Nr}62 zCGy{oUf$aH3% zC$FOTjl#$hu~vJ<{zWO8P0$N>Fvk1=?mMwCZap2T{}M^^?BS0F0nIb5Do}%f(#KJJ z@8RpTuli7|A@&PG>>MVbusXY6;+&$6c~D$=D%BCq_sOt=?U>1+9^#bkclZ5DVZBkl zQB+ZXc!WZOwZs3i_KY}2DYoX~J}q&9+J)MQ>*>nzdiiH_V$OX+^RIYL zqK8G;QOE4E3>z@nww#2YHqjZ!mT3B9?m=-ScfRA!eG=!p?rT~iyVfYj!g;zSWEY%B z11e={d@2%Edx%=ApY~GU3YLI9HcoN!>|>;3U*78XU3aS2jvZ3}6rR#xq{zVd^g>%I7A^au8OKu6dL@)FB5I))J=TG3kfW>*$?-kf#0 zkPS{0AR@iZSQt_z!A;Hh6uUEUiQ0^yTz)IAdhmUUdn-l5jd{Rgg`(E_J!Au{(1^dN z?;gHfJ2JnzfuijHX&k*q`G((0}~men}cqwoTQ%W{`a zdb+BYDEM5po+DOd>_mp0@{SQ_QdHnDYTmfIY>qt`Rg&naW8zzuwFQ)fxT%Yi%XvbK zTqQ$Yy|bu@x4>pq(&?;-_biI;cdfh90hDzmmX8>d6Kow5*};}>ELNt~ zV47Q3PwfC82{0mWXY5#qir;Yb;piRbu*{tJhJVvvIw@H~>lppVq)2K&Vxduj8)zEV zO#iA}TjkJ-jfrG!;P!{0+z)wy61qjsIf7XH_Yeh+7#45VVY9syds^);Z&Smlo9NwD zB%PeaT3F4+1M5@zIg$)*oo%Xs$T!Vb)~11j3G5`uRmD#|ZnouZASO6Fc;c*7q-3>K z@w!xhwbrt3A?f6O=|$~Fkq$+^4^b??s1TpkW30Cu2gEX|FQEZ_>{`cE)US@ze+REI zyl}L@4ZibFYK+P|5{2$>(hs^ z#)B`#5a zpQPQ9T=0I(Ia_7k=TXxadlAQ@pL{GJ7U+srFk1~dspiLF&+xHZ83)hFY4nBJk$U|- ztw~>WBH|0jxP+TIgq-_GuS&(J3QjDDu3c#nO7P#vMk(uo)lT}X>3R`Wd^dk(V@KUM ztFJ;+iuUzlZ;Mpr*QmMZE=#*^kg71m1I#fl;tbbk$w>(eFoygAu4 zlcbky`Ay!EqZ944|Hf-h+c+kXYUS~v4idRA##S8H%QzC@zlSEiBKlddmy&x%&+>CI zj;-0>1}`=(`)<<1?5$h&u<2nEEj>LX1!WTjb4QJ=GC#es3MYA}{m{dIWchL;Occfy zgx7>sz(HJ`LD%XXY_37~q)Z`1BSvwlM`tbwSCqz{HA|3Oi6@q)rWL5be|(2tXtZee zlJ?W`q+k!)a`AHjlhxIe#o2jW!9eyYzIW?dk!I%pN^ z;!W*|8<5aE!ZivzShxB!{7AI%GCgkMQIkS0rz%e?Us(}kjh)65Kk)%9oC31OrILJ2 zX*`Oia=k9h({tYGHhO2?kPB50a6+WNCE;amrc+dEBGvng#c5 zgN-D$c@InWE^gV~`N%``1(yVX9fJ@0GLt|i0HHD_DqPta{ty~ws)$?vnBg-aib7xs zO4wiE0euhSQsv^pCD)V6uIRPzv1uBFFR+HBQs-28>*oP4Gv!(y;{~z6?fx}0z%TEt z-^6?upJ|R9I`qTCKh{vcYNzj=a|nXEaVw#w&Nxh9iF0F*7-(i-73cSj+&EPGrH1{< z+ZxskQy+2xF5rH5sCj;eTx_XL)@6y-G2S&9>d^N_@0cYlCsYibHvw{U=NI*zk@~&w zsnvgbc(FD)i{Bc^IOYs}YEE9HS1Nwj?f&JBEd@Mx?)lx}?Zm(j{BPs0?EqXajk#R~ zm1oENrQ$tWQw{n2@8GR`b+oJ??*pi-c9Mu5*zi}5qO}GXuvlKe0p9w zGALO(9ZE+`%EGf(e5rEyny;6u*VQ3x3I{L6d#*oVp>udue?EScr!r% z7#~;(Fj*PAfW4J_1WFx3QDKLvK^)gPi|ClaJVt1Xs;Pv3ROgX)SUwQH+>cL5+h@On zRi(ZorR zOp*5x{up*6em^ulI*->*;dXrUfo5yczKNoelg&wgViuKxSjG14spjN(8hx?NYL9{nkr&yg`P)qHKHIo(pjiRN(-&~&bu_Ygk0-lsvm zie#Xc_#trzeBn~|iZjk(`yDg88b|CuSDUX9#Bj##?z>8&L~)@kT8Ouf$`9V(dZhkZ zE?;Wa*j^9oA#CA^sjM|gU#%G2gkbV&e5PboFYw2sMS33cuMgn8&*=Fm@2M=Nz zg6}8ZvMW1LOUsRR;}>#?%>5dAps3T>k)bJm1r8~cS%v1G1e2cwZC97M$s~4@RyI&K zhe+hIcAca<-~dhfYTo^wj(d9FfVEfa>=hBRL(>;f$bZf@Uud@I zx2Fdx$B=(7YLDo)04EBVZw{KOSpdn}$)ON6W5`{Ynw?Z0LgFO{s#n&p`Oii*@_?h2 z7iUv7jZ+76;zGF$(U5d6+(??9y;NLF&E?7+4H`@#Z|eH?TJwo!1K}=SVnmRBKmdn1 zix*~rQS%R$Q(%~dAwqaZWgw=F32{QxTNH2Wq*n%`iR@c?d9C@0X5-0v+n5q72Gh0d z{Im%u<3VqK=9C4}tsdzmof=Lh^7(`DQI0a6#=W#f44<7lga)|LoT5UD&%wG7Yt-06GPVL5CmUp2-l zYR@e6ZgLAuMP!=1Z_FiG*@59CY1%yM{gyw~9NoS>+Z;DS?5IR#^3~>vTXK(hT8LIu zd9P3nvg;$1_jy|j5<@l=4~ige7L*XP_VlS4UfADe0+i=9__B)h zsb$4DvCXTZ2E9))<_Kde{D^QU8ti$2Wp@w8hbpHLQd`j(X;$JPDLJxw;$E>;OcS>= z&iVAl7G7Lo^?71+_Em?r|9sb|=s@31i9Z4$&qeE(?cU%;LuWsHgQjH=Xx&S;>@+CO z4Gk(uS)5UZgiUpYeo42+1Ea}_QG47?M1%9^bPVP1#fAKL$L@I<)IQskkEKd+`H^Ul zY4%rYt_Ohd{3Cr$p99M+f`jY8P-B-i0TjBL5wgggTub=)T)FbSx&O`3LRa5Oa!PnQ z!H_0Y!ILiTo1AgowPv2zqrsno58dxq(z!Hu^hoCjVP*QF;=}3T9d*- z?F-FO82_^?}?KWmXI!pEDIqbIR)o7V3 zT3qfzsZ^I3&&|GQDy8AQ`Z&g3E0&-Ut8!jSeHL+^bR?PK_TT~%<=CNdUfUtBfS>-N z`Ss?JmAomfFOMMOUA#=rR8tIu^?Jf_Fr^z~qvD?q-U?ymv3a(){Wlfh8_}CqB;$7r z@4h>=P`F~V?8r81G2n!0$ym$XENzu~ACy380>ZfuRIISF2%hN*fJ@y!G4#wY_g2-= zbpO=P+spko1K<~v2SXh!4+gi3gl{!<6It5GJB6;^FWD@72Zg_KM&=C{&&~DzMo^Xu zC?-__iVKniiU|x^`n1SZ#0=$#M7QkRjgKd3fa;reuV}r&bk|9uJSfK5{U9i<)A7Df zT~`~+!8-_lI{6MNczHa&`eEa1YSmymB!pJAipuw;cI$mGN!7(HTv|r7j=~R(i*}_~ zJRfPQ=&Ph5cfjC|(O<1athIVB@f>8WbmhE5v(%hogIPFxsD0ms`5s%QZ1f-lwmVOf zJCIjk43(QeRJnXu%2L0w_aU16MWgj3m%wlrrfdD>Yn(qJ4#qdH@f_PLRYtem8Z-?HLg`x8D^v8Pv2>d;yO#R$qJar zW;M$@kCAom>KL*qSo>C3Y0;`zY|F$wuo`>-y{5u66O#@0iek{M4(N;@$&X(#z-2`^ zx|g`PkQdXDzl?Cne{VKU`NFxp2i;0s+&UPlBP(t+C0U6Q^NT`UP)w^pd&+GbQj5;X zrL~t>f>+=)PUK=KD_l3r&Z1_9{mBMd@tY>GJ)(>~oLqbB+oPb|fMcg#+>Tc}x2XJs zOsukbaPa)!YwC`ZbVO;1c1Bq9>D@{ReF#5C&%6;jEXOns2#Z&(Z+vd=>hbKtO{}F~ zGN6m+OR6wp>fG2hrrT(VU%lS=MT6)_T4DLDQ;=Dp^KQMAaDn?JYRerPaTC)yZ>=lXXeZ6Y(%ka@S@rq4hR?Xd8`vQv| zV3}hGZ}mIW(AWm((<;Y%Vscq1BHf@xRva`J@8M#ubee^y2Bs)&JSfNWc5pNk*|=M9 zPqwABGcD0D_fF#A@0!h5tKz`qafqY6i2V*k!`<3jqL@MLXU)d#d=hf=!2+!tU?k!X zO8K0EbynTGHfWqFDF%Vu`en26mw644~4PGo7^ig&3tfn=_`1G|TdYb2j^=tRPfZmn#B z)byllOy&imzJICy+vezBXIQ8%(c0MAqb?-#Z?L<*nAc{cJE-k62%F`VWpI$dP*LYsm9=GtsMEQPbc)0g%GK(fDwPD;_ z5yx$9blMkZW-dP~b&nhn@)IPKqk-FlOsdrBGnqoURcgET@K|PUHfHk1gy8Y<@+%TV z-w3fCG-$ry$QbG*YARy_qgRF=Fxs3MJD*vNvzgvleXNa3HH-H<5vETn!mSSL{(QOX z`dhz=tKmI*YkR6bDhvkm#7e#6LuPpX%Nt}Rd$J!KcH@SE&oJERp0AToG^3N3UvkRs zNm~UcRB{rFW-v|yi%lEDrwTPkHRceOn8yn9v$q5B85?es!eQ$<0{gEyXe|L^Nq4V_fQIrWxE!e zZwB|#qu?a6X=2iWMx2^YkB;@nR8g4XPvUHT@@${eYnR79yp=piXkc%IRVxil394Lu zVfp1dO5|}^3i8$T zd5(EHJpwKJ6_Zq|Y_sE(m<{_T#IO9iG;7hGv)-~0*S?*@sL&@A9wTu@UwUx1)Nnqeln`zI^UZ+wY zz9MbDII9;3_F#o6y|DJu9+6P$6MD~tPPR`>lPJz+0yP>NJ!21b{Kdhm_2+Mp@6oXY zSdT5oPmeTq#zt34Dz$|jfb0`D*=g$BANX?&gLax-bm<(r-tRSI8(>6YbZt`lhJRhXUHb6AHT$r>2? z4V+eneO;f8`Zf1XX%x|&zF(G)R72%o#rs|Mh9&&mocP!a&s4$h4gSB=zltF_{;DBS5UAOCC}}zcthOt3U$|)Rr%9 zo>0P-(UKGh+7 z_h@(-g(Qg%KX!fUvFW*~P>@L2lEeX#Jeki@N&s>ov@|Cel=^)1Z_7XbK5De!E3OaO z54?>KENe*1L?+gZck?FatWcl0D zMbc0?%3oc8c@ksMr%o5|T&w?jeXmyk*>|=2ceVPvsnvh~^Y1G4@~QnkD)n#dQ;l7x zcd2@BWlzCA;=r%BqBQa%QCK3ssAk z20;h#%d<=gP?Ep0B9gNWm3w<*abwlxKR1jok&eVsTK~wdAcX#9l=sUdWcRfP*a^8wZ zh(q~D;1Bv$#U12mDefjJax2Yf2^M&uYv=&4me~Ps$2Ii*NTA%~8+vos&^uS%AKs_B zf9YM-{aw}lj;cE$BboQZ&PcZ3F{iBsJ8k&Tb9Xz@>O}t4E*8a@O{TEkdNrhYKp8=F2<=()-F{zvBFqm(&ns zTa+5tI72K?9`p`X*Ngqe@%UJ4HNHKh+Q;|A)s-K`I{c)%G2T_02IB75frS&zg2%Z_ zoxN5pER=-?QD(^+TI2RC?$qUt(dN$W?b&9NI-SSX_dE`gC+)OjCS`nIpEr9bbl$I=>C>+L6^ z6$t`2CAO>D5$fACZ|ow;E(9rkHLlC+h7^F8Vqyt@x|+3HJX4voy65WD-yEZw-)Gif zsnq4pgT6V4R5IwJ3B^4}crR1vK5fCMg^kO7TDb*@s)BE2os8llCb$ET-_iuv?11hx NLGAwf+;_%m{|7tOCHMdU literal 0 HcmV?d00001 diff --git a/chains/polkadot/config/res/polkadot-v9430.scale b/chains/polkadot/config/res/polkadot-v9430.scale deleted file mode 100644 index 6a5c3ea974667cb737ed8b36f7a8e39811509c67..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 386413 zcmeFa4QOQNeK&d@?b%(eBPVhz-&ejUmy;X$cH~z&);e;K71?*SD>*B&+Lc#Yf4ugh z8Og%nb7!37smNWp~^Qg9(J zq>#e>{r>;wdCr+H?P_f~ZgHDrM>FR6T#abg7FE$S9 zt=jZbu~=(YTdSonJQf6D5Sr-4_WYNkFFbage+DO_AP9!>|G~) ztz_T7TivM*kF8cq$!#<0zFaP}3T7-AGh@|SwU~?=eIPKC#agx5-cK6MQ4?KFb}n#w zd|hwUZk9{kUr#sNJ3HlKIjOcfpC2t@f-#ewE(k`k%#*>`$YQ-vsU)qf?Lwu1$(v)X zgL=};J{wM)*Wb)|Flt738c8y4+;@SA8c8#0+)PT@FUNNpwXY@B>{nwumBMaw!sJ$N zw;F|~`9~0pV-=@^i2 z3zb5%8HSr?G8i%A)mme}P?hcq*73 zUaU9D`{h>oX0jz99=-V3<6rE-qq!g$8V=@1Ie!DEjTt6(lWNi^7spHG-K5zXUzUIH zrWvi&cAJZ4@!6!fsNb#v*PaT3MT~MTICsb>x%BzKjOErF$yJ?gI9N8z7l3yOP_MaC z-7Qy>)lv}5nF&tQo_{Jh6-@dE?&9$<7~Mz;mAiNn_;{tYmo&ocY(Y@6OIxYlEH`S^ zeIWR?I*uzT@v<%B=Hd3?<3;THQgEs3=B?bs^H&pGE57Hv!W1;dAv`F9`iFM)EBDZ+f@pRBO0@#?4}*98 z5taA1YVu{z3P*y;;79tbY^)vYD_+hAXN<$4%AoGx$Qf8F)A-+A_l%+7x! zh&CHZq1kQ#^i#%TaLaz#HQZCdZwBW;!fuuYfuF6l1Pf=3`HqLM`*G{0{Ms|ZSTG5W zoHPc^^ps@2AZ3 zMfu$G)OY~e+|*6{$0>i8Zt8bEk3SSlTx*pp}m71ecj!UEx<#b+mfx~wt)Baj5`@j0wCwtjUi(&wM$EmfAvq@K|!% zKsLVoO8Lj(Jq2> zH$yY$M0K3~PVIR!>%{d{{0W)%+e_6bac@P%+I}6%Nm7cMI>1i5QaOkh{kTsT%9W%v zZ07y2NuvQt&&;`TSNL~uhj~r7-ZAfv3>!~hsFe~YY7T|#`Gq3B$Vayd&8V#sXq>y8 z+_H*cXeJ7(A_iu5b78^jix5!vmZEBME3&`K2t_a_Y%QMqN*Mqz-EojGd>)I;j(`E` z7yzo_exY%La2SW!4#lv0elrR>vo~udu&Rsr6r2p}SE^C1IwKbm$_xjH_6qenbd6FR z*5wqVomwM;Kpv@JYsHWF`9bPe*I`2KQq^hFIL*n7frT}jFQw-rYFc10_Ca%NCrR>V z6apnw!D)lskyk(^pc>E-=C5np5k7p&-Z)8c-)R!y_*wm^T={T*JFT zX*i>U`8h2*&8wnYm(hN=p=Qe9K?BIaPmRJFxd5vw>ZX_TA6_b-sI^O9Zx6~-N z_V$xjxflj@vzY#=PYefh8IipJiL+(0LVTg3&z%V-S8neW+Avy_g8PEpg<7N0u2akp zJ{3$~s}^qJY819BNiY)3U#-G`d-E6dj|t!%Aay?W*9*2?7zSC&_nw>DP)#|q3VmF&3Lotxabr`y$1 zGrKYz3Iz892TB~u?D+&sTmzi<+xs{dduSKr1_mdB*=yAs)!MDU=AQyxs8ic61YGGIbW$2aUFv*K~Nu_gC<|_htqQ~ zW@Pdjuj~#M2y}|B+_axfFuz>B2@$DQJ%8{&l17a<+{(hC-}#y0*-JDtTus1Zv4kL) zxLmtbI3P_3g4-kKEI06~W*@Tcl~WLu(OY{-b=1s*aLBGMw<)>f_~a}{Vf+wd*t*ka zL8)u|Nz^JdZ^RLRRfObox5Jq5l6xaF3M>_B+(}9!W|RYe-BdR5&r+!b(^GS?b7@Zn zX1HAXhBIkhULeu)Fm;t{Q1KlL z{2)sU!zX2FyHGl-a(K$)s>JB1Rm0Ta5nx~h4}>;+hmAmN0M19{W<<6e6`XYZ-(QFE5mr`TQDP)%<%A) z8)5J*JQ<9Dc7_2i8=k}$c;#hp(R3!7-g`DO2Evh)V8-iW&H<$b_g;GPKn$EaBvD9Y zB+tDsn(%hN7aQ)4c;Z4ODKz@MIuurVUadw&eLN2T*xYyK%ozgzML@gSx}Mu>wV)9_ z`e>5|?X_lAq1+>qocS(6b(u7n(Cd@0*WKMTr| zt8b6YTM}ihReb?$PTeY zhKqAD`qMCT1H_Kb^^9V|x4K91ca$db5+uYZ*RHx@r{ZZlE)C<38IGFXf&1-dDE!$W zvvEY;(sHXA726Hm)Ry1i>hecQuqy(IAM|Kf$vTGnwHhP1jVA zl|fTV5pb^QXRwsJI`cI!>S((SDoBYVTDc9ak@k{8WjU$Wn&sB?ZRJ9c_@Xk%Ii&D5 zlq5JBqDrmVjA6)v?Gz>?FgrL=_IvPpxYdj6eb+t|UUFlp`jnJFKXMj`8wr5X57nH9 zCkt@VUo0?Xs}PeSTwb_5T2w#O0W@H|zKaXPpOU`16Ousz7;z*;IfXE{AIUiax809Z zaqe2x{c)5TPliA1nX&Ch>X_3F&pXBWr{arOb!}G@_?a4I>TTi*`yl6IE|$bVCsvs) zm{wZt=Bs9WLp}tjhSyBbdNXh#1GejoYCFP@cgl@sdhxM#KGTHf1G0ow8{>DMh8YOF zy0Ht50%QX859VSRJ>=ocg8az{vz)NldlZ154&Rjx=)IB?F6kY>?a3waZmd#J>MMw# z|23!L=sDctQloI|D6JAh>hodqPi#O(h46fo>Cc3wXL?5| z4w-zv+}uv~3OCEO##B5G1qFz8lxgn^U+ac3?0gsm2MYuMb#Vtje!krp%q;uf(NFab zzAb|&I5UG!ZnT?JfR48Kk?_GDn8D|$19i_4d+!Il>312NXSpnt(aHK%;#Zf?a zfB1Sg=y0EO+-~4S*XnQ&VS8a;lKJT{zvLk;h~Bo($K$KbW}ENzh45#>8M9ey;X;=2 z7_}vN8xl4&(JSv+;)WrqISL9?oO3dPvL5I_PlM}0 zvGJ^(n$2q?&XkN1y4|}SVxCxk!>oDY=_FY%l%c@)g4=+Fl4RPOLNv3f4&kw7{Yc^#+kb_*PVnz?{2T zsFWqJg>HBVn%$5zlQjME#YXo}!SFS+2|!_F8fWoxs)|DV`;tIWMGhw!LX#tC{iHMc zo<3>?k#h3~e8x|kvgZB5Z8;Ikz;S?$-p=~g*@R~+=2CP z!Ite$S4UO?D;lUy8mFv(oY3!MNgpuP5X6tANZ*Na9s&_2_0vzK^EXw(Ac7GZYSFN3 zm=o~>lBO7XM$Duit!Li=p2lFjZYE%F*@hz_Fq1O)7S1h;3n%2x$WPw*q|^H0r@MZD zExiaC5oR7MVU`=Z!)dkk*mZ9bL!5c4VV526U8$60BfwzY3ruW9IYxMaY($1b*;yO3 zp=cWpKSZSq*40SXOO~hOTA={O5eQ6znRLaJ+`wRlMVPJ=D8g_ZwJW7%8q>fbVP&KH ziDt76Io785ZDAih8GcheGt_8+a(aSIVZ-9I#XIBYAweG<`%aC%oskLz^<*5JI4+7k z?C7NzF=cZPAQkoVrR%|(xqM}FWg*(+V`4lJI~FY3&U6CG28Dlzc5g`X5CC-Cn`NAX zkAql%(#Llg*#k-vM^D#48&?_y7-9F}6aK!L;5UFw@M)SC>Fb5_ z6!JU|fKLcT!C)VyDDnD8r}HTXioONvQ$-xEV;8ViJ1@?6hr1+?Zt%c|mxD_lA|t(0 zZ)AARgc$vk()Y~hHbO{(;0?sSz8-uJv9Ce!{qAu+tjuT*1j<1U@}__l9(Bl@llqy) z_#wof5SUAqTXYSd2!c1gozX=Ac8EuT2`6m0AUqDBZKb!&=vVMhU?PUpG9Y8l%wMS& zaEmwb1%owU$A88E)j&{5pTU4MxX|(*TmfrmQMQ@quz9d_^_e@CnD1b1LS`N}IX*iB z&9+!Zg!YuI0lbaIvrZ~c;+z^uc0d{RyUX!zF?W}o!D|P{Di^NxDj&vBFwnm3!|Y|NSr`0vv~WGiiGYRtUI|q zEj$R9>NUZds46~1k`#O=&KXGOG>A6ayNr1LD6h;9J-}={Xcxdn<^h7Gc5AN&moB5x z%v{0#b+Co&{UbByem!9L7Hrio6KMV+At)jYh&Qi})1`>9PPql>8NPbK8Sve(op03T z!FU2D4_NR@@Lj%khc{r=;FBLE6n}(B>>md|#^#6Lo(|p~S(i)-8&kezAv=PbGrr#5 z272Sc;2pD=lpcHh@v~1XEVysq@i`b1_P5LnVK)EbUGLfU5xN~GCo1X4@Gmhc!1wS6O3wG(t3t^e_I>5k`OF*ncme?tU#``7nr|-& z_lRH{bJW9L1zrMAVJO84VMWAlDW0ZH1LR9$kIe+g5I?y>TFh1lAY_L#Fd|no^uXA7h65iYzQJu14Fj#=gh(X z)GXRBQ%w13iYdJ>bYRMRz|EfpKO=4iKM#K1&70t|fuE+`NQNhuT)vM%NQX~>LFzz@ zCcF1DIWQxL9m)PZUIQg-G=E{19{d6e{AKXV z?uA`k?HOj!5}nB_-2nnNAZE3b%p!wd`77f?)O)YYGV%^;00;%Rd8kqN2t$pK@li9$ z->@t=Rn3HDTRmn3`bqZ@Lk-!~lRX_s)o)lAga)LR>P@OH_d1^m--RPvM|A5=C#Eul zX~|e!oHlGg2=Pwhc?1 z0W{g#10~*rR%?uzV|?$X`vUQSFD+#kq=4FO!|b>Y2QtYN3^juX55qUG>7Eth`XJm` z!JKY4o`lSGSHqs{KWroUZR98P4y(aCqFo%i+Ed{-`s@}eC(QeZ7s3EBQYk9QF5PSn zm%F_C;{ZCO|88CDboi4l4Y1?}vQj+Hnl``!L@iNY^peL2^zx4m4&)pT-|HIRuNjIE zGz55Z+OSCIq{MljYZfDws8wSSQ(qhCoIAcP96mxdH9gFXG3dS08-R7@PS|-@&3>ha9^`GRv@P{e($n+_aZ>O(E&>mbwPdr8h#$Lt2h zE5};Qnth)NKGkC^;5&3{0nRBdM;qeaB$_}>qNlUZVwjp&cNa55vqr*~yABgW$QbaK z`s;LV-QFujZ-Q~qfcL`>SA;99lqmVBVkLIPJO%sT1r=N)2N90$!t&%%q<`0vOW{O zcjRTcc%w`1O&7obch?BPp4{9Tu*N)qqL**qLfXM_(5@~~F7JNW#$p``@X_!Mx4!hE zh&KZE0lFnYUaA;d&+sFRoie7ErO)%;K?)6&Xx2ez^EGfr;?%4JH zF7q`&ZiD%aGGp@H3k*s<*=Jh0;x3Dr_dAnCY=$H7OoR?1BU5R?8DmEI5X1=UOUPsn z2gs#>mc(!s#Ia_6FeBB%LH6$;I5TJ|Iy}^jVeIYxK2K@hbLV}8_X*;l3IKS`ib4#Y z?v#CkT*~eFTMzRGkRC82%T~@!6Z|^lEf*X$;YF^|!O>AYve=v>Q&!yQCiN4DpCa`L zOe%7;`j1At};FSxr@irzia*!a=y<-bzxLWJ^>g1hvrK|t+bcGCg_TZfT{xtn+tx>eWSBYVI4uws8cLsU4ez)bZlE5y-0!f4L2 zP#Fj4cp9!1_gF8J_amQxI+`7s#wPcg^F;L-9ali(YKME|2S4=S*y@lL{>qJfRNkTUrjfKX(1dn-dLAWsG@e&X`atVB84}46#Jr2hW=$uB%Y?z! zh(=Rq+C8icS(?<5Mh=0{-C^sg@EVq<*9>7HVi=I2Grld_$=n^|1Bex2tiN#k9Z)NY z11+_+#DNUau78vo{ez#7I!NuGkUC(oSl9*<^iN3LC#3E_H>rEbjG&AJOct#z=YdU2 zAaqD~Vt}5QfX=ZAH99oY&=9ti|1>{q%+F~k%q?zGXy~jRg6zMY^6pb<5(7LxSzUPw zhQqNHFb%34p#J+Rh-HSiP9_-be5fzX!AZ5&-rb{y3ic-vz=;H_i~7=NSFagL8*W$5 zXOq5&sMRD@f8;snx$tMfeFk51gI4A?SS%v%8G@1AE+FJ8DXkdls1gEEZ#QUJjH9I} zZ{d=A>BX0>PeBamT&pnW%u1eU&Kfw^bJzt1CI2I*IgJA_f>e_n@n}+6BAsV~bC`%d}od@o@d_1>e%WWX<2+7Su;d`ry`K9er z1tlDdbxLyQ7_4ysd53B#R6VR}-yds?{BI`oX%qvZR23rw^XlE9VsK)3iQ=6Ml4666 ztFT*!(G#&aQ9-=7#DyJHIAQh&g-#nq;5P>;W;SzB%y$B!!Y)V~s6VH>Utk!%N_Ps~ z9<+V{>^hpoA3I|4AZBW(-UJC-qDkpq=1T*8J7dvKjy?fE`3-0|KpF+6(LeC^igA)b z9QMR&+byWxQ2{0!;3{@tVO?wFa7l5`W+2=J@4=)?q`@N$o6=`gL(!+2cub>tDo88z z%V@^SsLj-3CTr60`<~`pTQpVEns&FSFlgte!pE_5S-uWAVDCVN?S#7qh87da^v7{^ zr96DZ5fqUp4nptL_;IV4B25);+93QXDWj^)_6SA0 z*Z$%5+ev8)Ew+_*&wLGSUqo40BnUxaKn z^|!+ZvUH<)6?ri&_%9wbTvQ4YIb$d(3=}Wdtc-o_L5y4AW&IYBrF?&x(w@CRl{;G%@)+;+PJF9-^e*dhYsCTmBZj#d#t9lrM* zX&<~l()6~cJ*aajrVP$|mD>xB;uS=zN9;`3f$rbOF8pmVIlxaaiW3o$Y zOTsMsj2edDlH~(GYwbqQF63oorjXSE6LD4z`!UUF>^ZBG$Omz!E9`0qQR+-ZVhA;Y zlJFm17|Se#+;ddTaz;2MTtz_q+lZXu3CAvL3(YsR4)JgOK7mS@tLgS#@XLLGzO=Vb%oddm@@uDrsvRb9R=4LW%rfCAfM>-7qY|>1Z z4*h*N{4uE)GUH@CdzO~)sCcgzNbu8De)$Lu`!i-F?~TV@mC5?jm*I>96=~_6-nrf{ z7`)yYIO~0(L^#OVG;;QHn<9Q0JPNUB;*NdkdWRdeXCf2+0`t7|q74Fm>AD~}q!D%d zf;7>^GuVat5rX_|>LYOO#zJ3EpF{H7wx+bh9SX&TIT+m@fG{s+dB@D$i0%Ct(IklB zzwx+1COAK=mYDcL%FSFYV5R&V<*3?FT!uRW1(jf{_KGvY-=+8|BxjbLnbJu>DzdZq z$Dc6f5{sfi>|k{ZKiM}pmmgDA7aE&IQz>Dg!62_alK*x4@#ZoD9J#n<>G`^H`k3 zM~6xuA9?sPm+0chfpv^(#`r=KExn3UA+($Ngx{3cCCc8t34pfJF=G?H!e@{UC%bTw zn1ZBo^>xDdrLKKmg|te5-qZR2T6T)4!NYfogO@GE^Y$#ga`0kuX*@ooY-5wL|C7fJ^b zd8R(MLIs8|D^=YKB!zs0e%f@y^oQF{ou`v0(jrxrgZK~wPVN?0(F{%Wl05`U(32bHHdM0xrZa zEN_JQGX21ML)H|RM7)xe1Ivo8{-+6)gY(Ww!9-7*-fHyISE>K+CzR>~^8;Uue#w|WGtH#3v#`KQg!S^)UKvKm zDgq*r`3@fgdR!p1tAXOPuCV>WLgyn33r@$lZ()JsGm4u3K3!`pYHiTz$W9M$R7Z9D zXN>vFW1ZgB%+IW#qgwt8#{9)`E&y?d5}KKr|Gr@Kd|?~KLo@OY?l6iOdSJ%_N>2I^LUSyH;doAJBSYWyt*FagqSvP{Oyn$gHVv&x+L{^Y_QO zqV6skne_~6fbqp_2*gxi*3{^&qCxy%kI@^T&#WAnoIoEq6vw}?5k-r=|Ug;4v+|k`6GxvC=m&rdI zGaa){Q!=w>TciBbG0$#$uw-WMXu0w)$9xxEbC=BgX$O}-IAQ+uIBC*4+rngK?q~?} zKTjMl|8}isGV^!zm-&-po}VfoYX@ZJ?`>D}rzgzc9OnsibjQi8#5ceBvlGXwyRgMh zX5KsW()sff=0A=T94?{`h}qT0C$q-RzC3>v9&I5dBEoS?bv z+XG4Kpv-Ez`vU!KX#VOrSCVN$lvza%t)3)C)@D3}!QX|)e0Q?bWmfWqU|O0MZS0{c zS1Ans^_bz2nJlx4xt^{||8~sq;5t@a9mUK_9uH>qCl=LVhrs_Gn!i3y1j){pS;rTB zGpXM>dCYu`-KjD&&j-`1RTPRrWhzt#4};%3dAv6yGg)R8Pq;Q&zkl+0X*!#6W#;Ye zxb=r8kN0NEjX*Y>^zq89|4!Sk&EYRMw7#D!LWZabc>uwH5*qYevW-3? z2*76bO&ASq|KZ!}9Ai_(G2`jp4z1SF`gAj?CI09Udf?w!afo=~7`R=F>i)8_P zhy!3&4i<|T00tT2Z^RjD=f-%2DG;kBz<-beF*k?$wD@8!cqR>ybkQUY8z7n9;PJ@) zhISbPT8Yi?7Y??QEe%I67q1!f9oxIhy^Atm605$*9x$vDuU*JcGRq*g1*L#dxnkH{ z%sg(t3~-;YD>!4ne!g~lQFEG9SwKQv#$gJtB_hnKwdw)l1DiNGHx}H`?7tO{Yp?{| zvIBPE0#d|9i$Fq+`5-7!X{cvd1TAvZc{j~g6)nn2V{Bc9Vr84QXBn11V78A3%!b0} zH>~>=aFQ+PzGf9#x-0b5>fF_d@V0}FeaV5L2P_5Vvm=_%{@c@r?&AT6F#PTzxD(0Z z0U*Rw7Y^cew^@bGmi*d#@*ndppA5g<_vpJe`(YBIYbM*N?dv_A+R)Gql<9>u0|z8p zJo7zNX><;mo1i%McW}e)1Jv-yFz;X#6(ZU37X(v+(q$muFf|UYnN@AN;|7t0C;TDN z>mVS$>6#RJL~j95Vh~>qj7DZ2@>5yS7zLa0H3IZtbprp;q+2&;99;q5Xxu6{;pHd( zAYB$To>?IBs>Jo7DsxRj7j3^ED4LG{`*9YLDcHGV8(oqq;PDeF14V+xu1L1W99E_< z)H;{sVos28JU#doAdyFS3bJ-3)R6WwR;OhVaaVL4?4^KIV6XCs3RQiEfPuj1&VQ(Tnx4fiVdGB%fuSSEhbZD)HzU(Fy=EH`H9hoV zM{ga*DYdZyFzDY@ACG#Lm$~B~Pp!^a}H)&96S%m1Sh0OG| z17ptN0f@m@SO-qt2!hcwKtXna$W#x`PWfo2dz4MJMme)RN9e+B;Qh?1BQ^7U$*}Dyx zF!u=yV@eq06fzxxhj8uKAl`+Fw^t}_vRZ|(7Po@~b|d%@$!Nh0U+gIK%?kI;<|H4$zZ>w-d}*B>+waeNH_aGFkULN#{Ik*UzQI+P&Ol(b=!7btmAqkL9YH| zkAD#nw!uC`-BY8%S5c0j1LWjiU4_;AmCJ7TJt~DYiX>X|Sa4vZ-?%MVj!JnrrZ5AcO|}LL=vTRV z6P@2mEXY$tZ*I^Z&=E@HLZ-pXZAHF%p;|7wt`?FVRsNa?KJU~atU@6X>JGXjlBm73+8Kq<7*bSJDkGBsyoA;=CZnlx_U%N$W^Z-UYq;;=OaWAg5=(YCFv~H5iuS|>`p@Q z8Jm!*r-Zk_KuoOpE7eVRS~vj|6=JQU0t>7F&N{?Y0i&Ju_Dc%*!cEez_S-sSgw`s^ z7;^8$D6wg~Sy6FWE|)axePMwjJu4)gi=uq3x@C_h$xpq*nY3XP1^Eg<$_G5i*`EU3 zXw6n+(gl8~9N-U(Z=ZoA5k_bCVDZ>kks)81j5lDiD~Ath68*VnUxmpX(gazyLj@pe z+DjXo$AfY36Lc8jkt_f{V4={BMF(Zskp|12r&^-OsV;Xo4kX?G?(k%5L*$yRICvju zArnK*q>v(?tzIg7((+g2)P%6ITRcVGEDpZC0`n{ig06Duy1xYNV{nNeE3r8l3f^>M z;-o{wSeqRpRuDySQQ7McA?-Mrl{8_*wo7zoNa`Ez34yAay>3#l>e`*cNqJukzuZ<+ zVFjt9yF|K(O13^PWFrDuF2kGHaspjIiYMTppdUyFYg-DLgJR7e5c&`ERt^GxBbg}( z%5)w9ZegFT#n(9$R%FkSYZHyf>cM)jR-tl6dWwTEan@#Pbz7s9oBk?#IuHXCW*_vB z(eFDE*9;G=PiOd{*;m+?la1wZGxP}i?GI@u{$eaaKy-J=*$Z6uyAno+$k>m!E{JTO zK?b-q$flL0+%1K5H%I7QW-z%OSa*7fVpL>4H$5tu(Rxmo@;;8FqdrCK8VlXeai_f3s`qFWPq zdfdc9wG#boFR3^yTgDcoYD;+^HMOVIIER4e^GMJ>1@sb|6;Vd=3uVGySedSC5P zAHvGQ*(F0fgh|#Pzb;4?Yb)Z_;l7ofWG;!jaf%+0DcQqGm1AoLj$!IP!Z}(tmR?4% zHL+Cc)mEM*#=}Ad4yzgPPP9FCXzECB9K3M|BG`Ap@GAI>AEHES|69{GNY^xGHZg4+U9>^{N9hoIiz(!x>c}whEdB=yX zBtqkhZMW5kA26$GRMH<2hhc9D3Ey@CHBauoR`Eo{1^Babo6y2eu?2_!J+*jyNkz?- zZX{=;fv}Dmd2#UI5$;)D?^&L1bY5rKI~1*2BYqzA%GLhDNq{S}(i)1!u%gP~)1d6M zMKE_Bh?zxsMihQiQMc>2@oPS4q>=0*0s-2cHn1XW3!RnwzeEBlS_?G`3nUew-AmhW z63_%nKnKrddUWuJ*Lvei{xaQ25~Ooir2g4G zEc?Xx3uYs8f-m-8_;pe5rz2v3#Mcxw#t0jsX74Z@nu%U$a9K3QgsC{QQHvaL@UthL zc-UQTYNZkS!@_S0<~MM5ca*{VgC1Fca?RxRcpWqj7R|lZe&zFOD~%nnX59yppgYpP zTnbtz#)XR~&8DM&+#0k_%4u#~Cd4~TPt{K1ECA#8|AKRXQRMTQMU9=E3+ViZ>cnd8 zbrX4Ul*4bi@zH%&WX80FaludmWMB*(ukPke)8X8Q5H_QnG_Isg! zDlT0&ZiiIngr;Sdj)l|!33khK_>lS4(ppq4gcuPKDKLbE#q^5d*=w86Dg<>3a-fK` zyb9{r=QyR0t>PvTI>uOXn5;x2fi-g48CT9(LXU5fRxys_;0K#HscwoRq#w%^g5v0z zQtdeS4x}40M+lgF7bLn|FXOB|*4m?il^#!K0Jwl6*6e(XveMj2DS<(Y^{y$W5??xQ z7dRXYZlXIoGZ@(!h;U`iL~btD1L>fybP`Wv-EDTSkWn3nv@#qf2C=Y^&h3DvCpgYp z;{^=r&XES9#sP>qhOjgV7g>8l3SvtU@D9!?1+?Kf5xm%KBg7rmrg2QQ*CNE=CG~zw z5yBL~2;5Gl;zgyyUcJftO^$e{9S$jno<2N$IKJR8+sFj{}W8C3ct` z2Q6TNl5}9rnlr9hIUxQve#Ouhp&VN4N!e9E#JFbUN(+Q<6+qJkrgCQV6d_y@(FDXL ze^$U1AE?xYd$uq*rtcakkJ8a`_FZCdAXnx~3!h zx14u=N`gSPr2O_)#BxorEk9}6)e7`$1*j#K5f~Io7pu~?)kjd-k|RfbYkK0fJR#7b z1o{-`I62+{g+u}E{le`nsPo9PVkF%ArVA723kG_(Qa#;pwt%wQJWvgtIeR1sJajz@ zu{NdW?rS4D#?!9P@?`Bji4hY00S}+Cf+|&~c+4ZAq9gdD(ge_xa#FfwTd^36hg2mC z;(c*a0VQ>jv{6c$1f8&pubFG8LWSV47xVl(e?6C;DoV&U@O``5@r(Y6=Jg%YD=n9@ zYB$+j3>r1DGEAfv0~=!Gg4|I;vEVh_RgD@b@Oua5hP z%P2+*+<#n$n^dvEcGRCKaUe_;;5)!SdrJyc5R#OzEG%>pp&aBo%p?Jp7#5|xuqbQr zl~NjbnNSZ!)4F zD%?Z^4=Qad=EeL4Y;R$qclXz6va*6HFic6DQYnjlZo#}fOoOk-eG}t0PH-kwQUF^3Lobp9OMG~xRmLK44{sT2kp|LXH`Vsm`WZ+Q5#*t zpxFDsfboj$z5`&3rVo zzh{A`B&er}^DXyw5tn2*R=VP{SF9N+l@J!Nt6S z?wa;hr+|PpvC26py%Y4};N2DRKHEq|@RpqfeI@Pfl`c-=>ae#;0`?#p9T#B)Hw3i? z7NCu|mc?)W8G2n)v0Snqf~?OTS#!DjP5;fik)RSuef=h`q==H zVd2v1+UjORGXm&+TF9a~6(d;YJVTZ_2N^nRQJJ7Xg!B+2_jpK$AmBj zr*c1Z2L>jPBCBm?<#85g<&N;){zBAcKq<%=|Er*Z(E{6QrDba_1@R;S80uG-tZAJr?Fqv|Ir$vwE2 zvzu}MC+XJdhJxYw72^&_IZpZ`g)`hRQF<+A=pWGNpJXk#SSGh6XIJ+-c~PCN2SyAUoeME4ju$+7tF7?&bOevK=8I2DUS@{Lo_pDLJ7kr zil>vloZXrPO+qjLDpAq1p&Ue?j~!MDG*X02H`FaxjMAd;@x#eWq$idTyD(!0&nCAJ zx-Ch%XU4z1LE8e)3n^=0IjJ<{UxfH3eM7n}I?h(a@R+_3$vd5_cM-W%ad&IEZvrhG zp~DH=y2FYfm;$F@^Pp7;gY>HX)%OdvWJ(qSw3)WrSJwDGh`)`tO|0(JrRA^OcfR@P+sSM6 zl|pjBiJ>bhC_qj^pLnFDDS#BVK{TUk{JKtVRfAmsdw(42p0S6WZXdtHeyf1iU>1K! z4sUqWU^*|0y;Hl^I^4njVP(aQ12_;JbHtNcCS^d(f4hPN8yY>}O`GfZyT4!U(<46u z{S{)Dl3RAXgiPhB*$c^T(S@ai$-=UdAS7*PT4gbdU z{fq?{Ybus2m(7kw@`lAw1P8YPBk^NfwaI>s1;r@-0ynmQKqr@=5eiSTlvJ$NfCv9D z<#^f(ts-1w#0E`kwTBUvK&Yjfc@0f&wc#jahG*6AQ){@;UNIxuKtOH;V>aaRW-KW? zSSV6(uvt16U>GDMx0BW_O6&O-?L{UtL2)SX0f-g{48v>feaYQ&{&*cHcg>LVT0@g? zQcHh*%$9TAfw5pFr%{OYSiy`JT!0V4QEt*wztc)3e-`DjEZQDNH_=5&gQXUX;;_G7 z$=wM=Q!xr;(WpMi%ki5NKe;Lo;JEv`IGVPOiv;2TfX=EqAg9WSzfDPwad%*_k^pZd zQ>84`WR?}V{3Qk(iR5&N9M0Qot)>23G|@;?98S>BVjm;)9HqSk0q=p(k0B?FN!yd-i5A5~nJoH;#B7@p)uI9hcp_!@X{l93k}pb5=_e#Jc9 zmW)jFSCE$Y<^ci~_vMBFmnHOHH2_#m7J`%JY%GuGTd=uSQb%NpIdDz^aOy(s<3UBZ z>|-$ySw(_8$Q4AfSVl{uY()V-bQF6bz^(RS*d~^1gL!VJ2wekyEqW3G2U1t|s)fx* zEM|lWG;Z-nkx^PNm%T7&45md?0AR28T3`Y|^IvietvPu)JCKOPX?=xl_?$WbkDRir(uhgb!i=$!0XXytz%rEDe&9b(ifuX! zkV?!l`@j=m8Nw7LfQpWAb!&;_4>+gu(>Hr1ke`(C~7o_IEm3p=*DHEaPale2&K7I*We`a*? z{rxZ0@bkmBDajalEFE>wV~b+U-fAHd1kS%o>8}v}=0~zxJ4T!5mLTq;+6a5Q{&m+= z2)U{}75pE|Z)kq1pzcljf}nF+@Q@IqW`nKI+>GMjVe^Ot)?_wAP}wLsOenSub&iW` zJdJ4+_U_ODVfB8fbi+p*%D;!02(GFZ#BN!I+ZhuPvO3{)wdzXOqNt9NN5s){pntCd zqgBhyUj|WvJVVT;qngA!sfrfBhzvWsUyvrp-|g)FwR@WV1?s`n0%1>6ucUBe5pbwL>U+$(rJ?XU!*3bhBcW^%2E-LfbH@*DeL+j(akr_4Gilly}0GxIcK|x64oxo2IOBI}WTCqaTCN#)W zcaGO??c=}gEqOm?mth|3fWVD;a4F+!b2cm2+#Jw!4TY{I--0% zG+cbgO9a&fZ{Bqzz?SSHE;^jRFf`aS)$Su=mL3-*pXkQ{5_CO= z_j0K?SPh|TB0&zk958_Lx)6L;D1+aaEptGblluctPmfE;A>Aa_NJ48GY8uo^Gz(1! zBUc&==w0{-V&(G}7-7O7L}5LCP@$Cc#JZcPj$W+~gfeMxwiGLfGvmbE9jG<$uSXcE zvX{Lkc!ZmQo&XwP?Pf~4dCp)^D6b_5P7vUjXKdCxBK&2YS=H+TV{P)H##0-4)@i8r zdj~ZVd+(pdT%uF?jDT-PnO)fOv34__6C*`kCofkoJ6Ym9`JZte&_aOk*NajVVt3Jhh z!cx)fvR*mZ>J(qXI~q~OM^?P~&tnqtO(R9K$r4UbNg0myT6*fNq&X@SOgfYZ!nW2Q zFAF`?PP&RZilKlM`Wgd*?aJyptPb;pv1canMPOggmg)9-T|6U8%X zWR9dw&>;-QO}L3AkE?#lY=HlDl<`owyK}tJp7H+bDC5C-*fk)& z>0aSqA7#YXy9a!|XS}~jOW0V`dQalRFqzaAf>vOWl^W=O3oj=OnJC|gVp523LwUta z+IKMdp1*8%NR}?oH4$d5wo=dRMdlDM19Hm_;J5uO(qeF*DE)aWBPbE(hZl=lt*B%i zju(!?G+mG&C*)=sp(_4?NVu-d1hLeXY=KPJ;kL6w#=+a0edH%ua8^9=j7JQC-9}8w zl9N(OAXyUV3sMJeta%II)heQ-e)qI=D=otW=)wXvw^c4Rb5qFZa8X|obokp4vUBxz zV>gkrfHe9eMO;FQ;TRq^gF!7hg4oYd0HfC7Zpm^WWHb>>7&l3{vlTnQSpj%Exo#kU zA#fB)Opw%Zj+x_&R+qv5c%~deD$XK!u60mH)H~w5wRi!4R)Zq)?kGdHn-W?5jL}R{ z6-cw;P;N02?_WZ|r4$6qE<;itx)y@$QJ867v7GOS(1|u!4 z1r;zocH%E~gZz^tq6t*%!x2T%=RwtEGD3ZS(e`ZB|PQ zW549`g(i2QZAw-y?#LTL)P*8sxd!=!H5dpQQn;_?{7hWMe^xS z%sY#&S?$rr0OM;E(x{HVGv=p@t7#*nqYbtwgK2>nihO@>%=?SH;x-Qc!I)nyF11nr7A*5%*?oPafrGy@qnGNn%8fz^Rc}C1VWUAZW^?%F z+?646Jbc%MVuI82JmZCg7ghQnjUfC~$my05+4p-0^=M0Hb109o1+kHwbq)!xU4W}h^d zeL+i+By4nxCom#eTB-EQSC=j?uP;H;LQ*B;Uv~>|A2MlN4EtPK92E2zZD zw`*`qy0 z%rgW7<#ks4qf}_4m&LJK+^eDLr4b7{Z5J?E0U~@Onq(Wy@pxl)DZun%VHO8HKJs zj^#m_nKok^NsDE!XS00kpN+Y=lHp^E7pJ4kXifCb1Lm5|K0NHEF~bwcsp7$h!M_;u zgt04ISjaw}ib|_6yZJ}#n>zFKeM?UApcYeLSOk_6OyVgqS;1ythRo7YXV7;Kn*-L2 ze}SCsF2$BzU&n?=SUmjg@LBV(CfqRp#wy~o4NBIQ0Jv^_+JSiGjz8gJvnp_AU!kG1JcY_!O1?erq1S9=-m+$`t1_LM*EN33DLkKRjgKlFAkCPOKt$ zt{L^w;xgwpHs4WOdcj&mz7qZSXhjSf@YY0Mp(`n4`k)$_k8*ywaZ2>I@EA%gK(bxw zchHKU%Pk7kRS3<0^K*;lUwu z@k+gbRN%`Bo()2WF`=rwGb)sIce@JNFM8hM9+)ImT-AWm`Oc%Uy$gc}hx~N~taij= z({FN6kcoN%!*03s(2$wc<*nlj@`j7u2bVNIJ7m@wv8oSB=}I0di1I^2!;V074g;c+ zHAa3Gw`S;bL&4|ztgw4n5~S?A4-bv@9L_|uA=GLbq-@K6?xajpfV=&ngQQKRD{zB! zzSv39X3{%eLiRUIDaC`HJAP>b!WZjM46`#JKNTuZ7<10X5ng~q;0k5q;8^6cvsOqj z`P#Y;04bI+L!$pf=yI_LP8b`M)s2fGwl~TiUL|qPEB4$m~X(!FBS+OI2q&_?W{q?^_X*7zA&UuwyjHh&V*L9;08!he0B@ESZ(xQ$K&t+K zDM;yFW}q}>=RpS5yMg2bMz(SXP$Cf573`+msPVn9pL$6DCkeY3wg1ygKIb^zmpgQ*5Ct%3f8zKe(6n#*O1y+s{O)>%NKxSY0WkeKtySMwOxyY zA07D&5Gx6I`HlAjSh@|)EAvCSioc2X_=kN(zJ~yohKR-IfHhFGs>OpX`1ugpA7(&| z(&*g~J`t^Ds<@!jk9!?T0AGhrL3NBeL2w2e@XNb~ z5K4ZelWO=6!ZqHWISR0J-KdY_lA_dZ4#+reu1Ae31O6WNrF7x=Oa?TW-E*Tt&Y&VO z;t5+Hubv=wIT_P6#6 zzbzKuJHg@PG>YQdD0g6idu^szXt46tK)^^I*e&%*s1+=j?9q~zDOB%KK zadYNr443cTlNWzg>cS%(@21Z`D+@uuIaZpFpP}HY=3W(CQ#Y|10@e6yS5GQNVLC14 z3Ax_N+1QjfG`<-*TQcpV_{DkrHK+@fh;7KZ1QEx7b@Cl+a2Vh^ z`1a$cq@CPI=K|BJe4Ijd|Emmbe-_4zN^Ljy?3A})JS%rj9DfwDK>970;oyic%rC1v zgM#%=u+2(z{eqLQ&@}hFYU{2_+58tMd7s#Z)JGEh81*CZt>03z`CD zqgFCvhFgb}>}QPh&9dl>XNL?U!0cavnXuKw#=8{H`_`W@%XW0Z4~yS*38u@5`Xoh< z)rXl*;Dd;$Q}RAr2Z76Cbk)n;(s5B3qQ_FgSpN!j1YCdPmH6U5V_NgRK9DhcDk~kUc57zjVW2tu$hGx%~TL#?W*N5 zjja3<^gGtQMy@B~r^yd2M5)W)q&tf_O{N{%h!`AA*+>T4=&y&*P@PwJC0pI4pAr3ua8KO-(3(lGR*>VB~+b}zYzbpYz&anja zV48p;I$Q&MQOy%>*bMgYNAyTV6gLv%1pSoZ#B6()x436lnHnJYR=Qb-p;#o=Eb-FN zfzuPU1Y0zGFyrqd))+zE9W{E>!5oXUgQi9Emfem(%AYiui+$A-v8$p@V{IwNNy(MQ z_Y-dH;x5o3wqenrt3QeaqST@QRIQW;IKu2F-a_0l;2J{JC96qcpG$!pd}{W`*F4At z;2j7c)E^3I_XWqTLMKNAU)iK*m$Qot>0Ra3${HpW@ub55#SVj%O7Q*dohj1@<&n>TJp|?H_iMEqXFQ@rQ ztGjWq?rTljr3jb$I2`Qrta;qns!K>0+k1-<618H+>e4V>gs@0|_RJq*BO)~K7Ic=c zb(;oI>6V9xp2+Hg`olq80`H&r4zxsizFUewLN!zpqNZO*D4^EbzBjuNa@QSEv$jX; zw8m{wdMZdRE5MBj-s--NG!|aXTti+NF~Ug|#27XRR*My)i;Q=%(e*J3eY)~>FG0u% zIfpuvtt}G6_vwTl0cr$bYh5-h4ILabsS~2z&c52 zckdf@{?MNnkzvFsA!{iZ<-ND`J;6?^KK0T=K!}PVt@ST-z)xOtoD!iNsQC{WiRy`6 zE?=Q@AU!I+;xcte%Gp1+ax*~!5})O-;53g&*A|>T_XO{r&}+~Vd;@p-wl-9k01;Qu zLssGxKfYxd(0ka;Hmt)69c2uB7K`K|%lNF-fGq;{_7_|oNHnWv6XP6-zIV!T*6E=# znOda31qhKBk>v1#W^f@dHyaF_%CUY{dLo}m5Hb(jGm>Kks8i96l5m#5sP+=w72iiK z77A33nvvJ1oc`S?%j*l3BK#UWYAYx^cz4mUc-c}fG0+PQLtMxmDE43?_nE~z61g>( zC+N3Gu0P6^t&f7+8)_&>Lt8HYJTG!Kj?v1!8LHuAkTH6EJF{EDw@s$Y5A= zgX{=o1GIKg-zGuaWrjHFa{{}`@$eNy-h$Q>FF7d=RIA6FV>L=SabX83Z^VQ$%`?U_ zS-CvKUR)_>ra+YuWG}MOIZ=k$KeT~o(Zfsbey^ZTd((RuDAi;^2K~k9@kksZp6Aay zUxBwU{SrjjO_jA!y6;FFCD_tKnitKTOf1@Px<53`g1BSr4rXqxs>d=EHr_R%_!W0+M4ThET!< z(8@}u^m08C;<AmIIJ%KnCdu7+H{qZ8cek%Bl#di_;2)R@QON!%eV0F&=mG_A1)65vb z!>}eU{1^~W79589f zUKq*&-I_79NFBq4U`bY0q`Gw2_!nKT5c#MJXAfE5^a6c)@#FXG+f;7zJVan!&zt>7 zM*MwZ15psjfP>U<&z&-;IaqNP!T5~&7g9{M%v%T!ALk4+60gOI6%)u!VVaC9n?Gx#gF)4T2lQnTT2%<|O!ke+fAMy3DhM7Q3di;8GDmpS47(XdH&FL73`WrcIS8KUcxtxisabjI$)S;D8_ic_ zQ!e3Q*`O`gsd#)^X$&)mnj>Z!G2Ngz@>l=jp-i)dlCqT28ANU_sRXu)rhR6T?Qx~@ z(WseTlcA(cLlES@K?+26o305qS3BKaxo$1DnKf7>VWhb}Ce^Ou=sawNnUE1h8!Azx z5Wqw7k|sI|!8Z0&AgL_bjwPSnXx=7FE1xY%ZJp)XY0_`Tz75%c!V06Ey}ChxMyf8Q z=1aRL2tk6(=%f>~X|B8j_I67xm2Aw0_IHr4;^3W4z{PPzF}YA=?TEobJ?NGKwCP#W zGq!Nevg-zAOPUCnA?4%bF)NE^*f;aG01{ITFk@<;v`dy!ET0oPN6H6Hy?d=RQ9$6s z001(sq}@fjdSTo8S{&ry%(4B1ZQt~~BIZnr1bOmGxJc2Vofc;4JS6o!;p{3GSwoZ6 z{1hk&LfL@O#3OYBV2y7INo9tkk2d1U;Zw&7(fKNT*p2H!@dG-D43FhkaO1e#PzWcMuqjn=GU+-Lcge7Mzr~epZmvAC@nLNqeM2tR9HL z2(H)rv5vQ!eXn>2z@K`O5SK{Wkrd@-rSb-K3sl|^vmnrOZr$SVD!ghCh$h5aeKT?0 zyiZKNFW3fRf513k^pQOf{PMgs#UD~|^|`y9#=*;jam`(Pv6W`Z*h%$JXBL(YzfkPO z|Lmv>K(F{C76x#JKC#lz7-w755|-+Uw?M+1x@B)XJLQ{^2T9-glEZ{Tha(A2z3#Z8Ooy@&pK!fcYAO#NIXnDuy2$2AQm_?8Q0vX&fMUx*5aC*)ZzQwpEC zRb(w5PFdjW?st$KuxKA|M0#qs0>5Zy6^u8oaKcmhHFH5Kths=3?hA{w7FxHd>Ff@9hrA3+Is)mG zVP^o8MrY9mzlKXD<|r|vQJ-X$7Ev#~O%$xn_nlTH(On8k8Mg9U2I{>^xlGLx5KEz~>SxrV~F z_}(FKI|mNLDbQO$tC9S+_WNi)oavbhLk&)VSAvcirSGaA+q>WK14=SOa|Uq}Lq(y& zENuXZSf(3JyU#1B<_=S;0ijw%NWa5EMZI*{vYa3p0>|r2PgZ&sM^`XKLsAY>W?%u3 zf)3}P;<2NKN``!pid;?@#Z#oZgVhmW>1Ud^@GrX%Mrye2mnPlC zh-HqfJa~wDrH{D-bwhNhRu}dXaiiTV7alix+ctS&0Y(!TP@q)^a-sSegt)ER4oqz< z*PEM)o_sQzgF-~-Hbbm%bX+V-8?jw`b+@(GO+i{+A_WDvV$xQ zQlvhyTF{@g@QKyp6RU-_9o>bo>JzKQCsqr_!a=!7^^Z@i7Ko>>wmz|1h?(LOs|5`y zpI9wmr}dVDPplSE{u8T(b7$SF5b>YJYOy*rf?C4#Hg6&ENYV4ZF1=u$rJF#bbl{PuxeHG5QW>FNFcLcNL%WVENIS38TjN7+ zVK%suj`Y;l+p7JPW6?5%Nd8tC8M?AK$-LHHHE_GrOvZe0mpMwqD^mxrvFBRmJig4zp69+J!o7imy#t|9soEu3y5HUk;K2pg~u z;Kj~ri9V}U)-3v;-JUKTMqWma(iam4mpD{jo`lH{5r~!2!ZK}LjEx3FlKpz?Kw1t- z-lBLbyu~l|0bs37sRNz@KSsM`9F4dcC^NZCH|y==x*m{tiAKAMIH%?eoRZ8Akaz~v zu&Ob{gT__H9Q2&1lueM+v?g^2V1OgdwR1q;L0KOMX&>mykO|k5T+W(V3V59veMd=e zQkOs+On)BX39cFTHM1&S2;vaV4JZNll%*^w4xitu-I&_fBad9ZviZm(E*2QD(nruR z)MJN@3jQu}M2=L7;z))qk=!-u@jRy)&t}5i5$rftvB8~rjR8RVCN1HJoGEUKo^0aBkHOFK<>;(7C46q4F5nUH{rQvdmFW?SuBTlwRnIw zC;pT*49bN%3@tuj;1*=}F%&vzCKc2k#g6@(D8Y_|8x+@fR|UY!+znQKY#`sBH*<+- znBo$#?N+(YH}$e-93X(ozT7k1aOcto4dD(Hfge@01=ddg7|TK2AflaluC}B-at~P+ zU)sKAmZSZ1KRA9}H!Iqt6$|oPq6de~v;b)mJGWH9_yau=IUB_G;D~7GM|~0ypY#~= z*I!@{E{5oIE`1xdA7aGd`Rc7eX&^Y9Hb}s8E#JjMV(TsdAmSpiO*Z4;j3LgXB*W1I zzj|C;Te<=EcSfU$g9)x3oI3Kn5zE`<^nLwG?gBgsOzpog9-Sa$X(fu@?DLf`@v0%~@NKndYhoAkn7rt0cSG3@;aJjQVf zI+=NU2}(NmG=Ls6=}i{^XC{Sz34W2z1=)(r9@`I}ec;?LM}uZhN0wyqzO(Ckb%~P1=+x7NbnbR*bQ3RXIkvz*x2A zYDltF*Q#7aK{FhQZJ08LzGKMyP$B3@$fN&`+lZtFp+8RWI_@}($Y>dGl z)9ZETi`^A*AR=;lAr}@dII4{pKI~_T-Iz6~Pw&5eJ5{ITl6`MYLaF%l*{R#zKVB8V z<62#Rp6fWN5$TLOFeBOIgpf-ER2QXV<{Jr))62Z>`|#Wg=BiJuKzWuj6Yo$>QKR&H z|6IA+!iRCPTIPxwG+8X*B?g9QQ?lC5*ZCPlWw%DWwd3Js&txElNCi3BC=%uF8<@B}+PGA4P$Z81dTJ%K@gA-HX10 zwIDdG-GGh&@d=S0mCBTeR&O}2We>}pkI1AzR1BRSiGlb4;1hvSrk){CKIKz6vJ~Qw zC>aqCxmex`g4V`ULC8JQsdh#|z3ff^Wi2~^2x!|w`B1Ye)`o@$YtdP0#f*$AnL{)H zt2;xPx>gTNFzJbA7+$UERgT~({op5&yd!FLav zTL*B{Pd9I&IF9ZDS zE9GErooFYro{6pE5%Ow00+I$jK%v?qumK>u-DYSeEJE}* z!kierW;7>2j@3TPnK8Cfb&Mu)b{g8~uAeuNq_3o@C?HgOTrhev3qM35aRlAW*esOb z^}`@?mCJV^$ssNa`3mf<2DCvC|G{fOG*O^NC`uISK6bmB(;6p7#eX zX2WKk)qIL7#A+)#>##BU()K&D>|t>+b_ADn&12)_*<+jJp^2Dxhx>7IB$5N@# zE=5xiMIG;6l*>Z|qt!(O0rI9*n&5qgH$J5a&vNEQ(lWMYq*3gBk;hwcBvh7h*5HOa%}yA+mGcN< zqK*q&BPGzdOxg<74&@jrXfR6#?X`m9S83SRVv6lC7%cQc)bcb6a+im0oVW1I1>@sYAp5OFn1gH}87QLlZBUB~6s| zt41Vhv;=ttk&dj{K!d4Dm~Qu8PzGw%iXz!ro|nOn?>eD<;I`e_#K9W_2@JWUE^olb zsoYS@iN`GNj%%Fh`{o{z_eAvOx}+t5yF!?>03{CdZix10uacHqivuY!p}Ry}staDv zZ}54$YCy~uazT!Au?WLXo*i=9P-)a;htjuO%nExj>7POG$@$F_@YFkRAXUP z1YQJp$KCbGXO1Hu{|p0WztB-3og*1WBYhq54Uh6$hl}I?7HeWQ1|tOWr1}UHMc3n*dyH3?*Q)Z z=74V4&}Cm5$I*&HrRz!~AL&YN$=UbvOQQ90@u~jgw$ThGRvL{OGVaBarTAN@Ksj5| z%j0J4SO}=HEnT5?sz|Vzs0x!?FN~(2F;sK92mu4|A$tMFsAb`xPihBJ4BG_Sfs0#% zy+>tC2L~zZ$~RvyYOE<#S~XZ-5u3&tQ0$%`#XE!pxCI#+y!4g~D0Y~R`P_mv*G3e= z4^<<1VQ9oAp~9@{N`z8(1p4<=Ae?6}hYpn$UvXl29e+up6FXZdHx(D)^&wNY8PU(e zWZF%(&@*K6A$9lB77DX!1@syA4e?%m{F)8?i0JM&-i_@%O1oIbV|OI{nyNs>bIz=YH;w>%Q*mzP>M|7_)Q0gp79HZq``iqG|{b znO4nKqua^W|Ld%>{}Z#yUJ_4W8y${S=cemSMf`>a=MU(iS2r8PdJ8I?FXTKh zIH|2AZE$Ic?UupOIQ>c?*DdKf4Oe>U2^)L zI6QSJEofrQi^EbBT67_b83Y%_0-@&d5dHDA57S!OTnT^9ZD`s=K`7{8P#r;@zfla<#X zor4Um#jo@6{?E_Hi`t_jAFp9S)zk{8>`AH|K6ho}wPxW$6ayiCBG-@vMo-iLisi%s zjRimYYc)LeY)ffBn4pE2l%XBdAq}A%u4*E9Jn9UT_Wu?hu z?n$0bq+?~uKv~xK(bO8&hSKrpz^YEI2D3sW*TekKKODIEzn#);SmgYLa>nbEKZNnHLcQF z9V{Dd5nAsL?%j|}u9-qT&uA3$p;cCyaQr>UAMw%44tK*WG;#p??P;_oWa%noO|my- zI6W2XuNfH7vQ{h4yGs_Si5priPD2*au|olnwEV?|m>B*Av2U zhk|&osWLYPiH3mY%>d2VKEPms9N&WMi*yXi0MR{zc4%@xavuY#@sIzmj~Y zKd5}I0@j3cl{=u_@WdvrVsM^vt?Ny3K47)l>X7j}ochYZ8(wV-$l$DY#_i^($EN`U zT&;{>Z>&;9IkJY`ne>y=#5Z@EbnYKv`yI9p2b5R(?VPRUJq-9WujJ*h9qNo_*fgpE zeJ>zRP!*u!Wh}w6%YCegT$|;<`m#)-r)LV7{RYi^Y8?oSG zJhCXNae5`YlJ1(ir?3EPcBkk5GIO_%A>5j~58_ysO`DBk*itN}uY7OgreZMLwp?9JWlx6ZU=xSD3p*N9E zBhq#Y@8Mp$n_BPZbK;rb;N^hX;d1JwXg?$Qw1|+1m5c1GeU@xJn0)q`-HrtGW5t`h z$d~wvbzZv*3fL_A6!6+pMS;=DSLKw4$nQznJL?JLn@vDrp@M)_qsY$g*$^mIjedt6 z+3pQIc}E(`vlj}xITb!`?d38qsa_<(A)2Wp@^>ruipPjMU~#8~Ey&xcTf7qctV(um zE0McqMN-&`Yk|GeM;rK;Acg%0hDMJfXJ4|2>E)=`eh*gx=sM)has~PWH-U$<*`9YcA51l1~h!r@|07m)EjJ%L#&C zW2Kb*d{|wn zJiyk_*rBjlc=?dqUYRgW8k#y^yAh^86$I(iD`}FBjq65a4=4O|m5}W621t2cU;s&W zduX(`TtMFKX#Q53lupz0_8^8}f1Y--nXf zcjJ9aRXTqjPG;x91!OFLE+x}vaPqDD(@1jWd?wXK2D1ff9L>KrZmpHvoy=TV;}|YB zRIUK^!_=|H)$ni+$`Ac!-i-YCmV|OLD~+wS_{Ce3Xu~D*@!P`h z>D2fsT;rJ8=<^3l$)|_Xa(o%28GZh-(a!HWpN44h&auw#c6u77{h{%lTI}>2s;uW9 z-?vkXz5g~sU+MRF{*$w)5Sv; z1E!KBDp^mjyz?<|cfC%Uh}QMb4y7l8&G;Gr#;UlCa(|`e_ifGnQTd&ZT>=m1;?1JW z?(aIZYX>gxPIFk_bqESS8(x1;efzQ5U0)s}R^`)a82_=^OO()=^Gi2!5+I@-x>80$ zPitbO?<(UI8u51F1b_jjBh|X z?O%#jExwi}<%Pg4vPl!~*=pC;YCwDPy?Bx1?GC-2INx06e*kpiz5eO0qtB;kBu+av=H7v|&%?osxN zou0G1mAlPzV>91!xU#o3*}v$WY`*d7zI`xf%c9(oA3}d%5!`Wt!1rl*NnHe3CD!40 zW8IT|@PYZ`P;z2^Q+NHQsjw|-X2%zXlT&Ab?;@S~%XFrwrUsT+qXg!`+Z z@lLjK0#HaB(^didt=0N$QR!ZqIVO*lXDl_3YE+HRZ|X`eehoPG&0par?D>J={yMiS zp!0UNqG(sJOiJT(*>7a@koIg!|5zn}*>rZHP}q*aP@-C>LH16a`cu2Sl_o2ZdtT~( zkCH0`M@x^|PgLok0?&%d^u<`?GxkGB_#bk8fn8tJ||H2z}7e+6j-R9RbVuFGMnvDWU{r+xD7YOGybCC3^$I znU%rmh9mFKqhhmy#B5*qIlHI=IUtle(2P5VX%FJA6pPftGm~OO35$H@R?t08MaMSV zGEo)}21LD7w_1d|W8SPmV5x>yti3t*GZEGT_8dwlpQ|q)*_wMQ8M^jwyOLXJS#|7n zlnIlJ_;%;0@csf7_M;hAY(|HlA36Top2+cZ27&!#y4ovgmR}LpjqF{>xRl*SBLmW3 zYv2ppXn!rcOhnaNW}1PD+3iO#CJeT$G%bo+UA1%Hc{YC)h<;tl_Z$+z)(!`}8H(Tu zRN3#rvoJe8ei)p-1QS+vDc!;Qjk94jA zt7VNc5UKv19~Ar?LunAXs0##r*`QwuZ2RFrY$N3m!oY#BHGm&uF3g~z#w~C#WRr0Y z2KP2fi1y`RlwG9n4|8thVji|p^Mk7WqJ(%PMeiZ!I642<;k}%1L+_mN>sAof%*D7$ z*fkHw079EFk4+W(+iomZ{&r|=7ZIdKcqk=*hc3o61n+wMQo>V`49_DKjwWB~?$CvJ@ru!-X42&O z`c)-dV|C*fsCFjt{hx=%=7JVHFd@BC+PHqf7V(vf>lSXJG*;xdlR`4s%iOx4}9X^%B zY{-3Gl-+BpV`p+FKo2W|HTHZI=7RW(0O=8*-x69POC^D7)fY1`c}$vd=>Ia5z8?1O z^!k-%F{=8hnR2K21E+duq18b?%@>1DMp(74M;QB4PrtD!+_$VTzQ2~0F7_+gh*X_d z6)(kYAF?o+B6l##FLE`K2-nw;?Gix^ZImg?^})OJW^Lo}Tot|aa^GG2`&&3bK`d3$ z6JJW$jXOd#3CMq_%NleV zO5&rtHViDt*p{Fw2rBlOnXUD;=1SvALq5YlcG94PAhAK%DAlWsUxhuYG9Z)U5B*Q` zKy!mULq8j7f%#NyEy9Lo$!=C^p~nFmpo`vkxjxV!*NfI0C!N8>Fr~h-qCK`vjlgnU zK2TUSl*?fxB8whz3%$tU$AdVDnFKYP;RnQ^dUpQ#={VBCitTIm`%E^6mB+e&I#rIF z=zYOBJfsm=SoVHz|HWVP-XE(Jzo#dQGH`xJedP1=?+_uU0|te`iH3`f9;*y$#0_#= zH=t3^fOP?>m=)}0{iZzFw1b{>Cr%;aLA~;W!bKR7uj^H0&L$h$`|h0-68@!!XfC8b!C z%G6~kOOh$hKG;U;H<#-hxXsEK0=9Uj5e?6NFN$pGvv!v*V%HpF>qcmRAvlJp$m_S5 zq)M;4G7IH=ZhvzcDlhth2=BY7MDz|IPi% za|4|Ti-4@Plp&W1dAcc|wL(k_bC&%~77g%vSUrejVgsZ3J$>cv)%e@0IuyUy7mu9~9 zyqsJ>v9;Pt{j6zCH9oy^xkOUqbJIM1%FGv+b&$_f>Rs9L0@%LyKC@gDJkvX`%AuNa z8n;MHC$m3!5sb9q%|Etv@Lf1>XsErIR?|aog!5-WjC?rS3+oVoZnW!LD@{`9$Hlnx ztbKO8@uL(FSr{7NLkqvp8f;IJND8D|k` zH@D$Kl*R^r%rdzdr{#=9(Ae5qLGMuYMNCH)p*iwyF*%zq+z?u=>F;ws`=eG7ee>_7LSq4JPA9&MGZL zjt7=h`p)vB2Om@CI&#I1Q1rA0Ts}V-cbK9>k7Ryn& z(OiGKGG>H}@_+8pu;disih&~T#*qDr91L^1a(55>mqgx$ zS5EkV#a?db1l~#U?faNNhMr85f6p_SQz6R?!99Z0kwbWx5M3%8VXM|6uYb7v2Wl~s z=}^BRdr6#w;OP-gC|-3HMyeR0=H^6p#5j;FpcLwe$;Agh7wS4BUqB8H(?FC`*WoEb zIUAZ7-Jt%>dck){MhtG)oW<=HFBCzE{UXnaT0I{Pr2yf8`InXpu_*^aJx)Up`6b3L z_Itcv1TUV25|IA`CA>)g=>T=p#Iw?~HGz&$3*~Enx=~+UX+I_JqW!6&{NP5zGF3w? zTJF`Kyu8FS2{~cCRM^p>qC~~8fKuQG$s`DOMVLkHoh-xsx-}jzzAvVf_!?y zaNu&N4;pa9G=|uhUurZ-4qc5?aRYY{lTl5?1lT>>FW@A#@ivfuL~B zMi5rivCMd&G{Qht%Y<>SrF*9Wz1bg8%%I-QEt`sFk8TW85n3%YW^(4q@f_E)}Lc=G~fQTO)NoEOB1 zD@lguo=A@qtW9pOfmFc8=aTAJm39r`WI4_B2R&82(DWsIcZd^V98D)M>8}M1dpE^# zOCQt%9v8|DEA%6drhj%}##;<{U5gbDZp#9Al||m>%OD7e`{t>enQ?zCSl-(@`E%N& zuq?t1cibx`Fi=jLv-FLJ%&j4Qh^DvJ@NN#V!0w z9~w(V1blizY` zK8+dr`{BQd*#&Jv2l13z&dL!Qvg8tYEtj~?yVeekjH_r+OsfE0K_{b5>@iLnbrm9c zD067zbG5FxPyflZY6$|XmGX0#;;Aj^3c|o4W?BI2LN?|o*;~XEHr~v6(>Zl|{m@!% zon+XS3eX%kI(c~5m>&zZ_Mq1F@GI5oeOgYbnO4_iuAldj%k;zX6vSkUJL-r3N9Y(P zrP&8(Npiq{2QqC0K%#y830a?|g-qT$`9*ZphRL3@J~A{>$#1GTG;Gpz$>}K*(2n)d zKFT`TU;k)yNYO0xQ&20CZOio8D{~#=y_p)R=QV?P>O_RAd_iCXd50`-+pR)yZ2TMZ z@`^GT7MNf47HPbLmT{u1#V=-omehe+P#c*44n&cAC%+bmqi&Q=w8*{L{(nIX>R&cY zsh|ADbgU^ZxVU;=b`v5Ci#z+KoslnhoRRXhm-NcLwGtVF`6mXjxT z^QUnfs5bM*ef2fmh4SYk8&@}$@SCUTDh9#z&8^||Xh?`)k$Yr#V$gk!H8N=AZ%uB( ztwO4@Z<7BU8aoq=on$5fK<*_r6Tf?@zC4{TkYd>Be+`u`C~4dWhSLeHd6ATs|D{;H z(Vq+n<=qJWu=V=`p7AX~GZh_a~-ulHY#EpP0&No_^P#n95n6Cj5!1 zJj>Gq{=`%+^7Oy_iK)E6)9?8cbGgLRq(3p28cz@U6LYEa^uO)toy?`d)9?Eeb6Ml5 z>`%;v#77U2g=!VU@#2l){dmsGS}rg(u%?pNH?ZkJ{y7RfZU~Jsu|A z6d$$0!*8*V+TG!|+DC2e@R)tnz7CUsk+#~@;oq>2+R@?Pw2#`s;rr~Pwr}{i?4$N> z__yt&wrco(`>1^y{vG?MO&b1P`=}inp0JPFp5X`VqxNR_f7wTE%<%8oNA1e+qDbe&wX1FQ_)#(=B{S)vNEeN^k+O2o%UuoA@}yjPpnptaA8Eu$ z8a9-Sy|;eZPBo+s*zY?j8pkP`Te!OMbWYoZc&A0klB3DwqEoQsL!`GHG&q?cgQBEZ z`DAkP;`;UV<_#sRoP4@oU%=2qF1A8VlVtil`NDA4pokdLn|hC0zq{F7feuZb+uA&L z1^QlR#?xn-H=ad$A~XR?G^M)I>vb+8C6)ce@YrmCCzssK-q?ldefB+>NQh!u9ms^G zN72p@c4&>4bSr&wI9&)d9${-ioiFk=bbimyR>>4ac7umuf#gKcpXqJ-@OI?JF>RiJ6Z9LINTOgj&BtKkQp8$Fbj1Q> z;=WwJR$C?5;R+#EQlxi*kPgYhitCvBa#@k5(3>C})bQqNEdkwp$Filee8H(guz~|D z5Bmr&O4Xzge9aLZ4hx9ZgUVC}p|KPm#OoXn-h7g@vc0zLpBlC-VA+0it@D0u8`BzS za7;lro;)r|r%s~PaAv4%j-od+Z}hNT8Qbc?cx))RuGt$LwLJ3_P_{Y;6jL2p zkf^O^(0&>?>n-fkR=(U^MdO^pIx0T}>N!wCPjI23U<@k>DU%#8UB8vD-^*w-5blTctI#Q{jz{T45}m?s^ju}jf7rA zL&%$gD3`j2TD)LU8e43ux%si|x|t(b02VG%(=00yO+!^J%a1-f&)5Eqj_js%(vdbs zPb~_^Y*rq9bjByJq_M}++oL9(kv^qUPox(%YByLU7X<+!<{21=kL2X)7P1u%+$^0L zvIGm^u?0tLL+ zEG?k2StyZVND5Kt!ilv}`CxW$jAXs6u)_En@&IB}AuCtTXqJT!Z=dDBRjtugaTS*_n}T(;oH&XP*=QpwiVE|c!i zb--pZz@eVdKhK~BQiPj|saph(s+z0#fFjgvUJ7`+losPwrt6if72kqt2)aCc*a86v z)+^(^A5tE@y+r~fkM#3jEp7=&Ugp$pV_#@*9#!;_cHg3iW~*-|eq0_l9C4nr*s@}R?Zon`g3&@+e zW*+gfF!rzqXv=<89{WJV7UCq)0XAJx)n-fKC7NX z;u=1<0=yk|qi}~hC>-_U2A^p6)wgYMZ_!A4a<5U}-<c+Jh`D^7!bC&>o~`NFE_ z1$&@ZA^W8lO$(b5nFJ^3>@Tcm)UpAffJLESHrVMc?Q)u2u_A1?JE6CJN4MB(h-aib z@3>NiVED^uAHNyfBg0@uLq@FgrB;%Ax*8CSsNc_2-V_u1tF-khI+u~9J;DI z5CPG+-sHaY8RP~Zn=h+pYd04-nh5TQJq6}k+FH{9+e$e{77D2#Z0@8=a*waoZc&9I zK#8K4pSXbeLQf|=9Q$d4Et^OSY~~H>fAH@EX}@-gIuAENq|W%>c`A_&pK0erE6F2F zW=~d6Zuk!Wq_Dp_PE{cfa&S=wx+5a({W`-3R~la zdV9$`eu=l}{ix!X;<6QdGP)PN!48yZboxtSn*_JsjS}kW=(%b_=A%B_=Jx!u2^6H( z*&kV95%=yL)Q!n0cW%2u?!wS@`;m0I8Xv0rJ%we!7_&rgbKf`%8Dg%*XlGk3Y83q& zZc~mcZo9lSv&s0Cnqj5LbYCPC1cj%Szqz#&Sy4$}^g3~0SH}0Usk_`pN1^|BT2Xk< z%$-pb{wdd%i{6%Yty59>1;)+hi5!^G7E({DB9Ag(sM z15D2gHTYHM;xs-4Fir^SB@VjRsL9@nPCzIrX?%OoqPok zI*N>m)=S3&JS0wY$*9K&QD_U29L>62cOOX4P5%keVp&F^KT$_|)oT`ILJyFI_^g!4 zIE2RAhgalnh$@G(^c*Pr(y1&9N+xOV8Fh}p|6Z;yiQV0xiqGa}htrQlLr(mzyY~96 zV4P};-dySqqfb9`G0m+38CIF+cZ8rI3MXsKqFaBsrD5|qV#H`SmZ8dPo&hPl=o?pl z>?jKKjg#B7$`9guGY}Dldk{?=U-e=hQJklX`VwmPkdM=~q1n#bUfBgpV1MRuRt@~W z^Yyu+E~rjTvSFXYR(sa9c$_Grxw_SUGR-GRejU?^#a@F{LE0okyU1d|!z@d>qSp*+ z*XWh3KZx#!_&W2cyv-x(j*>CSPB;|~)jSDQTu0Po7pD^>K-4OHo1Gz3y7$7rgT>kT z6qjvN515ddV&MWT~~56C0Ia@&*gb>TTnv8`rS{OS00?+M?DNbqa)tq$4M^rEfj z*;K;}e3v%an->s|(X(fQYSi)kKsHxmf4_SsUfiKuD{PM`C; z%#yn(8K&lj*4lPi8KEND&b$E<39YVRoC|8&jP-})RL`pRBv|wt76L-V!|rEC`D9wQQXr(361!0;SH01)h>BZ`(4@$m5n4o? z4w*+hs)5T?6>FJcZPjvXYL0f5dL^y$9~dfxNkNK5$z@d7WFNU5^C|v`Px0mf?ncQo z>S#}W5JzA6b_YaZ%vvaqiEAfAfKb38Q=Vo-s?cjUcxiv-#|O%%-*N76`5^dFV^7(r z{j74!_U0fbT4~zD*H|C2EprL8LMXpYQd#;cs|QRt>`cp26(rp9Z~-vmJEFXr+9jE{ zb#UryGbGlh*bsYx{VDjnnZ2$*^fRs01MHut%#dIszG1a-r7mJ)H(ue6V!7EtDnDB8 z)LvDNb|3Fw2$PX33`)h~lzlmhp_{*?9L2AB1b2}QOx~|~1Q($KQ~7h{5x8QE`0PPN z8?QV?t!D|U_rx$1*n~V!W5ykHUxgklENcBf_5S8MBA%U}ou@5nN#qqC3nB=l^H%&XQec8yRKP zxR<>GR&ghG6tJjNlxI)Pb|e!tZ;PCEX1Dw``71L1x&}J<=a2N~#l(G(FvLnKEXW{8qJgGmBrsDfyFW|R?BQUO+0&m*s|sZb{os#r zY+FuMI-i#P?J|!XYcqA@FppZ`v>f<)h^K<*bB)Ieug3sq^E7GIW#zOA9b%g(5HGvF zYpB9goSjtBYd!>#%c=`(oKk?@3a@+8ltt-1ydz7TVqUB!=tZJs>Pq~vWLk>3?@YDL zP2kN#3N6EDx>6?;{_sByE=>R7^LtDItxy#vcRy0wnlhk@dHcG|wo+%bIMyq%2zZkDE5up7RKmE_4Zs#dek=s0Xy-#*Zc zf)efa7MPJay+-IY+6U7trjkLxddD7cPijTi<5?GmZ+ZTM*n=Htw%(nU@gA`G#n9BK z1q-dMBXjn#Qw-tp1u`-GKIBFT;6r2rmL`W&hE9xBWennVFdBdj5A111ka{x8 zUpUQq_9H;=s!TrAE-QYdvL7cdf|xi%+kRYq=hz~v*NDm66j4eHFD8?9&;#?zP=~G_ zj=S)1a5bj4=8bkOjcfh2Hb`h|2}Jw|eGbguAbydd32ruahyLp(@U zchtbB#kc3EcgcNXEGWVUXe9Y0^TVC|`Hs-B)`P&afMYUzOE{2AlvruBVB2>%mlFs%wbu0l z%RV~w#go>H!Nt2UMoh>rTrox~0`QKVq#al7%c`i2&zD1#Cnn(jhCF&6@j;NelcL*S z438~_sMqCd4NAq>vFQ?`2qY#E!cj#+78-4jrAKia0lnfL^xPy_!qQi(_(5se;pq*0uoS|Ja0Yc;t%ZD`Ol^rxk7!Xz=hwFc8;dozSw7Q=P|QtXG{6LyQ9Ubo$8r# zeHHoBRw#bqih^h=$-U`CY>+Km4a-whs3*zIjF%DBePCZUyG&0o8_wE%!B-_F&Ly># z@=FakND0+qJzF&xD{^~KqwUrARbz!PjBfLGiVRA}?9Mo@|5h(mk~A`tb_qc!0?3@P zq6E?=3D4Q04rtJ9%gY&SB@crT^_7P!i8QZOhfa=foE?+H)JZ4g#AJ9JLwDzHhqc94 zzC@o<$b8PMiY6+XiCPLu!;~n^y+PxG)Tqmk!_1}9UT!r^TM%wt*sH?!n(t^)wi@5V zxjAAzMJyWi`6`wVJX1Qx#G>{z8lTfb>aE(;*Z5s>uBPK);r^-v>42=jY2_$qV<)L z)JE)wcOJ1StUK=p8`Qp)+6JNeVDJR+tz$c=wKT z_Hxh|fp@~4L!B7>gWW`nVi#TF#m92$4rLM7Dvrw;927e8FiC#=G_Vy6BRnBpoTDwN z#+)CGKWGzvacARrH!>HFT<0mdC(VwDAElj7iBtYx;Nj@e^V|uf9sbxWgY-e2_@xM_ z-6*8rt>roj2`=br2kVR_to23_2Mvw8coQ{(SH(T2Q<3!Jr;T7{iW>76#IN$09pP>7Z;YTAJs{ZdaXc|vZXZI_wGs8 z))x*@%3`iTl`huOmXd8Dzjbd@9DI=C?H-hBaB#e~llskcM5dnW(7uVoLH~A7$`*Dh z;GkosYu-f+>5fWFnMTjxYg)tch#Si zqdl6xAETq}r}Zlg6EQ39v=*LWW}03wS3aQAfz7nZcqHSvB1AG{yVP+yj59wU?&y?j z?QD{PTOPXud`r3~9bf6h%dX< z%2UFIv!nlD<^iOjhT7Li1a`t1R z-6bOk3Ocvep-f5z(L-GY7w|V*&;&)z0IcI1Na>wG(Yv0%4-5%Aw}(V5j)wl zBJl`%F;{5clS(sHRIPz7ovdqU?-rF}zj4!Fja*nj=X~QkRo#1G>?39b&c27}p6bz* zSCStFelP5F@8w!`i3*?kNV4OM8||5Vw#do5_SAu`>QI-sc~M{S zF?$v+28$0rES}VVOV!2vM+Q6U$h3BbYP`+ONNUR-?oz}x{3+edfw1(U{QV?K6;=78HQ!*$s-Sszsr$O?vcMFv}XSWHMn( zL~m>m(`DG^u1lTh3klOuu7NX12KG^-^6mx`s3cMj8dQ_B)qm`8lYDK))98l`yc!`QiS3nsEwIKJ>Z<0}p9jQTl<%Vj~-|nwE8%V4xRbo zyQQ>pmNZiY8-pTSQrlRouU$svsMA6BRRE2N zu&peNc*^_=(J(XoW$=$w&}$$2(Px3K0}J^Ny3)}qWsdWNmfXRP0_A`m`RO6>DGVV1 zWxL~oNzG@+obeu0awE{GQ<8roc*NbM%yr@ijJZ6ML&mi zSeupuFYIZxOtydRbLf|@2u}6>@N{ckh2C(8w+bd=U)$yF19V(2%b2@aLsmIcU%$F} zO-9@mx)4?Z8(rYbDnsj{U3TIca!;2tu31AE|Ah6$>5HgV`Cgbd1rHA!0f`qzc6%`E zaCsKyf4(}#%1Lb{np3j3SFmyOI58=ey?w? zkTkvw1t6dFtXd+Zwamx8(^<{7@Z5CaMDKKR_i|X31Xdx=FDO7cGSS!ScyUT1XH^+> z*yS`2ILIme-s)L4KdXeHosXG)$<;mOu?asoV$gy9Uzy%lxr&Jx0kal9ePo? z01aSogW=XL=G&Ax+`E#Y`Z9Q)#KQPHnSqOo8Q3@{mC3fdn(KA<(6+edPucfq~2jp*e<&(Fhc@UMo)UJmL9k^`C* zR%IkqsI=udPnI^Iq4i=YmU$8GqXgAu>M<>Ct-C#YG@WhLZY;H%tE8`PuK)FL`lVyd zn@6beb0K_nBz}C!z@3W_#B3f$_1@Jm9F&{6b&u1-L7uIVV$i|x&ND`4G zbFW{pQGt6L$Ydb_KTf1<6UNO|q_US82bF}QQldo`dufS!SM{YO1$CI%WJ@EEBABE_ z!l4I2K)JHIP5K?Ot}1Xrf+^i)V`sDCOT`piOkrLcE7%?>#;jaB4mCXnhIE4@YI%B= zM<1n}L~ZraN0BwCnp!@2<%(O90nXXmM zSb@xXwJ6JVlv(k1V_n%();Ez!Uq}~G&l0pNQ-E#(!m*UVd0Dz7 z-)k3YH?QFXNG2Iu8;*wW@XKI-08z&z2pu_#6@Q%sS6ma?y{xYsK*0wfTbRyOW8EJ4 z*XBa5cRVR`7=31AYjab)DP3a3&ez$hn+rcMqjm}oXy3zl5jC>#mEmUwz=5Enc(!eC zjt>>QHaC})ooj7t4cy;sp%`a~&R44KAGhVyknO~Lnl zUs8E!caddLn6Sm+Ryh{x`(o_cnj^7%_e4x%=Nw;#z2KJxCYk+2Wa?=tRnNsRu^$>n zTOk!g4DNYS99tyQl`HbIU_lXNL6iaqLKdh^trpn;(PMpidnqFkPV|Tprw*O;8|_c( z(1y=C-1E+9o?dw>87jY!`bx7sX7{w`l#t(2D4ki0@OP2xq6N;lsJ6UnDcq4KY!jSJ zY3KE>K>RT~#hPt|?Lr`3hY#CS0o%#c*AG(LX<_-S$!C8uWb_4^MsO!a%|t{G9?>{-$8JN3!g1iZCl5cPGdeI28&J^qeW3M3!y`=Y7=$u?&X~=V#`Uus;-*3AoNGnW7SjqH)`7eoZ}ya^sQC zr^APLq&)bf-$^6PUk{J&i3^%3a5JUSh4ib#3Dt(;{(p5iEnR@F8^V3Glpcyy$w)Xq zpb}mu;jk5cNWR)9jqBnw7*&sxCydMbLbzNHzAH(NrW4xG_QAg$CIzg2e(WFf&+q(~ z{PUrI&p$u@U-{>ErKRlMKfE{pJoiBU`H4sLdD6$4Jy>`+_+;VXvD1ZzcU~+!9I6!_ z9$zawylb0>MDri|yWxaCs^6`pUms5ROYV9+O|+b$e;Q8sOG;yF>9>aY%-p} zPWVgi`sd-~pNGc|wKtY(EgUgX&Nh~(5%rh2A=a<9Cl>0hivk$sAXDJ1j{?omzYZt- zS-;;`zu)I!Smg~FK=2y+kKu$rYw(|H@SkeH|J6W19Qw&{!k;zxZ#DRDHPDi1Ajl4l zP%x8!HT8Q+G`NQctCdItfqUpa%43EG_p8DEYM=^=G|(OlJxF29(BL68ct{OYSCIzV zn4$gD!wd}$sKEg>P_;!GXtRbMXWgN}6Ke2;8mI;%4YYwn^Ax-c4Nj`TNi|SqMjB{S zht5*jGBkKr4W3m4)oY}IHhSm<3R;E+m(<{r8mNjR4Qgsor;cT4&`^Vh8mP7-4c64) z1C%Ze4Yt%^OAS=C;E@@zUPN#z1ifORf`Y zqC$)+q?3Ux$1jpkl!|pFp(@=eIX((>s4MwNLGDwfgg@1l{4}*p`+;gQFlnW!j6>sP zl4w}E(>{xgGkh>jKcb|})7g77Qbl<*LnLR>jE03wN+qsR~cgEqs$aH{&iHdK? zgf)pBIg50(YPV8knBi)_jm5R2gOw)k0OD*d;S-PpDAC`9B@q_aY!MT+rIJQVSbB*c zY+fm)lgK02xY`G9XIlQ|S=bk!o%jYh6P#WFsFEsyG;FSQCzWqC^u`2{M8yYni9ybV z0aycZCemLpes0P5K5al`{?!VQ1=*5On^#^Fn4)Uj^H~j;!J%`CoDCjwS8y1#grkzw zU9lq(EXXHTstV+o`Q`zeL)E3Ws;nmbEUBt!;xIiQnxQj z?a<+EVp^TW@%NLS0J2mwv)m8Uu5iyuy+-zw@pMAT-%qb3$@EFN7*jRI;uO6flP_w%Ln z#bbO6WpCArSzk;+cQVy)njF7Yz4DOny8C%V6gMKNl?$#CMzcCp%rGkjx7w7S$LSRJ z^H9t^ppel^rO&ZmgIk`uqv|1k2({Jdh*>zd$WB)>E!t-Q%NB{LOzRdd0l?17@2h63 zQ&{VhwjfCzwxlq=^vnvW1y(4Knu_6Gjur?;(KP@x&2SrU7|yf`ArXObfl;bCV3#bK zhw~lKzxzc|xX{G$pI9`t(OYKo61PWbdQT`6_l=%

XnOTLuC7B4H6 zMT9oW*2}d}44E?zKF6K5W8uSBCbrgvEu-n2f3Xx6J^1z{R8DUIS%^4Ct=&zfhd+2S zy=ZN46%c+@yWgBK#d1Rz^m3C+bQy+6E%NnZ zK@{3(_c?BcDT1D7yn*U@abYR24IWSeDP=i2mNV$GDL}7q-sKT`mL*_=C@*7AMO7uG zm6HkM?;^Pk^eplO!qu#FohoKB*J%uo72Wr!*QNq+QEPwkZDni^p-a=eLOVO&%{UEd zpG4yWJ!5RsnKPI!CV{}13ag7(pjNFWYlroeFFUIc_WMyG_YJ%wuWvSI%`2-`zD}y2 z%8xn+fvMPRHMezw;yAurI&OliMh;pb7_p08bIf0N4OISa$9vXyR+P;fIWyzuVzTUa zInMiU>j7B~Fjf;cAwawnE|!;wuTFJi-2TJK$9&y65C<JhJQyCc0yq%vbm#2CQoKN7Oh)gH=mO9_x3{tDtW}=xzkQ==FDIOy!ryDjbh&h} zM9rb~c2M?}CN8GOHJxfNB4qYUjg;Sc1)eexxmZw8_?X>{^I(Ki6&M1A?AeuUwy)jr z*WgnPh~vf&-BL9o$Bju`W*;P7LOSEDSr>PKGsH0i*=|S0_lDWEo+ZwBivqM<*IrUp z92sNz4p`0k?!CdlEOTOZ8+GoEsheM9PXUP6*UZmlFbF5Zk(Jq_$nTw`)eXbt@;Y z_Q0U;t(N@X?psRp3kwNr_j&g&I}=NP04fw-14bR|FI;1hJq{oS8792KE|T{E*?e3K z$6&T`DhU709TYQ@fma#W%Uvfnk0W}Md)DpNp>Crb3q-ysx%#&9eCsMkPWaM9EJ@X8 zTgB~l5rFxV32Sx`Ao#KNqt33tVI4X7Gp+$!2r4|}E|^9$hn>aEC|biZnZV9xwYnT0kr16~X+XqpWhq0?pj z^CV+zA3khNFWIrEW}7|uT}`>;{rsIvm7g+nK!#iBA-;iV9XYC6%6(A_BEGgbB7`Hm zF%ZNuNWU5NLI%t}3XngFniGHNzEsht+?XLQBdSm02zYB3I#~)BgD4(qBDTbnRL=OZ zG7im@VraMa{X)-JAJ*dTi688A?CgG)?k7vF@0kyTTX;Km9?DlulLhWnedWqejml2g zfW$_LHXY{Xm75@d-Ul2)fa<(_Lx|K};Jed=mjq-X7_AQ{G@beE3@GL}I{Cq8To)-C z&k2ljay*yrxY4Wag$|%%?Nasz+kMdK+Nv{LmIM|%oi>q7sY^2(cBXSijcgu5YHOTP zphl77a1APIrhc=H`k6=prewV4&CUMc*=Ilf1*swh%?oOm+%vuDPBH|VgaG2`U!Vn5 zAf{X%LB9t8q8=?!4r=H{X_3GX^=Rh{J&{S#@E@4~E!t?-3TsBDB}<`OyNZ-uNxrto z`ZGx`cpCKux=Xr;lQ#}lqVq)9fItPzok8Htpzf@>(>z%C$4s1vo0Ct_q$`+p^Y9lZ zKy4P3LYugmnQ%vvw#&|!R-4zCHk(U$T&ZmpS2J$nC%7K8<$+xgEQ$l$@+EV02>ViM z7$D3!rwGl;tTvP3Yk2Y1`l7ogXTKH#GT$=(p?p8%?;X5;bZXfXv^!CJHwf=Dl$p`Q z*>>{$wI|FZx+KLNA>r#Qe~G^q`VW3Ox6!TVJ%Rwb6v*OkZKvdHqS4xag~LPEqkEgo z=*OT^==1YJ;pZi`!}{sdZt?0W0>kQ(n&VNkMlNV*)L)m<6WMqR_10yskf)Nj&djG5 zE$N`}iRCGE0Iktz1ws%gLu6Sf|0a|VnBLczwC_B3a2IRy8st%6$^a@NsSSUh9Qghi zFdqZT=$OA08W!N$(bVaBX#5d1jsPt*tKAf#Xw%*6p+$gdPn)x5+)&GZ>ui|;c+e|= zP=oO1_jt1}$n#g!!&iQCLLZJ{N+}~)52;Z` zz;|jnqn6tBlOtwVqzLZz8|YNv$&GiD{Y5#wufbY~Xhu?r0B$5vuh19T z469HezRsQXX1-FtshS0mGt49$vOiJKSADJHPz#%CG)Ey!r!li4?LycQh~;ZLBl)Ru z#q@s{PiGU>i19UNlHD_xc~hnrQYZb%OJ2SG!E{aGUOJwTCs)V%pVr9p=A#CpVPo0e`iA_u`v!i@%oLCn%X~sMVbhM!izs zJbXCdO&xTMerj*d9e-4$(XD500l;eNKprSP?ZL?Q8&en4%v7uqIu!EJ@+LB67KOsr zMqR$FgU-8P#z7^v;r`j~*Jz4fPGx4jcodP>%g*o(^$L?po^w`4O7%^BC6m+uedXtGtv@KAf zjLdsrq`!lZ_can^#5Nq+_B_=oA^OUjQT$rIcT#RvD+~R4$6X~K>TgTwk>eUZ?;`ol zS?rlsA|SGAVFv679rC4Fjtb0&L?Td^5G!UQInzGpqiC{7Vs38K;f-o7ARwmj81>ET zS8CK`6~hM=;IFVKG|i$p4a$K=v!=mZn^Z&|p4V_QRssmn;_=j{$+t2ob{acPp%oa> zusW*IUgOPn)0j?JDKJaRwFzxDLFpVu8T7M-7ZjR;Mset9A=1JNXhJKd=3GvvbR)4P znxPMr&lXJmTCMElRrCqexRG3+i_<=)k5(za;~fGPuH;feHQFKNQ_sFSHiW#X-_qHVO0r|QF;T) zlDI*~((lS?%PXTlgO?VdAp=$DK+*%a8*C1RxkP1LNc7|>tW6s8FbQ>{KnT1BTzu#R z5hu_T5u#Z;^m?ij_+oeaZ$Kv>{CYYW;GX=}zE>{TsZ-)_&l_GCFNb&X1QCFzsaJyc zyjt3M6(;Cq$PrM`fz@7yWF1B`+SI4PS<8b&Om&GWP$euXkJI1r!Em#<(tLvg!(tgC zui-03m*zp|Dn;f)q;fv*%C#=IIE%6bU*BK4o+&i=$5Q(8@eHYs8@F|y7Zsv%OeVc& zw!{`amHhVj7b58Lp(Demq3mJ__^R4J0eU``ybqL`%v9duM?puCUF?W3CxlqE>%_X? zE$9rg(O8Iq+oTB1Aa91m_lD<8HDK6bagbJy8WkxVx_+G4zI`jlbsJ^mI$y`nAZZ5u zqj8-ekY;6sw7lS#!lg7H#?DgA=4OZ1vg?ajTgfk51!$1Jq1*&s4J=$S`A^iC6!+p7 z`KR?(vtomX(|Jd||36~eT8?YbA3*NpZZ@8?n!P8CdT8y$K1xopJ_HX=xhvp z*4$L`A(`;#S9SGQd+Z9+WoK98Jzf3v9=m$IyQ|lGy87xKyGpvd!uh^yfqy%=s~&zW z9iN5J1>O+szEdavj9*KySbOY~1^ z^z|h9$H5a{U>;$XIT7nEv^cA)0b$g386 zFIDu}HqX$p#a8_)&fKVJitUo*)W^<;AE0O)SVGmrWvJ1C(3$wuMJUH@Xu441-~?mW zPEfAOv&ceKp(>}Unk@Hf<^WOQZqrbFPnM(JV9rd_le1IkM)5>MV?z$*E;kRcx|h~(y_>v@c!>BMaz**e!Gd7Im#E=0c^JY>;4qngGF- zO_iS2Y=Z9h;n}hcPL_kB5Qv9BKN9bu?}0$E!NzEnQd35 zVZp;$At?-#u zKoWrN3+XdBO!F!_F3q}dWHQY1?urN>z?^{`?6cJyn`2p0pRfW1f>AZDxr1<6S|Si3 zkFs!|5ZKTwoOk?$%=3h9!D&0{7vfPTa)evCTA2*Q0mXB@MX78o0fv6#Y58QUc3S4! zWN7Ra?njXjTODQsST(nB@de{M?NbKI6J3D?QNHL@z2iz{_wC`sq2F^JXnkh`62Da% zU)^Y~Uaze*HQA}#bRE2fg~8;IJKqp{D=YB-)jm+R6a>V)I=Fc}vMMMHqE1Os#tm@3>v5YLqsVaAivY)k~|*=JlFT zB0|hi{H>)Y(m3_JF)5%zV;MErZE24=IXNykZz89Qje6}mG}J=v2m%Y4F*sAX@m~uw zB=e!W!_mh|KZsM{m?`T;VW7MhsK2fy0=n#zbTr^z#q=dQ!+Fd8!`xfCH(Tm%<80x1 z%EGfv^IMH;z3tAa-3-={^p>S^9?v<7_T63gvytZ>f`TI(b}gE^#@N(Py=} z*?FLUYxKvlPnc&lB835sx|WwOl)dMsd|=K061UHU%MNNj^GYaObeU zUHVKM))fl*0Cs(tXOG_UgC?cH<~5gkVu!f-tZZKEI0*Yne;#}FH{_6pYjT(ZoFZ?8 z*}*82>&1(Tf|*)TXSGcFaBlR3>T5FN}ftZq#z$8v{cu`s{}1g^}ITK?)=kdtve!QZB#g2KT1}79Zw1bI#AG+Y&uL^ z8*+nLGFb(L!&|OnmA_j$ptEG!zf8$UCu{m9m`QO%vRb8_qZ&7(xzz~wYMWRgTnM5i zxLo%Ozh~H50ol~Gia$n@D=;>%wF6_*H7?lV#5l4*9lJVN z8tH{^j$mQ%u*HSpOmWQNR)mi4<+aw@hB@QF39!`=t<6mg$Ifor#q(h4@qDa&jEoj~ zT?;o^vHnx%&n~zpkc5|YiqeLTbvYqfwkt1c$u=%nhlCY9{e0Ada_)bZp3O(@aYT&* zkatp$OJrQIn_NCdV)o*!!i4aXTqAbcacNCPN0D=GV!O2=6*7#tt}jS?`j= zBY?!K*nL`gt!FBM_1keSZ!4X>-MM)8{U`I0Y%)cZ2q5m=o~e=o9lOYUMwK#B=hVpj zNX(rDq6Bxu{s;=4XwnB9%ml3@Nf36}nny~6mv>JjryB9)J@1Wv7ZJOpl7*o#?Lx&6vew>SUtUsfGa-e@?OGt*-zlZ1=Jo3_|8c>7 zBO%gj7lHxY-bFYC?s!&sE2G%>;%dk<+HuFgCZ4B-zW=$D&Yd(hN3#|Bt&}#@uP`aT zQtazaX6yKl>@iXE$2q|#kOXOM;@9zo01W+>P5z!UqGXwVOYFzywGe!mE`+;jNxCu2 z%-c&OVUB6Y{<$>XZ@kf$4jqY04bbTZ3Q4y9g>6t$pbl`61?XQeX$}2rDf!nucYdg& z3$){NXKOcc-yv<`0<3tul*H8}M^FSWUq92lD)yUJ*-t~soc;6+MCPS>@t5IbVF8{> zs0awNo=eFLX_wx0h?UGOymW;o8;iuQL&!&y@3XYd@7{yHJc)0N*c+O3_Qt>a8-?#W z-nc6{@!nc{4P)}Lt<~$kw1n(l-|xTSY(T&9)6sHVi44Z%`4_t>GvdGR*iZMY(ot;I z1`WC?&j;C1{rtzys^^I|g$PK8<$Ck+x^DIZT;GSE`dYcN+h-^EBo} zHQKP2^7B~lNONT%DedFidW+QN(#8Iylzv3y#JHaJ>G0ACevvcEDfDylLrF>pxnXsE ziALK1uv0!j$RJ>(7M~@>WtT5EHtiDN(u2;6&K33C?K|ox@soiVHd|ayY3$UA^JzWh z#7ydfm5wCo$RKJs z;bx#CU5glav*6!7BS~`i=)EJ!y(422-ejM(7*_*`MRMQ3k-L|{nDLsqe;{BF z<={X?HC0$5*$#)&Q|;Dck3W9!iNl8rzdXPshaMbB9vnE8Ze%HyPNlQ#$W(SmK13O5 z^QusUd4^QyNq5lL*gSFyl$x`d$p~NxF)xBxf}QOK-_G+Qm$Ix9%B-3%gI#TKIQInZ zhX$@-W#Hs|Eu*B)tG7`@ZQ#!O$Oz#)@nGOO6u!1)sDLkAgoWfjK9VkE?R)_HK1m)K zIFU2i3wg&rg()F;t42V;$A{8Ul7W#$*wmPQ$Y#^hDGsKR#i%~{{*iS0c=)Wg*cMvG zYpz5MzBq0(aFLmaaxvql_=gT;O6&M$whrCpY*-{o)-FFY2SyYcBN_U}Zx8IPm%SZ? zgCk?7a&9r+F4H;R7->hxLP|*lK=Sy&ZSRXGrP4F$I8J3pI@OEqC!k>$P1AeUwV>@J zJ#!65>_3%qkkGC0?UR7^RQ7eDtvqJC_Tn@+9XyNe$k|ELZgASBw2Ou-&yJ*JU7or~ zlXNxQi)iViUN##$GLUnoqq@PZfQZz(j$7L^N%9162#%W|0)8ZxEx$bzzk^avA9Ke} zXaHF((?g{T+TycmIw7jC2k)7_e5z9&US=SPy$BgGt}XGeN+ zjGm<-tl`<+uq|Ey0ow$hLP%ut>~8PpJK6Q-Ma}euk>rJe=z7L*q?0TsaLcEa%nh|? zDH(8+rU`jWcWHy$l^&!8W}!Id+&90{{gvHA#clJOg-aFaoSF`jm6JJM<0 zFUGvI8zbotv~knjqs)}U=?Kh2;W?vy%FJ5d0j;_w1n@Hg(a^frMiTzW$oqkj`$p~` zNj@+T2uHi8#~$pn36_$rk#xmAcDHdkDVaR&#T`n?_DH%K9{RQg7q#H|qXZd+FI?EWV&}RhiXuHa&x~3PP1QQGVs~gv%FLljv#CwlwX46$xS;bvMO_91W zsU^BmaJ;$Iv5GYEq@0yL(-4s!G!6aMNxMs_v}h*xbk88hWaKl^>+a%GoWp7W1#$*9 zRQWsMN)(i6W48v6^h}YJS#o7#ugBDo%y(fpsl21cPF{vGN?Mkz;9udE3(0jJoMr<^ z#zP=+KcLDPUjUJxDk5^j#FRZla2Q*TIrDiSg)0{gP})hs&U9>8Pc#Q`ev?!q(Ow)u zY;RRg`8?bTjAJP~ju@*h3iwnS`|*M@7+cqlAX%toj6nqD7$eX(OX;Y-+zMRz(R&ps zxc>IdU=;>jialvJ@ofw-A?Bke%^*sda?H&urQ@~w9GX@|u;7f-wh82^cx_8mUO#vYoefME4Q#tF)65QxV%4Fmap>Gj|3Hc<_xkn~=P$ zwxt}G(!Em7Q=O`u5AC{j)8FGQ-2KeVs7(t7mKCx&2$!T}#m0gMAbxI2#OS6brHXns zJqJu$MB;^PX!+!L1K1e$b*;ma<@z9w5}fHch`mxvZ6o7(G!?C1`NeWO{WhS2sJfk!T)g>!N;c6KAZabc*|zGO)*pAnS~JM?QPSrdTh*jO&L7J z@yFicTNX;>Ue8yt64g`sHosAij?D-cpbQ?z#av=e=IFonQj^psah2pfyG~kwr-Py# z;RRN)p0bPNZIs5FL2P}nY1g4I>l(D1d###6LM{(xBjGL5|7AmvRIst31hrtO7qDbS zqz3aEO?;LoHv6kwnLy9t^lWJYn$s9AuKeHy(|kx*>JGH`n0xcp<^gm5vK$?_D_~ex z>S6%hje9CsBaMR$Bf(pc=KH$!Me?|8{3%N zte-zV@rQ-QwPg@r+hV~*BgEZ|Bq?`ik0(io*0I7~5E{+{GtiYPR-hYaMtg9TW&_YF z0+V^H1P2$}ZM~17Q8ClA@drLv@W)eH066++YV#~HlEESK?aj5#4^002_PvC<$V`cXWZQJ}{2Ky417TQfXAk=93lCnNjsRqo#ob$}Jo|bv^|d@?5X7 z>)G9w0ZPEOyszq#{QyOI5!dkgOW9s*A?vTz-jC$BxqU}O1a4$b^N&;<-dowX}IUk`wEXvp!XT8Ywki?X0V9o4s?r9S>4l5nM23?3b zT}1Wh^jQwCxEW4R=G9~NY>?!uFmj3J1(zeYpZb?!wlmt#VDBW*gDhSh z6Il)pL5hV}nurFLgmyWr_8N6I=Hz8uhoe+*!-{S{2YUJ~F0iw2p(Fq@Pv7WGV&4Vz zP=zeRi#Tvb??xz@Xo(_dbx6(HOc#cYxEpXs3d0KqI`+ePa|oiJ za3}QlXUncY-$U=HlKiN+lE|DDm%iZWVpDsPU>FnR~Uy-!q~(1LkG^WLDiuxSv-Cr1-7q2nJt*%t2v}2 zSqP})5n47$IN7h+f(g44FQTop4Z8*j1l^0Ft@oTU$Xnq@7=a4)F(L)afaPv%zTt@DG`cUd86-3{r*oP|C zKVu2`C=aK2EGEl#8$_J%7y9AT9z2=aO* zSvc3ZH=fDr!|5{?_O8`L=Qa`Y2$Ohl+-;+({z$(PT()%)S-J(T4&(t^WDGP)` zBInr~?QdjUb{tUq$=taHp*z936dF)aZ78PH!qjt@qe!IVYHkfY)jr@c^zVhw$ix@= zz{eU#P-c^^kfhh+F#7?h|2uCQgfyJ^zuSb6(=Bc-}RP27(G znRcR*5%FS*1|QA^L#T&nUMDVUYAi&uOEGJ@zsIl{3J3jDqkST#iu4Oh$^!Dp_rd2l z-*(90U)9BMju{;HBYWOGy4z=P5UcL*hw+Ds1R)Xu+YsMQ?*}ft_m=F>S6M)N&g1!^a!zlhE}^L$Jd-j525YiW6sN1dJX7WoN(l17$j$7Fin_; zqR}t*-7;?}^fw@3oIgmi{!)|tO<5Y82m)U6BAz~ZFysq1ZrR2qHBIGeMG(VC%;kEu zN!VI`fs`IekGp%n?klnFt%fuby0)TV>-r7hJ4h%#%QQG1y{iziaGzE_v77a$ixI(~ zmE(z7mpgDo-z1;hnYquLLV6hd(wvjvt#u**>nbgNM;(|xHL`D~_}y$?UiuZx>zyF# zCRJ9>BEVEMUfCJUcV;v_B=B1#8tL$^d>XBRs;!^!FBkM3X3`_q>)T7jrzp3kzS>UH zqc|JAr@nnoUs|&}yz)=)aYwS1&lcyL$Z1Ha4lL^Ivm3% z>6r^?9aQ%79JTl$>t;pD6umo0*hx6*Xxx#(acocipouAq00pzbb;gI$e+ z$>(l$8vWrhIt}{}Y-w!u?7Z^)wl{6Xvgv+)WcFM(5r{bG4!xNrOH)VN=cO$$-c?7jTKr;77-ZA zr%zO}S9PLR-hmDmE1A(bUAu7v)4=F1;kuP3ypl>lE`lR;8@?(;YX_R1k>7WC)IjAC z^^mXJOd6q+pgih<%b>23qX6avl%>E{fZC3wL7B4!$wF( z7?PTr^dSI5JTaX%<@dIcb_515`1ajwk05L>HSo$t9&%2J8!CWUoJ{~5faTXpGR1sP zDj#b5+nQ%J;)Qn0wEucXnNt;}EPVjwV01Z#q%D;|=Od!-OUKB-+MTv9oeYba=q`A8 zN6|W+c!R@;tkVrHO}G}3S2C_QP#7xLxbkv;#n{(Oc8S7R5sAf?LeEX|85RAz};g?=c38!~t8a5QnGSmxjufvnYCu(GcRBmDfSGTC)J0aIsFvgw83S*+L(bL$oQ!tb5Slc1c*K}>=r7pMf? z?YB$tF6=7XnQyq#({BX}AFqc1omX_N34-yrcxX**K%kO$L1o4bRU~s*zTU?YKYnj| z-i>S2H?@0-5{@*D0+3cE1cz3d3eglyHfn4w3iP;aoRK!`b#_2+3V`yK4kwf~8H)Kr z4ZCHXcL~a64T;&6m2;=P(`s7H{x!RIb~Rf$E8oa7n*22rC0Jv5Vz;(OW6Lw1e{7^{-D_JJ zNmsd7vaMwb6G$L|22w~Mfd(2#p@9YxNT7iR5@;ZS1RB`D1`=ps3kfukKnEIV;Q#sl zp659)_eGZH#o6vonZ~;3Jm-1+J-_!C%|r!z`=G~jaS=b-B7HA>iYrC>xdVp2B;4P< zK)4-BDLym`rQBL{lWs^6GBZN$VAAc&YG`fX=(53o*sBUX2B=<2Wl(XtAvY0FlZPmQ zINN2CmiIQXdxHJjH#C%MnHIYEpgr*s_rwTQpTRc@Q9BPR?=mDB1W;|Q!3YdeFLUuI z=TgLJ*`WkD2lDKuE;>}c+Ml7wF#?;`DV%^~`VPbgge1s_LDF8j1)W*s3_a&4G=+{3 zQ5ZLp{idRRYQ6cg}Fl$L@NgYSD*c-JF6boe_fco}_dveUeVh zA^Yq~32a?*J8;Qz@JA~6M-6f_5?<}YqK}k!GQX$XKprID>NT9mySwTB4Vu2*737an z`6I#2EZsL8lY;+~+P~G4e>1fzUmPsIjagEb9;vN74Xk5Rwla%jJzib$xV>oi@W{UI zSPzRlgEEL@M^s@!V^)bzoK^Y8C42VVb@@fdp@qpq{aQqo_4tovUyvROJ1eHX)PZc( zrlT-%rHog0>A>Y14Y`dvirehW+At-mvuj`Ind5){QKotECtOFd22eV@%p5n?+VXb9 zO~M0l%IQ$`);ajBQ}W|qg}s8FE3jt56vj1cHcmt$)E3Tn71heK+S=z#dAO>)y_8T~ zp_$ukf>*nJ=;HFZ_@r8yS;;2utS%|N6Cb6bfyM|kZ;v)zP^%^@+Ubxw{EOjcEG2Jn z=JVe8wbCMQ0{LKiCq6XsSiB4u#{_(v0`)QdH^CG+gx&GRBQtn(;%iu%?haQBmw*m4afMLq1g2=*OP z3NLhwDRgcSB*nB(!j#?Qpd7|m;+1B|ochsjPaJP0mbw;w&mDQH6L)g78`7^O<9~oY zbg6Hulf#z=V}Za|_IeJNt$d1SJ4-~+`C2)faZh5v__Upu&o$+IU1-*O*Q2pzSJ8%p z7i-{qPkr398F_oI>9c`glS||YniEX|L(F}LY~O%X15Pl@GOT*8@-fRY37hImPqlM0 zu=4v82JJ}wYFM1*ez)rzy7&C|OR>i^9-Wy#k8drPOY=4L!0eg?7U(+ZJ-LM_z{Rq2 zAtY=#MjvWhzNUh5cJIGJl*f|EBm^S*7U^EjEVxh3C?+t9r>vB^sX_a0bUZ1at9{-N zDie9)Ongr6l-@}gzend@g4x8oZcb(Ly}MS9q4ckh8h-{B+VHihbhE;;ilW2MXkY+OHZzU}p_LA02D>DF7!`(90T3FMI>XQD z%p!cZ%<#gyLSAXbMi}Dlre#2|`MC2A#d)WIrfs2XgUO?YoNcK=s5qxF3um8>ZV(rM z$~Q4^;*4+;tzL8$dp_t5@tQD9CZ?^Oo5&nsLUGa_icU)PNY#|u8I700QaYGDDuQ!i zd=jt`0-(kD(M`YtM>FhbT))<7ZD4)q*MZH&suyuv!$mljdMC85Ux#cW4sSY(by!16LVtrn@VrK zLNw4YF=t;JOm`;N+O69SqMv(%^e25S+wpkJU@ngr%a~Jt*{y}0aRBVlZhv$*ZLqXo zi!vNwKhjnOp_nS@>)4chz@cF{DTua5b^U?7h##eF;GL%7pRFyD*2+ zummD(oMH5(co~qfEeN`3?|ZVoWm12tT9tI51ncr3cOeUP_npI2?_A${XRd|m!h`xO zeD<%`H|i=#>@so+H(TgKp`UcTp3a{Bi(>*l`&ML)183Y%~J_~n=AQkwoV+Y@}AjacDBA2>EBiHWYudI`sBT}LeJb1UB8{` zDnPON9%QCtarmI0RFZB9oTq88(>ZCzs0NehXhhAS1KxMrOG>tw3AdP9^h?Ml7A$Z63oIK?Fngs?C-Z3LR~_!j zR_$RCT|>D!)28F@7}R$X(6;Slp-Tx*VsvWbP9()0y&HcY8vDnE-JOxgZ7C=)lqJUB++-Gnhw{y?--eptwNu`KuEy7ru<^gCU0l(NTwMBa`JYX#D`S{91F3~zi%Ddq zyV8r10yFol79ESb@Vj#+Kz#6q9f6WVCU#)y*A9Gzud>Be6mS*pRc_L#TbFoadu8xq z`mxpX&D$4*MOULA-(?c^kpO86m6sA7!+!7~tY%8ArKk$~m1oHgME6UjpXTYl@h;FL z)&2-1Qu}!~UO>Ci^_j4RUB~;(8@!oX+OHQfEPSIk!@@UUsPV@6#^KTwxf;A5&UDIL zHBrZwCr&ji6;2ZUk9fZ6{(k!DkXIy{xaczF^i4YwM`Nef8l8F)eG8BOrv6MnCA-15 z4wokwSJ@`U>}4*A$+r*3)er2>y{G!b6IZEL#6%B0iYHMi`fg!S-|t=2_uZntUs%*! zx+s^)D8H`P;`nsBFkK^`>?pUkqy19?W$XI^PGf$3Sr07n2i;37W?1>wkYDAypJbIk zJX}VlA(h|Cowdy#75a2V4yBkJuq5sLh-3xwy?a6FY*6eqY=LK6YZl!JM?B$uReyar zUM@7eytX+%b(HK?`kST>WgeNv6R9Pt8VO7L^l=lgrQKNGI}#q9fiqTl^ICA z<0#Cn*5ou=;W6vosMCN3!`Eo4c!9A@d;n_WuR8s*h^{_zt~A1Ih+H&Xc@3nx%O}s(KB2y}HE?T-`JDu1E37`~)ZK2t)F?iD zXK&lHUNAXX8gr=1{cTOdpwo9=v~-m zu83{kQrt4(2$BlzdM4&8!|^u@%!8Pi`DH1?@%lVz(YWt>`soWwV!hcs38GeZ&M8I3 zI4V3DkH2W-I65@_4@yfbGXhwgOPc1DH+m$0JvfSKbEua6)=^beUtT~gGv^w%(5v7< z&)`zK@lem;lefCrxq;h&WvGW7`qd~Qwu-C3b74t@eIU()ELh4Wv#}>l&Utcygrr_zftTktZ#hD-fsgS7a3XJwrOm`LmooT{6e`1e&S*|JlzTlFzwP7SS}lJ+0P=Kp=oNgmgkmFiS}k?EWNrwecBWoEf|}3f->J} zMdC%?P<&`2ZvUkB2_xsa+1UFYJ@~DJ!$YN}d>QufJH`IJQ^XqqKmUDg5hRWG32gNW zm|Yw*rsu#5{5jmcpsSmOp3XI|#8beW=eDC{{7ii6&JHR2+`y(X4zwy0cL@A$)qzHBl zTb{&=sL-wzj)Cf2r@i?j+u!#^hsRvaA++1|>rK0+Vf-n9Ncdq((Iw896{2!*9`oDm zUD7sHe2M@(SkkYCPwQOboSeY6qSwT9?-=oyw{U7XiZ|)&JOULv=L&bNHa!g68(Wr5 zSLD&p%dx($Ogw;&I!`=&?T*`3Y{l-h0vN9t&p~;W6q@fQkPTO!iWfRB19<^NbR}Ik zAQ-mk2EI3*U{kSEyPNJA?2g=+oUO-no$^?Ey_;m&A;K&Iv;{)Rq#PfLCyYPcboC~L z z!}ki%4zh__btFRl`;)mIq614Vc2 zZV(yYKYhZCBYG<~@h=X?(~c`RE3rE&o&LW^RG22Am+pO&QWfOk;V*0DEizXm z_rRD7<4@f0mtsgrs4pkOS@A>9EC^W>#O&+en)O4ql))lMw!HIX6;JAgI)U6e`ok_bn)M%w)JgP=2hKqD`?+V(54F7w*bwZ2r>vBN2G*McHT+K z>spXQBP2IGQu&vQxRZb?VZWX8diBOe3v(Q&{R6@LxU z;)!zc*?zwc(SEkFUyJ?TC4Bwl*nTYz{_Ze+y?gxN?GN5^n4bUNiG#O)y)8!=XRi8s zzka>nl_)EgLRIyH!D}jmnaRo2oR^>?qzc*-j{{xPIZGPwyG8ZFR{Q0j1Fz@ZpUNUn z^gcQc=MnJuRp4(fd?gF)yJrV}=$yr-T*)~kfIh2_v$(G!pO55bp2Ej2KWUsXh0KX!TKE;x+2N(@S5lpB z4`4MEO`dXQ?ORReJ-JMzofNPe5%u@ZDyST_CXpJP6IcxuK3aJ8e`1kz+t4j`f6g?j zmV`$3JT|zxj87*1&wJ5m6up+tJv)PVZ0v;=RhXFm1hw|AK?v}wvH-*|FE;jBOxo%Z z@82!-!u}q_V?+vOKZl~lg`KnV93@|p6svdp;81k>9L9rXB=G}&kwnq29m$$WNftWT zWIAU?2~_JhlyDN&;{AN?_4@!0BV1>Oc@N?0c@N0^Cf%uWPxqWgJRDnfFx{-Si!3M% zful-1OgWIl!_nd40N~TP)?E|co_*2#N-xN{gbHM+d5lcjZ)jh%e8K6f?7^ao0N2&% zZW%|HFQ_!vt!8jSX*LFQIuy-5zuRo@(KD%PI(WFNyZ}`%*BevuguT+eMZ4~hOz?UcX$%;CONSZ?)k)ktVGHq@@s^PbfP;MUizkx*e^UCiO#BX z-!tR^8vwwN%efp{mZHVKMMt99MeHyv z#66&jDSlgLJnvRy^4<|q^G_(@RJ+}34*;}5$7m&60}%Qn@kddPX8c_+h)Y4_sp0rU zc7L8--+-a?AnQOftf`>K?FFF+qO-pLJR~YRx&ijVhZ(fCZV>&Qhyt%p!EP(Ubxr{> z{Rblbhu!q<`}Mogm5`X&PdlKOyKGR%C(^qSJ$I=Rod{zDM01zU54r^pMl*(cPPaB> z(y8>vN`rda_hj~gq~D{G(e9q7zan%M`3yY>V#wf#0R6lY?o^j9{`aHV3+BXsaksrq zP-Qem3Erjy`O_$mHz;umWrqV{!qW_>zf`* z24UK9EW9r_cX|(WJgR^Tx0A@mhUF|e<+qY z9Av?%P050GeToz=i5?h^@eN&bHf>uMbo2qy(Fcd42mAGqKN~T(>y3wo;|cpzl&g#{ z_ro00v%BQRVT*HQLONj2HYIp!||+Jfaltg8=^=0_1)cUV)7C+h1vj3ax+GOxeVjP(fC5U zUEiBcqQ!W^gp%2-;*;&^ToOHe$UmNw=rCcAkH0&K{?3aO$KQPw&c{7}0;ND+v^gAA zog|(UkYe@eP&Ac|uK?;kYf6g4NyVD~^1fZ1_j;7x0oqkHM^YoBI?Z*mTuy z0W^Imn(%O@8me=c^qXx}?lXr8asQ7E=WF&I9qy^wca)j3$NDEJRgMiu$I{&%=cMsl z8FN=IzFB?lRbeM9a`6Jb63kRBpV}A*16(3Q9%g=rUYD z@LksJH=hc2=)vd& z1HEYePa!Gi??rP=){}*2!Oqd|M>ETy3)I^H=?19y zgXpyD*=(p66d*5FdOCHu`ooB#-|aS8&!X|@tZU2ACvk@ID|k4Hj;GLF;2kUD=be-m zfl-4`rkCJ>lF5sLP@JOLfQ5t$!RV8&tGR~plPlgGWVXOws!}$WZX&#lfqP$`@~ISH zbJ(>H|5L&_8vKC2Z11Hbco(l|cHzCl@tpq3lRYYS_8X$7U8%faS9^?qp1a;3AuoXC z)qfr-bNv?j4ba;#L!n&3Jm%CDK9!zG!A2gJz>MD9#a9z{>N@bi&qvXj@Z}RG?^RC1 z;IrG&x#1Yy=o&XH6ZG^>p$O+hnVuhxo=?9mNO-P~_?z9L-K7JIcHJ%a5$(F0c8hic zn5a~=+Z-Ms+GS3N@r0NGuEeK@_fZfw8aNQ`7?@<8k>CTwJ-hPZ} zJp)IuuK=hl$p;hwbGs2_z_W!*I&Z-7f2HvE>7j!Oe@XP&;ds$FeCVVp9?p>D5kgWB zD~4xOVXa}t^Vg7Waz$Q_m{@5?kA0X@%2b! zAcsjI2X}3|#jxVrgUDY!C++30-t&2L<*y7e4HCg7pCK8rF?~tYJ{Wh`?NeP|Hh{-2^H*JofzRl{!=Y2Xv^AH)S+Yg!K{#SB)XX~P%J zoKcFWH(OSDTi(G_Uv< z>s#52{~Rs3E7HB%{&(ZQL}yLZFSd>*qj`i5!~imcgroQ@;h3qp>M?1LbQ3*?UQSI@ zpC2lirl#fN=;I9sBkmp?@?WD#sQt?ZCImp&r3CA~l!^#cM%;EU%>Pj|4I_594#s!t zZF02sem-UVf75j#IbzTh#w@vCZwE((sNiBSU)eMUeLp^E0q-6d z1evv$S6UWTIrx&kD*^?0h0GHuMS67`}NSPkg0boWSZRynR>sD z`YU95_bAFMWb!Hr#DQkNj_+L~v))f5v)-@oZjH?NZ&M=^ZKiTbPWv+6qkZWn2K}@z z1F`tsv@g>R%XY-!CDES_$Dhd=lY@2odTW|U&^x)N??d#OQ@InR3k@ouK7`?L1cAw` zcXoT#JG;Ouz@UFn@9Ygnd+E`2sdxVJtx@mHfHKY7&1-g+!*4VSZ!2|Pk5cD^;~d8;S|*n{q9^&km#b2UMFRbjJf*gaQtf4rMZ-( zw_itgwz)+hWS;Fh*cW3(R%{GbEMvgpF~cQcCecUldELFPARiYc{O~Xwt2gmK(apG$ zvg6_|*4d6M_)d$A!`yKEXT9qW*vusF`1zgd~-(Gn$)8-ymD?i9M^p6PwHQ>tgpCU z@9y^VHM#ZdvH-`(x!>%s}&7>>S?_Eb;`7yXppcKg8;9JnD^ zzJCvHKi_)W?dNT`pS~(-qgbXA=>)XyVo7`52ztC}x^>ELyZsEXSp9o-`++Lm-R-Au zql2iOA*Ti1P5i%!+t0Tg6@0yR?QaJn+GUmf?mkx8?}`9_e>nPn`fY&#zipM>NiAz| zT1BYY->7ys`rOmqLG4F<-E!Z6RTdKcwpG?tz)3V%xnFe2ecLLl^pnar^tM$NqfY0y zYL!Jq+s7(fe0vb`*n^qgw#p9hrhMBfYc}Y&t+G94-M6i>&WIDel~&mw440R-O@Y4R zGuy3TuHJ3-fp7M~rb(FSjb>qj-bJGlPf$0|oQ{ie7&-0Z>>Xz-w?v8A;2}?- zQX(#sfw0vk3$$vbY3^D~Q(;NIEBw8e zdGC`3k~WVJ4n;oJq8+09-H{O5f6kW;S#?S8S8Goyr%Q25d^$1rjmsD8jzSq+d{d=8 zVupT$No|Ik@+}hKSxzl&o$tgB(r1A-7*e|6yY{9Nq(VGfQXAF$aE)x<@jcq#ip_Ub zH(aMa9YX)f)ht<>JAaqH%6Daq*6wDm#EEO<3W)(sZjtPzG9FmDdToJQG<&;PRldR8 zuGFG`c?QSmo169a%RbTK9ilyS8cL4iQaN>=u0BV}Hf6v5Z`J&)j=rfm6@EBe-q`km z$RR;JH`OPF?htxs71vr@mltkOF-2f@&Nl(#L`O+qlIX}YPjX$0j1|Xb;|NGHF zyUu?XCl$r8CsD3S0)74DO)wDsbhy0g@fACLYu#dmS8kC~cHp5;4Xk zWQ@nhmRlf*2%Au)zSrzvAhZ_*hi}#Qaz7`07(v<~`lsRY2|pB2OwuBvoIP3`JEat- z@{f?M8@+Oz$G(Xvc%ej_v0d#0kfs_M3ilau?N5OK} zB+vam-%$!ip)5a_{ddLYDnxN@cE1}h(GYioQ> zL3g1a;J750p>Tu$y0qO8aU@|y-Q}+! zd=digLt!kke3zIe1x)p)F>xb4iQA>z1n)9>#^wir!tf z>Ob{c#6HQtqV|~e8p^D=N^@KZP9Y2hZlPKx&o-LZcW`C&Lr=Nff20~U*TBZn+6li( z#RMrqGDu_KI+MRx*s5OnfZv8ISN%$WDAg`g0w_1k{XEKeBt6Pqa`Qke3r7hko_I!% zGZxR?-c@{gD0veKT@1QDrAx7WDjMDJsE)kJ4XQhCk?ddIH`+0`bW$`LMW(GQE}&G4 zV#&gnt{@;qf;y*fH%VR$uch;{t6Q71fzmU8bbhDb&|yf`P}6qHWmBm^T_>x>PJ}@W zm2{$^UBe1pTe{g?^pP?;l=*b}ag#9bbF(c$Fsf>ji=yw%~n;6?8vMmjuF zp7$6DK95xDU2tq%!PN8_{|?98q%VGsl7C*P%JtjUf(A_T3^H)J!wUUv^sHyhTK7E8i=eX-Y9;GB72r_vk1(PN>Q~2B zR!sZ5y-{Zv0n(%=q+00)ahdB!>eZR{_nfh zWD?t`@1Z0_LLimI+RNv6m5U5AaXJqQb;ECn@xX@1A@_AUNwSomj>j?g^PWABF+7$@ zrL*2g2CGbycgh0zc}=z_N@lBe+t!Vq^P=1)K6te1d6U5rVKo7cP!|6gYy&_YzRP7w zckq8>cdO<+a_NrzW^@it;Y{ zyB{#TWe0I6`OE#M>?Z{szK^oQgV|M5xWf)bFODP zUa~<~pPpNF9li$?ts2L-(Joa}PTdXqOmhv9W&yQqR$RGj)s5hBYb5!7lRg8UTx;ko-W@Z?Pp&h-^;TR3~lE-BsLAix<;w$rIJ?`*GQnqpfh z>1ZF_&l~a3NO{>aacfHGYS~eH?uBu4l`&%m27&Xm`@a7@Sw(H2?vG`A<_P)ZXY?$|ikba{On?t?bofFldA_*wW6aESO2-XZ(kxFMZ0 zMMhH|oB}Q+LaR;DgU@=|zoR($p9}puf#p_KD0pDBKsQN&WvGyQx#n_c)+T+=V$l1| zu)hi@g^wO=HI#g$??jwL!Jw>WhA}S$Ek*zJ97;YpxSLGFp?$gN)H(yEKTf77ET=tJ zDN_&hEWvauI|B|Rkf!@c;2#+&f6{{)SH>A9jS*&DE5<>sYy&XCy&`AL8K1k@+CVSf z+Pa98qa&V>W|j(!kB(rr@tsN2%OiB<&SbwZl)6>r4INznneBG-){18VLZX0Z;;ZN_ z{5VF_J2qICaBDhYhEZkKWhAoTQy{s~Odd`l?!5-QT|9Ja6_BzoI@MJflBQB4%+b~9 zOR?z>+|c1WH=W&UR@ynpf^d@DsjBUnSmt__7)y$VnW|cyWCey-v9&zMqxS9fPSfft z^<8Nbp_mRDyKSlb)ddw8@}r=Iy|#BQUS&U@RXIdwBKOs*SFg2N8>=FgzHkE7ETvr6 zX0Nv}))ZFbcR$Fvr`xU8rmv4f4`Tfn!@)jFYK#rC+sSyf-?@)5- zZ4cW~1*pr=5|_&L+^xd!r)-J_Lp9cQZ7y`|!;Xi_XA$Akeq}5HFGO)n_%T8Owkr@i zEDSXWF}KtquvC>ao0eY(oSl6W&XoHgCzu*J0s=>u*|9$3>XmwPE$04XdK>8;9~+66?Om@tTiR*u^LC7M ziCai)R&wBQ^0&*fAKSeI!ZjG~N2FJ@(R7-1uUNLv?kCsy=t${6Xtoz`j!itbMG|Y2 z&;*NLw0n=EL6t0$?(ZQo&!daFM#MVFM}ddA#6F!Z{31Vm{JqWD0G$0?@SyO&C=HjoOTLky_pR z4mb(Rv|^YgKMFjM|IARZy_fOUdLN8y` z(_1_)nZDP%As+uA%C2Twekc|%>w5L$N@_uWr*;-Wy*@@w9HZ^Xdo5k3@3_0OVmEGhZ9ycW)ZeGQ?#AO`xi1$0yt~*W2q3O>Q zHe}b&A~l6TFlnZrR^4lgHVGL^N7C9lnoiUo;zZTW*9u&@ansrM zpOCyuNgA@NtB;CArf3wk8gw;Xu2INuVoZR|5spY*Gm9JGCaA5jJ^Np{b+X^-`1~yx zb4-G^FKn0@ymRZXU5d{*n?U^<_{FlGI}Iv3w{ z3z(l~R$K{eCuRyJSg0EA9eMDl>VJy0N%?muU)R<>-Q{})>SSD6T0<2EUE+~#)D$*S zAbvDnW^oR&W?Qiu;N)ftCVXu$ZCYA2F-P)5ns~3YFPHuK%P$mDc_E0Et{54gz0+I+H z*NZV7eNwA0;)J;b*0WEd;p7$V5#Hta4Y6c6pn#>Fw^w8Kob9zY3ia)L0M;BS7qN|P zb=mWqJfnRJ0d9+wb$d99q-QJxnuAvErRisn%Ao}IF>C#@GV|j}Hgll` z1bYH3V_&PaGgy+Gkj`wa*&f_t($mM*;5H>(w6vdXja=Bz0BYXFP9UJ0=YbP_i+xh7 zB5wHF(t4fJ*hOv17G9`r?}dkDR)^>`4Si2#(8U@}9Dg$>|X^9l#j;=dz7x1crtk@=Jbp$dN{`DSN(=5J4JRns61 z)4^skhXX&Qw8Esn5Ks7dMCIgvq~iuJ|Eytk;P|f;x543v3*7eoHUxFBP|1qCp}(8N zpUftoecvN>Js^Wh@6N2|`pUtSd)laV9h0|7^abdtY`xu_&hI22(K;pThZ6~$M{w+| zC6~>e-L56hf~mvylOyG`o&mm2iLDhBB|Dhw3l=NqXCe7XuVicD545G-R{DXq#Yiqi z_Ay!=7!N;4BPV?i>axG*vNR!u9`mxbr_lmPE$NsaO}xlPXUA&*u!xxMbJjdj(Vm!Z zCa#%3L$v_Q(`@t1IbZ_TDxrcxq)N3VBW7EYwJlR%M=-_(6;ln zIG$Ci_fwt=C7n6`@EB&))HXx)>nOQ~|EQ(e6lMpfXXsJAOjqR+s%KuYlDfU3$yo2) z#HgkIP%!bs#_phJ@Q8ZYwyq?80D!>hEw) z^4F*(H<#6iLNR(^_o}#Tqz|pw+4hdE`DsA? zeNps0B?eD7>y5?wPMx{}Bk|-(baGCzh)yBnzaI_Bw*Q@c6O%|7z;;>620_s32h!)$ z)tmIU!W`;XR~OTvNhG+jE1B@koRRq~q$AsmEMSOn4l*ZsPneAOM&>jm|Ep{ca?c>X zZ+B<#1TJ6NmiExcF?D`1EYcso}`uq@ymG-e*ARrto$B|SB;eG%x>56DG0ld>0W~ zI6qYm6=k^~`Y%v(rBY`>WYZPlTCbXs`l@2b$_|=|N~? z5LvR3+!>3hL8EEiiB^i(X_jawju}-KF(iPoSzF$JPN_f7LAGz?u5)S!>(uL*(|tsO z=k~`Jm77$hET9X=ky5&=DMi2PU|tA{nMwi5bHJ8jr-0T<+xotG`og&-6D#Q@)6&%* ziB~`1%4tsXbZvcm9o#f6{>vCgGV~*>)VJ$v#D;V|_F>B_VzI8Sp3Th?TFJo`sv)h`xnBBf#Fg6Ft8K4-;M!gmD?A-m3w|t4 zFS`->earn#ct`J^1;7^_@7b}dtF!)uG3d)m!WJ>IIZ1aJuU^*0o z7Kydv-I;)qOHmVeO}P$-)Gy(`;2WlyHzSLnK)a~VGpdrJ_8P&9z^voK_5S8`n26#b z4Uu2D8pg*y?D*oo8gJQGsFn~aBOWS5*y|D)3YF+a<))K|o;Jm<8ofsy`s)}w& zWXjRrn-)CnLtp(!=)h_4Z<*Am=H}?-Mngr8cwM!Ed(zNjz&4pJ=z~#ma9!>rlwTUz zH$_5#hE5Np#-%Yq?S@RaQuWIDCW>A)zV|(aqBGee9x2q!qqrV9?gdbi> zW3GBhU1jQm#kpasHx0LAZgZGaS;n@=K+xk@6{-G}>scR5x!(J6ghiRsfmnN_dg^`O z&*)2yhKskQ7#Z+Q)y&6`nA|K6-On@x^}!oH*4b$7^g(u|Ie2fCns1_bTyL>kGek{x znk(E@epccWxtA{ZC6Z&Dc=FW`&+I65#>xOSTlq;;RfZ2GZQT~G0S7<_Z-P7s z&V&2K!F_AjyrLA{dL6Twd`R5PVTxsCR0j?joQj`aZ%YT~t*25nZNaT*jv-b)Otpa7 z=#fs)Iydj&79noh8wYA%zDQ|LxszvIYL2$7?k?{qGHMP6KTx`fWqlxUVs62`^I}w) zd>8IPh1QRl)v8Mh>OsdqY&rjrw}6Wx)2=%F z?kNIpaWW_43FdToz&hLhP;4xlX;$=!3%}1pMW7xZ+O0Q80YK0`Pz5y-Fu1ici&?)+ z$2H;#=U)xj2Eq-pl{g3Y>H^j>7sNoQf$4(?^mW%jerfJ6ydJKt6aLkE``*ya8Dejr z%>pRGxL)GF?XW_Xk!#hS8=+n6dn0N~9@g2Z6vk_+fSY3PL5mrX0pw6}G(XMVv?rw( zz!dMcMkkZ89nNwlX5YOfqTI5JTwOiwHx*Xx`g+GIOvohGOHT$NyaBUJO1rTXdh$-H zlXzxRX(NPx98_s52&hz;3S9cm?R6&ZbU_*7sV>vV%~Pwn*@SZfT>Zv6}S8zD@fl355TWeb~{!y@xIu5QXJO6*M}8|CfdVHGX6S< zW5T`K8gJg?mLey&YZQ((l7z<^W;5l}*&n~ym0xjJz88lKC!4XhHb8XCdNutrRc(+4 z-ASZ(({q@HF*fVlva~o;@T#BIDtL%IYNU(f_5H-x>x1$2s{_H4q-u_uNx&GDE;~Zc2Ee)L0n+4^5JrlX)2`-Og8)u+PgaFE_Di8L@$hV5(ch z=xcirbzbH-bcgDB=#uuCT|%5BUk;vJ+kcHqOPE|=*f^Y=epbr@9i^+N&7Veg+h~Gl zz@@lm_2AujI}{{{mRwT zmoV^dTihy8Znc_A{YIRQC$Lgh1iB&1 zdPssIp|^@5qrK-z&t_e*nEbaU!+o`WDYg%EORSmgnDaHt#AdLIIxc+46RvKZD3k3C zmm@4pZJG_(4g-LZe8-u=Gis!plxn&dqQTzGh8?+p(q^v|<@SKmi@9>@hbmXQcO-@D zbZevtVvzq{6IxTQA3M>)oap1PgD0ca zW8=uR@({5O?z3uXmZi%;tPiX$PgFEoSdID2L1FIW~AvQI;q+_vhiU z`oWIp-j-@v=@w#^FCdnBQ_#+O^WYX9`)s6w05XDtH{@0Veh^3oFDkdZ|K)BhTL6eF z8=4P_168C|BO>p$lwfI=rJ)@iKQ~}f+_zTC~1%gid5YIjRX2_0ASQrxf!crWgHb@e1?y!swMfP>vMJ&xdL*V>1bi`_B> zg;*|aL){{iD5R}@6Sn;nUke6Trvj>f-XZE~3D$;Bj;;&L|87_jdPU6*vCM>9AXML zLaCI5ZBsPm#88p!_Ow%x=WymuYlFQn;A(CPQETb9nCd+&VCpY^SCaS-FWu}Fxbl)syD2029LpmhJ;tVIiPa8KJ! zIf&|%Q&rTn?MP>l%918TBpaZHzh%PxyLV24ABE%u}arg~_T?K*!?(tM^qCL|YA&yB`t~YQUMx{m9(yca zaC|cdqI+W|a+p=%Gvj>%2b*qJ%2+#WYo_^H^pE0I*2oJiR3d}84iIjUAi%cb>zsRt zDa4QJs8dJ0=oJ=Q;F*CSP#nyOdgGQ~+}$S2JUF7Tbd2hEUGoE#r?@_#3vNZ* zcICtl`0H71q0KUx8CbO3rLTlj)GaT71ju0>CP)VthMe~3;>;qbS_J?&I5~5zU-zp! zw~j-Y2GtTv(U0)q^T+8gi)@j4ALXy_@4jWL`znX432Du&FRVi_-P&!N-bxZBw2afP zMOetwHrZNPf4|p*S-c0wuD%Xv=>ZaOouvZKU3oL+jv5}9v1JgWT!43 zN_v1CkLRZ@sc8>x(Th@HLEue)%^ZSBoiF>)gKnbtdxlU%=)HGN7Tc)n9#FGKmIbV5 zvEr~k;uLPnwFkxQ%@%dhVO~LpN>3d=Unf<*@P=q=pr6n@>57D4I0fo;NK1hd(x_a4 zAim1}IB#q>2z}em9|e&ST~JLFbHDknOXvA8*dwtIsx@9fgY@Xn!9nACL6`AcEYe zWW6p(HOFn3e1zH(cL4_?Q?2XdC$mens|@GFmcR=@;#ZG4{(<0fJq|=_x=Njg4#a2H zv8N%c+v{Ub|DgQM{_JT;n`MAs;86EtQ17EI`9mX>GV0;dttZCeo4HIAK|dUqt0#SG z{3NHJilV7ATd098XMQRF0-kEjF;sEn{z#(i*-#Yij_g}bDwpr5aspohUku6XK;qIm zZZ*{p?9RQX`o!Z`(YP&}yBS8wrPx1^5@gM#{PXIJz`enR z8n$2cEqzC=_G)!%w*#Asl!b}O(3IoYj@Bl9Bc*1z#~DvMmDY;F!ZOuhOzjy{LWVR= zak3m{?!-M;@Tzt?Q#zj70?*@tf6r4GRFf;7-E_MbyeO3T%t~L8xFO6Ylb$7=di|VD zgmk?q@KH>g)0fXqHSpj}ms+T}btqXjVZw??iQz`lmNGMMtDhxRW0yi_FkW^ilouO7!ur zF)p9Qjo^Y)<6d&%D50FrOb0G!#ZzkvjGvXha!u)&Fix-S%N)=Gs8K0%aR zXFC+2dirVK>qX7_MihO52^=1Z{+zVk`9+RzD6pwBV;-$9ny)EkdCKwBHF?*Wi$U(H zOv<;u=OHv=1w7p8e0n7Q$WpT%G{vC&PG{bC%5(euz9{tr9DjC%`HaKE zP^$H_Biv51E2eZQeZ_SgaE7Cfs3r!Rihr>2o@ ziTSkkdn-oP-23{xj6T{|tR?B;r4kNIiV05`De< zw4GVT6LLZI_`Da;E^_nFbEVl@7u#foN~E*mMW*%YGOS)}?%Zy|qDg)Vu0?H!T9(Af z>$zNA{Il9k4dV~uJo?Mdatp?TlkDJRU6Mu@rBq=+zjsoNA$8=7_ko%0Lv*3{Hi;d_ zeJr79wqC z7<*M5de!I6t6~1yT5MjgqwW*xZIOVjNvQb0UEEz?!x_`MM!K?8gqi?eUh?^sZj@c3 zTATY88OncLRa|jxo^Jm?^whYtoK*WLNuJb}o1GV~N1y(8-h)A|^H7>-*RPc2(nfow zP#DfOz~#`RNP+Z&GqNZ>yS{<^+iXz0=O5@j$h6n(v7+GAm+h#w$ZJc3xk(&=3%@tM zU#q)lNddiu_8WwsDm@9RZ?Z$+FX5bLr^B;b&9$j#+==O*|*2J&3nhlb+fWFs~U-r-v# z(f6}FbfL3$>YO5dCi@5aJrS-{*c&$7l(s-Aw@({?;FVm4?t`Ont{Y8~Ub#^5XfoBo zl+#atI1&?TDHYIszaD_fF}o#!TB^e*hvI4fjblNh=!b2qDQ%8 z{P!axhBKAuC-;mvN)B(#W@zK5SvLQ$jlGv)e0;gpdWLEjQSz5dezQfsc3Su-3s&t$ zC>1V24Fm)$E^20BL+s2R7XzS*lP{zn3Z>WGO9&m{&Se3z(l2NEWWj>MluMRd@g1RD z0MSY%>t=b5g|`|Q##zEGcY`TG**FKwwB$yH#_02~IIdtY%6c21H*j)49Ie@@?qQwF zCRWRioVzg^<7pSRKps_JG-3~Y}L() z#=7#QchH?Q7wu1Q!vr*pY%qHX%wCK-$bRG+L~|~tfhJ4TK*eM|T8gg}pJmO5B9ay` zYJ=u4TzEE#9w^1j`6pS^Lrk=^&n$cAg2*!OZ_dtM(2y)!peFT2-G$rPJEMRY2(ogc; z!U4I2%aWyz?@{6LH`sBTucEfFbBhfi(wAq_faY6L{|)Z}=W}2#Dzz}upEUQLyNxSc=jQsh z8!6UERUGCqhx-?AXr#-F!B3XR6A2m@Y%*Y-hZx62ArF|Wk1ZxfCy>Q$BnqWsM|11e zgbcCdH?4T^hmt?LX!+(vLctt4-*w{{-8S5B=Ik-SL^&G&a&)wm7R-emCUhwa3e0%z zX$T_r4VS%|m=Y0eQ?EK_WfPK(nUL#@wK4*4Co0w=YcCGKHxX-4hdN7e_2OM^?9A3B zX6qv**&Bc@H_ zav5`-*y(eaQXunX&>>3g=qVwt@d2q?QJbd~D<~>!dc1+<1-%cn|EI zXe9aD^Jyw^r#;{dbSo74zNT=s)pPYbq5Uegdt48vsU_5jO3BBv&sAQi@RhY$t`%%_T z>GpyYtYGOXj}S?0G)9yCvlzoi|JIFEi0^ z{*paEd2@H`<#~UTEZM~SEFUk&?;7x-wdtThnfD$Fg!3q4V&_Ap_*1zaPx5m z9|kOL-i{JmHt!iFu6vZYnL~-|Jv)aQNz1b-<|!HJV_~{>*^hu85fkzM!1$Qu>W?;s z5Z6o5hwgcH6(`-2cr|6gcY7yyKCSl9kv|?4Yl=B=3wFhgg`8;I_T< z;Zmkrd-p65@ZnNkH9p;=SDQAO|D&8pQmRDJ$9o1>c3W5IXG!%|J4s%(sHxb+phRS@ zQ4~*!;YDV_1LG5=_|<2YK|SZ{+w&fUp1}<+*PeNPqLfrat5WhOag@9eSGfFt&dlt8 zhCW@2_>XBumFTmApwE?}&-F}q?$Q=c>>D_XTjJUQics$Pq)7*^B5}4Pz!i~*R4#$w zA+?K(?mQC5IA*U6QgTjuQKjACD52kL*-C*T$h<2!nRXj}-j?!(@#wEIA;F_1mzCV` z6Xx%m{Bdy`YzOZK(D7GLUrg%p8K<(Cq9w@$1Of%9IBn0d1j!JDEKGle_oyGRP4p%* zj=nf}T2mUAaD!I6QM~&TK2vjk`;b@H8!Ko&au1^~>G-}N}K19sI%quaAUkxftn$19yRl~%14ThzhB-I;F4MB;R@&sgCU zWTRDUE-5;Qqplu8+7b^r*}@JbxjE#Uvs~WSW=@gF!uy1G;8|9e&8&eRWU7Kys*Ana zTq-)dlRTW9NS`=4u(lX%x;j1AYB>3bfj3N?j=>9z?6Nci*JO+7)J_!mHx?L;lwXRy zea756@tT(-vF-p?Jp@6^70qAD*zc>289MK(mqD}j&D~8nG|W73E!Xzm8|T7ZraDdP zx}96!dLi_#?OipQPmeu@ZME(3QL8uS65|8vrdq$*d?;3Ufkn(rlj@V~-c)UK>1N<;WW> z)L(|L+D$=&Mc8Vu-DjG#|8hn_|ILOw>*xqvw+r%C6Q<4Wyn%Y1h&uzqT&@CX-wDj) z)J_NWP`kd2Wmg2B%>0-AQ!Gk#_0+Z(HK4&(?O43$uIFf1R8H=MkG3+dGoy?(MKNBq zfRlx-#-%Off@btU^6D9KusD%^iwo1S26lA2)}%J)uMDm@O7a~24rT#2&m7yVX*v+g z+d4cSlX2JSk=2MV0FZ&^ojeB<{ciHj^o7YNR-+HbTuhE6gq@qfK8jSSuS`W&W2<~m zc0*F^SxLT}zR6`fHX{T#Dlq1o5dUnixpjLgqJQ!VkokHhikgL`kACwHnPvAh} z>p-xFXIrjthYA+O5uw%)Ti0B3RW^Gr=c_c~!8aUV7iN=%5<{xd; zL;dLbBbnWI$?)r?GHi}`86DsRS%;)ip7WaJ#pVu?RUOsIvuL?C#sBOT;l=UK;76f= ze88`t#p#PEF7Rhov>|*C@A(a5L;h|y`WAl-eY+I#pZLu0$I*A~ukV*;qwkl>!OAnf z*4`sS`y`6><-P5uRe_5Z;|X(op1m4HKgcmpNC;f!UOr}Q#-nGalBbSbK-XP5`P!B9 zEfmD9HOrZuf~J&B$zPlY=+k!@39O!3G%TC)IVn%kVAAk8jSE>Ib0aA4Wf7>2pKsBm z1BdekI_HTa2Dwoz!9+njGRX`bM+K|%aLo4ssspDL0BQqac^axhObDbKcRCkVYew{R z2phGQ?3f?8rxx63x0AsS;)faQPlVf6W4k_mQC4_|wUgw0T!|}{vy6uTF|!0n08LBE z3xWYJkpIR?9ez1Ej~%Yj+^FxlzoT($hxt94^&g^?p@!StzC473LeI3$x@q~2oV!X% z(;GW0$62xUcbU%#0-|?Tg86d2+4)H+-tb~3{nP8em_K$G^XEBr-OokEejNRx)IS`e0{^f!`=Z7Ax1Zat!}rT;@>iv(6m6m> zjedna9j)1~N~yEt`sPY&3-8xv!($!y*?By5TkV%GiYG3gU1~PlXBwyAzI6*7Zo6z* zJV@i!E3C&o&gbmcufMa`d~d(Wo%L^Y)~}VKcr-0AoE}y$J}wa# zW}GY701jsr7dz)Ug`{2G-n~YyE8_vqX6yphO4>WuNH7Gqv79|tnG*N>zVnBNNAJ~h zV|3JAk_SdJ@-;fj29!yh5JeC0=McXi)T7cvqvO#-_dG-&J?_KVku(T6UBmHw&)I?J z@YqJu*=p==DpaRjbTqEQ5W*JK<$@gag>v1b@U`U&Nuoza<8NkN==$w;^1i^_7T-nc z$_W@#7#qEfN{E%>DmqdG=1g^smR^O!^D~jn^w7-Gl6C~cj&l60+~BntL#|g zi)a(qDBnD$UOGod{cXA$`~cr=$wQa>-I1Ss?jN4y;VPFZmkC0DGcp_FIHKJ@a2d=li|e=|HrK_qv9 zYuVdH6d{yCCTRMcFWrH!z+az-!^r8ce5a-y=~!dbcCOIJw5P47Wp5Zxf_N{_>YG#N zTVY__05C=Lb{R|&FEn>rOtqAJ#<|B(K_oaz-QpG62k7I$~1_{Swsgo>$osb<{=!ZTVrHC!bd;5R|QoB|BF8 z$`bmccFP8k?p>Z>f(9g)vU4S?ugTaTT_T>`atCv-rMv?nG)Px%XHPResx5jz33rL9 zK9GD&D#K=@_ms9v^5^3^gbZIyDs# z>(~`s^9L%FE$Wpa|*iYLo z9QAitpm&l*>HR;oI)YjCB6qAI{ELmxt#uuC1ss5m8kjM^@usxeVY{Tv#&Lg(32s~m zoL|NXh4Ytxd9ybEVw;*bmq?z5L5Q=8em@EBo@C48sWWKR<^vVO?M=Ibdiqr!nI$T- zaJU_0acW|MvwU!(hx)Z83=dOBXgmLc(P&_nav;KRe~>J@N50}kz;t+*yOL@ogyuO3|?Qpmp%yLj{MDloB}yF{6M}2J>!X4kafbnU;T& zyKI{`n~tLWhHPaT4~K2>1D2}uw8xKW&H!%3VIbY+@AbA`l?3bW(h4*ik5<8ir|RvE zJ;+oX>z=!^9u~|elqdpf(2kI|K?S^PO)wx&Xo;908?*krW%s3ag5Gq;!g0&dO<_lT z00QOKgWF_$wqbE`FO)qYN!oAf4b_{GCEZOkr zjtI(G7}=>dao#>fCy{*0?8^3~M2pnAEW<_GMe4h(0XqnIAIXnsPB*aIN;x0KtSxzF z&b~Nh{?OdoL&<0Qe;KGrU_7T_*@DwvlKg%CBeSd6q2?T!HoX(mH5cn#!!y@y(NcX+ zj!EDPQ^P3pgYy}}iO9zPSkpbN%L;K87pk=KuzaB;#{3_Tv$1gbR{0a zSeMib>c#aPgociyMv(k0`7SixiEHMVFJ2^L{&QP{e6k)Kf#eEjlCh4;@tnVtd{2DO zex2PCw+`t%(^Gn-!BcIzaUJ!z>!hNcJXiv9Pl9Wg)gt;dBH#h^{R8j&(W)R`dSvUQfylhHp?}Q_U`#C`}pPm z>1bDg#}uOciu1mjK*-)i{l>AOsdU*TK0KOtRL9;?k%kJhg--x6?i|%eOT`>-)g`0; z&IgAWI_HElhZD}nN7FF8u%CTFX>2=>%iNCRrWR;Plz2&{*~VkVQw!a*AYTMUpBHnJ zPomv(hr)e?KwguOiyNFYTl|j+c&X4tUO4bseM2DlY6^nRI>S?1o2cbd^x@i=Azj-- zr&~KzIu#3>k!nfOnI)*v3=QW|j>GHJEO<={C0==|$s+t$Jd*+^t0HpNSJa~g(wn;8 zsimSU$lA>u3Y{dcxJ_fZPO;}RNCX>GExA+lIQsL^@@lGd2o?cp zsX%^tL&{jj!eyLWw=QCG32$&am7-B);v|j{beKe+9*w`_f6V*y#$qOCN#{|EAuV)~ zH=;y&n@19TX*B+upy}GWk#*$t3W{~e^@$CJ{B?I*XP9HoVw6|t$CdtzBh$A!Ip#0=$a3#E7QYgYXRbQm9*sW{XBOIv z&R53|PYk3?cbiQ&I4p(@JzdqvFbz&KL0~FB_ok2J_=&DDr_H@5aAak8YQKso`u=GA zXWj*vpkRgLXOW5N5F`&ga6|m#r3lJLx z@w1-GUpd*_f>7xWePsy$B46`Q8$9pe8xDBVX`z6jY`aO0nd-n+2<;NAes?quStR;_ zZ4{p%`RckH48j)&h4&Z(J;_(0UOyO(@1!@xJ@VJoPnY>Rx3Zs-J>Tvk>t5elF`+EP ze#c|n*7oL)M&pn8&Zfd`?z*f;xoqDZc;FNMmJX8mOMMj9y=h{&&3S2>ZR{4OzYFt( zAo7DkyC3$p`=M+1!+{f?TlD+rHZ3WNDGCrbLeu4tWd2{ob3$lt5T$U|?^!`kihfj> z+)sKZ_Y*fc{X-b>E74EynZx`i&td*N$6@}H>ux;yIe!fC>lga>SECXCG0v0mYopO? z1NURnA$R;bOBu7C5*3OuVAQr$>ofoLk3>~*xg`$^nFdg31H=vhL$=Hw@Xj;zbEp_m zBZgG5xtlbf-U@Uscr)Z)&EaOFefRlgb8nV7il>|BJO89Yao~;I zgD6_OxYJbiy{xNBJa&x`r>$Hwb3M)fuHY25oqsUywk!WAnj+GD9VHFMai(|Oc<|qh z#yHcGqU4OSl~?bq5OYSDO4sAPeve7H^qX$YSU&Yh)-SrT_()t{X9)fv&0sk?d?fYq zPC1;u63%Q4Q zx3IG^Jy{Hz4OyFdUez=#=pKdCtD1|U=isa0Cx$u8qV8v5WV5AW>iJ*#B8)_6yJ_h% z^FYScY7#as_h<*-z?u@KDWr6{wb;T6Bw3MFX~i(rdLbQKCV15wx5U(FaWbm8-9wH* zY3Sx?_O`IToCBmI!L_MNTwmwLja4X)7l;`S$K#DWmXTE^mf#xZO$9qFF+EaNqyXA3 zd37}TYi&g6kPT5cY3^CqgTX?pT|>VfAm@lPr-bkNOvFhWTQU-AZ{%TO@yw2DAWvAP zxZDW{HxgZ(+xhg!)5z*tuPavhe=k?8(d@=jTz97_N7TZNHT&$?S&Wajh-;P5h2iJS zCbd|gHQ&);faRT6nRmM}FCFCSo7|J#4d;T%k#Drv(uT~KoN>#FoJx$~Qr}T8_Eq5n zYsMELZcDA5r;WF|ajE}VpL$mtKfM3Ub*Q6M8nT?;SlJO|v#Tws!!sSO$BSX*X3yP8 zr{gb)>NvWcVK$fbm3M2(f0sB>+m@m40?NpJ`yOQMW6y2hce(R{Bb6)YeqOFOT05b5 z3h8qWW|mqz0;@KZ_;z%tRClNw3SoK!XVdkH zrEN3`AUxU1l_H~~90|Ccl5b6xP%}XgyYDJYlR$~ zL6od-q&qOZhSNnDbqD~2g?3|C(0^9h-iT6jlCwEycEIjm5XjZNn_qw&siw$(;AZCa zrS~0n9z1fd!Aw6HO053DLr1b;riWk;hJG>>J$xihai(?YP;*JqN-xY{PAk1|+#-99 zq`66b(>`cPT!eO%j=)AA$?u|5hk~620=|dZ^1_akR_==+_9%|!F+oh<6Oboh_Xn%O zY>xPMymE!3!nCz>bC*(%p1J_*JhXfkaxJb=3XR%IqE?&DHk{uL=enXlvR;5ve7S|L zlr19dpf>4JJId{MC^;OvUl_jhHFVk1p<<91Ir4Tt^$?O6h7Cvus;!3AoBavJ!gJTn z9HY4Ue^{UjG}q~lQ9|7kP^+wjB(d;F)^BLqUq=a2%$yhcU6TKRG7CKrXXQ=O`KU-s zSTw6xv)F38i>cp%4IY@X?pXUUzO%*E9?gJd7guxAF!lmV60#Kvfs?E%xssYQg|uZl z-7%l+`|U&d*pbu@40NDx+woy|1cL=YxEnZ1|2^2GTh;FMg>tluiI7TKuIPMk=xQJ>M58ukB9nnBn8{@=bI7SSMZ#d0twJ{bd437|xl99mc)k@@ z3V}V1_!2IcAA0^Gs*RWTQV>TrT6B-9>BXtdrLW&lI)yE~<4&Ycoa~tL0_k(ao{%If z*Hh68V^q}$Lmur+gs9DWEb6l;9Z4>$nTt=%i5j(8e+>Q*-;r#j$PB9CQ33hLbm*zS zUJ6kiqMd%mCAH8L$MZNr)zM%H(F;AadbOy5G;XD91-m z9bDX~b>t8z4r(T^$$5oyZ)68yWX1eKi4XH%rJzx}oc4;BrO>O-&hcRKug*opTx42n z7!Yw}yXi`iAx>-25Y0}9B*L(kqRJZMg8>8IcfRd;LyDJ}2w4?&2cP#Z#{OLno`qr`(+ZN%AYA*YTfLrT#Wru`C zpFR|4U7%p&1Es#n_Y_4}g|}Wh64h;`O;*~x=asJem2T!%y56(CbrM8S=_Wzl-U0 za4`h&Q77>fbCYR9*O6V?St=zdrGg)!ZgyCgQs0}9RY2K0c8>mgUnE%wUSN&-2Q01;AQrk>uY4qlSWR8HZ;((^qPcs(1FfbW4ZH&LZ9r-A`IM$O4T(I&RRw zsA7{=8;X1($Kjx^`r+g$y|oTpH#=Hb*xLqF1$H{yXez8Lz>x4IT0UTu*aXkoX#0|rWQ>p->VL}R7DfR61|r$pzE z`Xn5=%NjUEG{yjk`wQ9qrXQEtZo2p={4kj_#ejvk0d{~v_3S?m7Py9s$(b!u9gkJ z1bd5l!NVYBj@mGn$KvM{vM5}bB33!>It4s9WzWm~(nmCbC4V^uCc>oB3%D!>>t-ED zZyVtlkHpgRhwEocHbu&`)mVlj+vN7I~{L8}N$#3C4AGV?}_q0>VtxmxVVU?z(?3l<+&nbI7 zvqWCX#8~75IN0%*!s5CFC?L~R%r37UaUm9nPa0!OjSJK%JFL^y1WwsKx$nsQqZtmD zerJb!JuXzavsYkrGW=b{>tyW^6~f*kH^e;l?RD?(mPqGep@m9NQ$6t>||G`?Vw!(>CKw${_eR~)jHQ_5f zSOUrX3M2e^K5@^Kt~XKGpJ#+Fg&ij$xMb)d5@!0h5x#)xOjU@u$Eu7;bl)}_wA;rhtM=t4I_WI0|!Xj75^keRro`z z1@Zp{rKf>v1$Aj?hwhZb%OU-lN+As=XM>r=PXV1yE#&)jP!WxkHWoq`$ep5fEG+Qy z|GJ!_dLdTV4XC`e>o|y=waDnVAiz z*?8Cg&))mM*?E=so$o7OStDtbj6rVXL~O5#Tt;;CGB$D|giJKj$jk)&88jnf2fK4e zGgq36=O6dZNE&K3W)~W}FPJx?0uNN zY^>akXW`cNzCs*UheY-Iy8#}&6#+ygRy9r}1 z>*oHsbJy##>^(brH(u2Bia_rKeiGK~n5`6oqVI<+bC;kmXxs|yZ0$L=Qy_Zrq-HTw z&ARfAf`1VW;j5Lc6nu!{5b8%6p?*OZCPQR@YQ$?39q^4;jKMr*=`B}EQvViYV$VI2 za&I4`U57tQmqd}MrMkgZLu1|cKCX#A_qRE{Z%5BS*k{YFrOw_nu*iwlQeP>v=IGCq<{?_Cpg~WW}VGK3-dmK`3!fu5SFFEI+Gj>G0Zc2 z|BiIQr@H7Oxp*Y+={_E_Yd9X`jnS_nUtbNE&l7b=W8>zBsVQg*(194*U&D9g^T z?a1FLP6X2)_rS|eRaP&*Qs{Drt0|gqspSVxgaR4kYQWzp>)*<9^X6^&k@(YbZ_2V? zd)5-{JHpM=Z>yDY2_L#<3}`ar3sXyI_RAFvV8v4IKYD=Fz;^zT9Rw8bQO--d^U)po zu&Q8IUyu>Yy*V4*!<6y4u4Wxr?a4kWJ21~5f7TQI#18kG{&vNv{R!*%Ew#SB?6=i1 z&!5`SdrhmqM-pOl#^ZWe&R7Ow6RD&g=_LQ?b=dUQv&fCy$b;PIIN1pV_L1xIiL+Ce zV?RgYAK;Gtiy0kuR}o{f&s^(7s@jQ#wH>0`BDaNevkIPnD>zk7kATD z4|Ck)eWaxrQCZ_o7&>*MQ~d(5fym}qaL_{P8ZDS*i!uK`s4_8fZ)@$n;mu-Qds z!aA6Z3f>+=KTdiFl15ghXWc%7a`dD|?-&XywMkT@QI+!D7&FfYAv*BLnd!^2b=t~s zV;na1cb+-^8vhhD%#`Snq`7c# z4tZ5KQ*gkCwnsb{`BMcCJ+B{pnnArdbSLfS$)5?1&7HNALgaR&C0j-VDaxV^bF+h&_29rOIbEAFogM$!z*__C>Mt zf$U2gjJ2WcSL4c&&T=jL%8q=W{<5`z*?oA3ySs>OjM}{ znV5$UBV3(ZP{kB@7M9R&Y%D(vOUn~L=P7p4oSf(C%Qa*4a>->Mmt5{~Y2sTu@buj~JGraHCwR@d>XMV4SIje^wYc{${nJqUzP$SrYS7gf|ru~mM2b&_`5u!*3 zn98KSf1;K@5VPt+UXZOt@->oEm-pgF_}-5ENO&>4#}5M@vowiGx%vGa`4i!Vax{-} zI?KJ0z)l-purztyUum*aJz1H(v7j}*};VW?Dr#fCWG;G9oK01YvqO@-OYCNHN3e= zpV{`!@lfaN783kAVlPP`BGGUaBGRPv$hx}VUVWjcs8_yF&`&5Atj;Bp zq9YwKR4SauoX?2Zx>+(2JHW7sFL~z%Mhpo*Pjm^ap^#pbieOwS_QD zySi((j%QNS#PEr&S5xLYGw&9|t`efg&CZ~{4^hN?TkRC_17y$z(O$`UcK@b?dIfOl z#RUr`h;E`dNA*1;FB%r6kle$KKe(qbBo2pQnPZSHM1TU8_3U<=UI<=I)HUDaGB))& zAFF5bjV2H(&A*P?If|)Ci3qmF*{3J?Bn1+g8nVzN`!KALIw#$jTIiXKh89Z4D=Kcc@4lW+qlfiYhGziV`GC4_(Ch^QeRV@ zr*prNmau79^7{qIM_5#RYqq23zI@2HU@YANZeQCN1ALRE4j&#S(Z=6y+^3CY(Ke~m zgf*czP#;T!`u(KuKc`P=kfNUwRa%0|{!thoR|9~0x#Y>z{G)3?eWklKn4h4xR}mTB zY@Z?XJ5GRDkUR1dkTAkjlP)(yd@Q^g2w&_^m9XF!X0%yL?8Utx zqf`jaiijw_icj>$;4{$@5fBSOu)(96QdunBQn@x0Hd*>S`T(5956cx$jsQ1JSfXtz zqEs0n`us#s8a&RRe5IHv`*qqP(9txO87>Fj&WVwHk>?e}6UqitU)1?ORz9SABUnk= z)#-WoOi{s1sVbG|=jvd;MF5!r$E3KOldiFr6420EmmX%p0Sh{deMO3sDtcxjcsZNw zCJXKI_d$<15tHHBlDT1091_@o=^^%p2EUv{# z9UmvI;9{!~*9&T-joGBxdHf{d1%q6mJ@F?kJHiJNN1S{RQ~YFp&J9KTpHVn+&^Qfjs&+}VAd`I7>QK)LCs#F6m^SLAhW-I;%(R2Gi(S4|t;Mj=XP z%4i@L$9U@vO%&?Aq&e!k_1kxPI2|y`PgUBK#B1~lT*EcRnwjE|s7Z=}Qw=Wjk4-S% zMqhi#)5?OlrA`i))yj*nN=xz5e1tAC*Xvj5L=b_jd&Z%c~Q6TGiIaqMF2PJmQndW4N9T_c|BWjf|U{da-uAlDK zPb*8ZRe4n}w}QqmC)WL3?f2fwuXx5flgk;Qtr8ztXf*U)HU510WTN~n{gIZggu((m=<{w5!>uElad@3nsc3qkhgce zj4f6Rxar#`?QIpb0J%W{s`#?=yX|+*<GGngc&v4_UKZi?Ob2vgkbWqyW0s^D#e;v=qi68`Ng_{Ca&=!B`F1XYLC zo3I^%FAzkax2A$$UBS%xQFRbtl5;#Q%t+-2g$@zD77^6Ah-Y_c5+T&7^Fmu^?85Zg z9K(FZcKBo{ePe|MHUVQcfN%}3j)lSpqF*Y9-9M#0A3?Lt8aBfspD6RRX8L~a}qIe0RbcZF#Cokh@S2Kb@Fm+W_dPF`luI9NyXdJw~e-S zd8vJ2a(;1UWsZT(&XrymTe@@sVslwV#o-WTXJRZ|en`I(j3Z3rA?eH4;NZbvC5m_y zl|@dq5%Nr1i>)!m$`G=a4`i10|m8@Uc@u#tmDuSL?r@%d>M=KPLBC5gd`&?2wm|vi)?d zwQOnXXU#)etDPo=miwR2hvuzY^RbOyhq)(h&Qcs|r?c#yYlUD5ONXCpL8q$@LHd3^ zXmHf?KCzUcZTY_A{5R~JK1DD#x8k6Tos7^x0yCza>2_-gBh)QhbLvEeAuu9^<|89) zT&yHkNXxm2l}Fx=EfG9OPS(}${CP&nZ6`bD2PLlSu*1A?^|wy?R)I2fZg41bLttMH zR`R3v{mdk$$!hb#c!nA?Jh3hBf2FvhPcpmj>U3Q$=6af5egw_MY$O=aRw$n|jXn)= zw-9RTnZf5(;&ZrdG#nHOWNTkEyjRS71vmCcrc;nkz}_*b&rhCU42liwg(r2#YCaszWqv zF;H>ejU#~~@jqVO0crP{5u(g@!4mU^W^purigoK};O#14^>PB#JoGKF1xA(ioH^eJZ!iNPHM+aI9|0UZc7X#BTVFAtECo5dP>i#TZ_s$PLWA zY*;R45`{r^%`0arRgSiCc~<<~-;RBl4AeM$Hd9Oq_;_#jZhk1jbmXYUrx=C z0^(Rit1V4&R4U^z>J298lT&Sq2=1yqrZx`)tQr&Ji3c$w>c|XPj3xWYag?WXu2WzX z$G}KJeK@%lWEqVt#SzX`{g{UP;aUT55sZM2Z#X`em9;5Q<`Qbr#77svI@{~GSJ9-N zNVz<=Zm7T7X>364V-?zrR8e80H`Lx8NyWHqpftWUUf|hRVphe;t|SguW3YTbT5YcP zQ=albyv}<+1*=R6Dh`D)#DfrZxS#l|an%0vpjJ_mM!Ex7n=R{U#Np3GZ3I2tcS8xAVkDOXuX*hq7l-CyvVpQ8qcPs3E&P);>i3SfwGp~}+hW=>d8 zOu0K}dUWWvg9-Wt`Oq?cJ=vD!ymUP~^^3BG*Cx8JWsP3LLHBtL zryc3R?fbz4x}pQUr*=awT$DQ#Oe#P80^13@zqVu>=3#7e;KA z2@M;c(tuc@Kd-*+vw#hFr@*!<0M$_gdaMs64%r`fIU{6&v{g))`B9fb?PvGN+IF#} z3(nngDqWo(6}QrkPGs<7J@2x)H`p&zX5eV(TpgYlbVxsU0k_-0szL&hoAY+1ky!WBBE3YALqY*mo zGzXpxu4BbQnj(rvfG_}ra$;)n_sH38^0}9IJlYC@xOE+`WBs9yqwne^AZLZc`Si^UMm80?Z#@AtoA{|pfeum8%P}heSUe6e%=N98(T96mLxp|3BXWrU7^I+&9x;qZ+mLYjt*@TEYo?9-%eAd z@KW>vNNr`2Io*g6Xo+;mDmtk|X@ggN1 z-?izegF1W8P&^LfF7Bb8{t`X4Y$J4K**?8uDxA80k3e~t`{nfC_wUT!f33@ONFxtf zvcJSl#jtN=+St3qXvDRHiai=wf$e?BlrtY7lA`?lRkURJJ`-tq`^sA5!3VAxthIgi zROU+ve~F)-b;}ZshvWiYeYoA4ROjBYOBasIP&i~xBprTcDp>2C*_{uXO=i*sysH~s z!mDk&Z|Lf;_TqL~cewU@9NNtKA|3f2bAoj~v@?G|n>a#$T$OUW%3|SI{gBAvBRjK? zTni!&c6GI8`q1PVya0ZiFEm-wL6+?e3RjPkYAV0v8=IcGjmBB_Q2}}D*6icg1|(~C zvUQ<3y*f>GxO{H~EPV16!eCoeXl6@x(xK#3D2XS#E*q0NAscgfLY!~q zgRR-vnjidw>$B_=%%j%x@D?&DuVp4C5975$lbmTPQYo4^4+ed8Ql*eOpW2x>w9aSC z3zSvZsB`2rQPTNE9PT0jF8}PYJD`*_nOjnt)l`eFSD8Dqzu;nh%<@ z6(z)pQ|8srX(*=u^rj5%P#}?4E)GdvfyM0}I*%!kCEJ_Yvh0hSb}$k;I2(dY5DYQm z?M3gGK0`Ozm#$@=c5bMMJEo|i_C-rh9=zz!rh&YAYi{0a>8x3P#Kao+1xe32wKYFv zBC0iM;ox@SB9r2UPvmt`iZQ|LD_0jWo%gJ_kq#<2!RxV_0W7P%U463U2 z5DDMCw%_m*pQ0>T#I^{x2oQyJLkwK|VIXspQz^X2ENv?lM|{Y*FU<(KW=!e$<~Oc< z?0&Z5?#RVTdoLLVs;u*bbYUqKRQ#ut=H+R~_lUO7@ z;_Vsxarca0SBcVXN>uUY2wk9}p!jqfARjZy1AGSRL#2eesJaexi*C=1w#e9BkY1~{ z$WPjIqlL$&E2)2@DMwj&Bz8BvxPre-Mz!H-aGQ)shx2FZ@yn1JT zROdoTNHd%VdrZKe+4#qUfeKMcs?F^~ z7uDrp6(4Wkcw?-Y9fM}tun#2bGsBcInh?)=oa8O`xbL%+MAfptY99+!!iAkxOBp6JmxK@M4`Fxx5A3mQ~;7|?Rbdn;XI}~ta@PM+f6l*e$HfisZp)lY}Bb*L*U>Mqe5p#)$ z6mLe@qPVayqMdo%XV`_6AFkb(`&%-z(o6bU3dAP!PjeS>3OBZqBVeJ2Vs;HTsG_CM z*zNB%a+0}$Zgb> za_-**OXezn&SlUWbv8boXE*h3<^dWAqNc8t$+Cla!y~Fo-;QKPh3A~wnR8WHRqT{3 zDN6*=eKU*mlO6nHwY>h?l|wJDzx1~I5GaB%eY1GOicI^0-W<0${dwL&DcY(nIEO4$ zNTRO#otB?qb@Kk^YUk$O+>#ZBeCIB&V%PVdNA>m*+_UIHvT@q$H}-lBuF}qEuN_SS z_M{mxJGb=aAFO~>y71kB)eWL7GJ6-ye4YXkuOZ5@@l3&tn}$$s7IDcM$UGCPx<@1a z3pQPU>dQv7_fX#BhON~1Aabup44_>cL}Yz zH9N3rM}w@Mf>cfWc3V_mekd&tl?@l$m{lLZmFp7VfSk4_5t{Gk@Zk_6H&Xd#>Y~EM zmapkMl>lj@y(mr&?{RQ+q0p?cvfbJna{Y-aBNGSAFdkOv73rv!@}4i2P*CzT9{VE_}ZS3Js$}_ZO}*h{3?-BTh;{XVW1$A z1H1(T3+%4TT45%LXb3sF&SG(0?Sar%#-((1Sd64uC!-7wzfY$KS zuZ`6B?y?iTPrv}e(-h$f;YAD1;nIeagh8l!ScuJ$t)+w5_+@hbf@3|5SG}}AhqdYp zgn5+6?i3^Eh>r;(R-95#?TJe3`mdBhXxD{Usru*qSbEtt?vT1wpaxfm#yrt-9IH2h z}ZOu$p>xq61ntlGS{G)CQ<3yfmo1aq`& zuIv{H7l=>nu2%56$Jl{%hQrF)-ll$q{Z<+f71c(njp9_|_hVt-Ar*Oys!RcBmRC#y zjg28RryMqhO?4xjTUITn)^(ps?yDgnnIYHO6I(ieki^j9Fdpw#20_v2?s>F~9IE;K z3zrlvVnLt&xgPWz5Ex zwDI8!{u=r2&vjtHsa}e{#E2ezKtdhThwkq^BGW;Ks$${hHuFsQg@LG6Wb-Un>l!Q0 zhdKZl%m_N!8(!eA4YG{(D2}8wvt_UD-SiIOwJ@wF{X^@#9W$aizbvlX-%$()y{6(E z$!p8y>v3U97fI!ElyJ*?C^^7_s&m-8Z!1?vXdRs?aK%@mLa(dc8xJKRl#mxp$sX*i z7#(?uQUqzOMvS}@ioGjGmka*(fr?R#MSC?A*U*D#OQ1~I`k)E577F1+zqvz$BgH~A zy59`Wj-#%~40B9romstYHRTtmOSHexXlA4%;nnCl!J6>d@MbcVC%1|j;3KS3b~Pa% zbB$YPd+n2JdkKD>*oS`>JFzL6m-eL55!Qg!JYvF0%a2URv9+{9L@}Pe7_Jydw5Xq2 z!Q+6x+u*V;#m_wY-5)PXGvKzZ>89OtkK3@>CJZWG*A9jGUYD1~@x%l*l~w4qLbqTuLw{PNUNwu_sn1KJ1y z0|to*!m$G{?pJ>acDCT=u6Ou|Yl7vaf@*`W#3U_Y`8-)v_BG-Gfi9TrQM467>J|rm zEc9PqY~TN!v#4`AGN0a--LpBHFlN7j7~C@~x?nSufd}zGEKyamis0X5O^W`L#OyY` zu7{ggIgJ$bg{JT2J#4MC{}tW)+$Rp-X95IK6xkGiUAGU}qS?#8)i|P7@47gm7B3U* zqyJD0`r$2mviZ%?TAy06vOXJNcJJ_z|3)x-dy#9zI#MbgwXF8=m8dszR6Nbd9QIl< zY^WV0s(FzpVTCUsX*?({Y?xF;BfseD5X4JdG!gJ&CF90nBW|hPt;V=ZBCkRoXT?Jq zi~uFRV~S*mNe1^`oSN=(U5+nt)2qEi{Gd;+7z{t1K(?5H+v9O^vd+yEN5kP_ zvzx&k3)}sIW+h6i;=*R>g>|&Q_}Suo&Fzf^Uc5Xrw+Pwmh9VvR zeb;ia!9Zn^$-3*$H>=Lb_2KOnS$ge{B2foFlEvm)hCo~9kc~u$_7ruhXR7JVy)45z zS0S#9>N~?0>w=Pl3HH2IoL}k9mrq&*P1)8J0)_65(U~+>Crd`C%q&IE7|E{vtzR|D zqNjA9qfc^mwsI}_KDrjHH6GHuclT-45o6=)-T){RzEx9Mbdq@4<9o`Mu5hU>S+=_Q zmM_EcoYD~4wabf{N|%U1cTSPS7s4d+kk_#O zD~!Xs3WNiRb4){8bV{n8R)1-|5i*!pnvG&kh;*Pm=czIzJml;8xeF-2zzAb`xE)dF z<-$h5H_D#Zztir!1yyfk18et7{2%%n=6wG&;8XJJJH!>olnlcq^o zo>IOH#Lq4BmeOUPM>gj%+wRX%y(uc{pdeL>s@b|&TuL!a|7+&4)t!3!1}(`GhK*5` zY$3=fICeU^Otq*ha9d^G;D2{BV0mszp3)D+*zw8^WW;ey8*|8=Ul)AU-DxMTSE3V~ z^Imvwz{=89`)HK4iD0%wmiCkvTxk=!?ph4sxJ<6F?X^d%U3Bn;=!O~0EY-WKi@U2Y zITdMw2%V3wgVtATgR|jakm}F0TNhgkNRXzJ2X~M;GQeW2UeXFWdAGFRTl=IPt|j7= zs%p|&ir245fraxbk4hyQ?nY>mfpj3bl<3=)CcjL}E%v5DBLs5ynCyjeaV&6jazP0M z2KY+SoH^4rHW<48A-k=l+BN0E&f|UNeA|2sNl>cVxPF8|F-wkO2$Ey>hg~`-XC4J? zfdpxC_;PMn*Qpck=!W)Wdc%Y;U7~?S zF-XxQ4!xa+tK;(FGC}&+5D+-Ol``z9qV(vqpTUF>+V? z!mtvAE0W!fwGUe%vGR=6$6ij3%9>JQv_J1UOHh_RMgKJN@clws-GO|lo5jW@G#fcf z!BP&yI*~A2&m4#XpuMC)JkjO3wvoKCx3@o((z-G|AI`-Ak`vmivLdf^)}73IgO!n@ z)JVq4q-nOlNZ$TkSmw|Wn=>ZipuU>InB^y_{(4@O(n)Pp5gtNA+HdO3iI0#%d1T|y z5RC{c(syjn)`iu#^yWvy2mMO*Upb`8;Cp4!!HB*_G|IBrD->_?7bTFLAzcm7eXS0` z>q`1cg)p++wqdBN;8X21-)fGrFw?W)js@a%*M)K+ioB^yVPWW=K2>=|sOeKF#ai~o zt){TNrR%+i*DE#;yJDmN)Ovb)vbXm3^s-vR33nAhdhWWdmfd_k(fGHiK)x1;&9Nox zx$C91Y+mgzt+Zc9nuhh-2Q2R}#c5z)U-m9MPZkn^n@owz=*z5C=PD(a-_u(g2fFNi zy=C39_gK$g+}cMgYA%oO--y~swlRF3Y7w)laUeY6`SLz)5K&7rT!kdBr@aUQ<4>U_ zt~0fZvN3yD4LZ__ff$Yb!(OVIUD4sLf@igVbyRrmoKiv;eW0F+Q>pPG---@|K%!1meKB zDDmU0mHOxz;WW@)E$z`6jxeL|{2^Tm9^27YxnRKy3GT`JR&KrR5Z6Uv*}D2hb<^cl z_p;&$ZRpNNd-Km8Q`IB)MU(im7A7_+15-t>3K?$Fk3MVK`gowNPgH2@<3?K#?a4kN z(&Fj2pLMsN3f+FD((R|L+dXWC&!}G>Key5H_)V?mjT{>|w?OSGWDZscm&<*2o|2J^ zh=E{9)S2q*Le(bkt(5N$)D>9Yw&OI0oO94{q;t}##sMGT*SJupx`-+o_j)n_jXa}ZJ_Y%My+LXZQZxzU_a8NtQ=@6kLcDG*#kRq1i0T)8UIOm&f zYPfbDpCY|q<#;dDx#(%y<>T`fdb{qEJ6m(e_GY%QxSSYf=GCe+d0lkmaab4ZT{+|| z15#)U0c{vEJ}kL2e2thDZjSD%ygWl;D{AF(&=if~620tt1W|4R(oVte`EB)7MZago z#&fAr2BDN%3(_ea(D81wXJQjE(+#l^as+~ZG#gNcsRfLiDO2V8BtddaP`rsM%GcL! z&yS}<(ZtSsyNM8GKQm2|@#ur~=KA+$SxLDHu!*thMpok(a)CaDn1motRpQW}6~{Jv zY`FIix-;V@2A2+j(n)^^5_(VVivJ}-3j%p?J{vU@{l}&ftKA+7VS^Z*?xF?(P0meV za1A+spf$|RX4ew6X-xyV>?RzXLBi?){YLy#275@P8|=(;L0mwVtrXd|KKq-+#RANG zaYF*g%Jm}ohI82lwv_k==(BBCf%fj>r}nEx

    YFDJw-P*N=BE2XYe>!I>GD7=*%3 zL13)a{T(!v-_kmH2R@7@vmB|A=~H?b(hyzPTgA!XB4baEOEGRD=cBdwt&i?lm|Aly z0vC0K)69sc6F*DkKSj|Z`iSkK|4udzBaj=08slZ{6ONGA?1E`_g0`1$U91T+^~HKiI3>}k4t_DHiPN*!sC{1TkA~<@$FT;#zbx!h>ZW3d3cs%O1gmh$+3m%L zpI;j_diUz13hfIXl|as&6+%wgLXpsc5C$P8;ks5jdE<%-mgn4G@pNy`SWp)Nm-f1v z`;JkNPYOe`b}(>r=P~)y*OPy++mvfGhA|{N3p^kmp0lUBWjE`vfG}Tu>nLaI%<3c& zlNV=^NZXw+_U3O6n!xGQc%*Ag#hD$9;8~vo7!H5pAR?t)jo~5tVwZ6DrS)R>mkIro?2Z!l?MFXRJ%`ue;ZApoHy^7ZZ6S4{SJ`ue`?YnzPNC-n97DSkZfQy$)u z{Q^?i`?c9DVldpvYq?dPFV|whH!?ssG;i_Hw2Em6Fflo@< z=)&^ixtHE{Bmy!}*T}k^<{Qsi7+Zg3%eQ)aHzc+7w%fe}Y*tR-r67Wh=E76Ol3_oj zods7G1EcoLyy9{L-Xf1k1#lE>0Y_huabs>~Z_^507kemYZrVxh%{GX07KoJkASL_t z(BpllW5hqEShJ{A4xB)r8*z;2ZNd5E#dr{mENCQ3M((Wh%EOXl{4KL>m4{=cU4ebY z9+dhOj;)$kSB~Q|MU--Wu!AP#<0ZLGB`Z3}d_-{}_k>F%w^Fx_BLUXL$6%2tkg0Zy zNDtx4@f0OD&;#Q_d__W#ub6&dm0@g(g-w)SpIZnJ+bUk)2g2yS0%mojmFmkyc27R8 zD=W=;iSP_$F)x?EM^XX>*u@o0gVdsFQhFJ%5FBIy(@7BWQR;Xc7E~XHnc$VzCEr*$ zsJ;Nm&pD(0PH$g7nLHtCWv{6Ut?858*Cj7EYPssl6Rz2sR%DyEorq0+d%5>rl2QJ) zyze*@%J0bcrR2x_Gh27-)v5fCd(qg@VKe^7YWu#|`~BX0*VbLzciph-#$7k&3icLJ%ohkLHqob zp8Xt#-@f_BNBmDl3XL41Cx z!}njLXNT`Ere}w*o}L}Po71zy_rmn-@cnptcKG(CXNT{W^z88crS$CZy(m5(bolzy zv%|MPJv)3aPR|bCUrx^s-#~hH_zt9Jhp$M_4&O`Cv%@!-o*lkh2<&koQM%hi^DNJA5bN^G`Z_ccy2D@0ID<;TuWM4&P{c zcKCieJv)4_O3x18$@J{-ol4IR-|6)1@STazhaA4K^z87xIz2mlXVbI8H=dpyzKQhg z@SRJ~4&Pnr+2MOldUp8kPR|bCJ@NTv4&TqDXNT{#>Dl4CH$6Li_oZit@2{k1hi@`H zJA94w?C?#cXNT{6dUp7xvwe|2JAgA~gG1OX8yv(7WrM?bv21W4XUhhMvQ;)Xn6E1v z9M1d81_yMmY;Z{DQ^Tze=|b7ykS>-D4(U?a;E=w)Y;Z{1WrIW7DH|Np<+8ycT`3zJ z(o1E7LwY$ighS;@+2D|_mJJT+8_EWU^skl;4(S7BgG2hpvcVz!FUtmp^k>TkhxEa+ z!6AK9Y6!>6e^oX(r2lo<;E=w#Y;Z{5QZ_iGf30kANPn(ua7Z628ywPy%La$^ua^xD z>CdNzaL_zbHaMhjEgKxt|E6qkNdHFJ;E+CAHaMhjD;pfrzgador2lQ%;E=w(Y;Z{5 zks890^WT*X4(TtH4G!r$%La$^U1ftq`nSpkhxBik4G!tM%La$^J!OMK`rnrg4(Z=X z4dL*4Z`t6GzOQU>NPn?xa7cftY;Z^)D;pfr_m>S0>EA6I9MWGd8ywQd%La$^1F0b# zL%&isIHbQ?HaMgoEE^osUn?6N(!WHknRIHdouY;Z_FRyH`KA5RV8X!;+^ z28Z+?l?@K*Zkkp8o>!6E%@+2D|VE;WQR>i5b9 zhxDJ94G!t&%La$^>9WBg{TF3}L;5ev28Z+uWrIWd#j?R6{a?xkhxC6<4dIOX{j$L! z{ZiTBkp6FFgG2fUWrIWd<+8yc{Yu&3kp8Q(!6E&_vcVz!YT4kBel0bGGwOdY8ywRA zqik?Uzg{*tq~9nT9MXSXHaMjJrfhIXzgadoq~9tV9MXSVHaMjJE;WQR>f2?5L;9Vv z!6E%W%La$^--Je^NF$q~9$Y9MbQlhHysxhqA#T{lCiw zhxAX&28ZM z-3)p+?)4q8e%$03tS>k1>X{AR2i=y_QM8UOIGS2jFkj>Ntb#oz%3sF(hXBU6^EJ1e zzhKv<`C)tT&$i|}BLp9tFAm3s*If3S-bwb})pK-hZrR?mo?|9E)mQh7uaa>zpNIb* zjcH?fUfYuO4&hh$bN%PR+Se@tR##*vpIM8Dc1o&S^nv-$EFix%P2LdBwBUgo9WJ;+ zDi{-w%L7CBNG+>9S+~pQv80CIRMD7UlS8sA3>W9F98$hqc~;-!v#UL1P{mh$Wm69x z@`ky4E&r; z#M>cDdvXF4^>M|xuGSlF+iyS*q*R=!BGuOKF}VdU4Ni>mnf; zc?PeleY@^Y@!d!SHZa#8&UGwtE+mL>e~F_Me;+Xmdrrt0-{IO&44Ch&`xEgTON$*G zHzB}bEg}o9&8(k3GjZau;YA)ExhQl;wgRQ)(Fqq4i%dMA+%GN0TPsJS+}Iv=@!9$) zkp>owU=cO=%jGe?K*pViZE%T$S5bmGro!~I1FX2gjfd$H-dn#QgYOO~gtg6OEI7!D z`mx0;@;kW0!N|!R6l5N+EFW0B5MKV%`syb>bwq<2xE9B;kM%#4Ft3duh?g~{-7k|dTg8~6?!bjDMTn3oXQqxbx!0S z=-Xkk7iX6bOwY;5W$Q5qOxBYS3Pq5)L_49YX$Y$a>dq|v&fOiF<5$yiF|YXD1(FUu z(KIj?Tg&CuC4y~qOYJf34&VO+PGokT?r)TS%?o(lJPya| zF^GETR5S2}wGSFhc^0mqv2ArpZvex3gBnfC#fXwi!f6>Rpk@z4TNIP3k1K%Pzim`qLJcD# zZ(6`5)et7BMB!8~k98#dbft~oMNa6^L>Pq}5Iojrn-{{ic!D8?`1T6B+wf-_H{|HT zE)*U^%uK@;B7WBpS80%n)F|qA!pDfTn`vH{qCP)Sbr*!0qEQYw!QEyG-mHvCl;AUu z8G>k(mS#>=oVdaYH*C}eja_-th}}j=M%IH8E{H@@8e@S87kHx(?FVym^wyX3n=q<1 zGge&WLwKF{3>xM6!QOe>wtUOBLx1-D*)18~o}d1}=kn+OS@>tm*st7_CNx+W_O4Aw(Oy^uUme8IHix; zXFB#iTQ`vEf2k?}xMWr7;>je1(=>l2eJ=+F}5vQv$`(N#G<{qL~nAKjMi zi`SC1i6B5d(@kyd-XpqgY96jeaK0iPO=8dX4B9>`0xJs9$<%{lF{gmkvhM#p)$Ncw~`1KyjJ-a4o{**c`~b?Z9of|AfMcz>Ee( zzV}*?mkthAJ}B~6=lPYMgMmr-rrvjSXZGO2&n@TA|8)3=D8?>M6!x~QH`y>cK4UQo zil4Gv&QhdQC^V8(ttDmID1fF@j4@bTv6-=E+Zb10-)#{7Zp7pX2tIPWQXVY3SH@n- zQnv^pSGy2lRU0ZC5!oJ>w-M0(a(&ojEo27NOmaq+J1+uaf>U&<7m++B0fe|rSnDj$ zOkqwJEhUYRKx@UiyS6g*RQF5DHfYxyf$9&GeK&~m^gOcsGu!eyTeUTh7+C(*v(J;6 zSZL_x`oYhMIv+J0gtCgrb;@?q28h@2XjO}W*jf1Wi`%}$w^@Eqo!@7UCN zqVe?q!~G|g7N=)T%*wNYI+(V9Y7_P2A%__K1yRt*pS$BjEj}nJ&%P#*=GMFz>THVU zih&S`GETZ(o~`6{@0^r_@7hEx4G+dp2Do~ftq+N*#3P%Sr-iul4P1$T2OmX2LZ>jo z_fMRxx_H4rn8CWyE0Z$_oR*6IvuwA;c~y6$PTqqN*3JIg?}~}TiUB8ln&{%ifhWJX zZm$$z_s8qwOK*FSzCj$;Ca)cf>b=#~?XJhEC4&C(6wcyeEU{xC3#X5JUtH7GyM~ZxD z1(%j6K;Pn6fGT0DcDFNJHBJtE*z~2o)^T2S{K*b2D@->_Ru1 z(E&KsUUhrQ(n=fU8|Fu(@~m*_FdUd(1P6)$JD~H2TfES}nEm1f!uvw1;0aMZ8A2CY z7mu4Rg$$ZQ?o;g0pq=^36D!C&D={+K-gRK3f`QobedGjIFKJMBVP2t(hE=@PP7HgsQGLC-QMoMpqU@1@54f#n-vjj$95$Rd znL@gk+o2jq_TBnx#F1HilxZ$pX<`Y$@Dvp6sM%t*Q^rFSZ4nt=TrKik-&^vp?PME* z#VLoV%t?gZaVU-Dt*8Rd+v|;Ur-x6RojiW#^!UWtbH^t}&zzndKk>>_Cr(dHo;-2- zl@lY4BKv0j47&y(LkBWNAQ*^>SpbJ-K$@tbsbMv#1g!3rQ{AW&w+T-WWvJb0Nk$QCzb)v+at#fdveo6B41SghMmDeMfwheKhf!Gj|_wTTr9AAf~%X z=vmMmLORU&bGeDqY8%uh!92KLezh1FUEmTx_<{-@XWye|inrA#Ld+@^4=wYhpPP2D zq1pW&;Xo$ki;v6%u|F_m`fMocv%%Smj>zeKz+d(>g!p<_g1sg6SWzxFcm*aH&fb$w zlcY44l$B=>A`)r(S`51&Jes_w=Ex^g9R&n^s~iQyA-~xH3ARFEgd_#1?53Orf`Vq? z0d=HT5eAme z(6JkMut5?fjHSiJIp`V*6n23YKw1ub6(vG=wcI`7geJdymYrdOd42J`)!k}$P!Uc3 z_ATKHgC#=Aalk{rwqEQ;OL~bSIh<1bI4T z+i9XJOE=^kkWm<}?7gB+%)7;J`zl2y>cc^vs!}S(Vk0~e6ch|4W^d795LA$`cUD_X zN<-?b!!lZ)X}HFEU=5sRqCCjAa)wC)5uPJTjNVwaSf(yYNf%(!Dz|D( zxiTzF6t*jax$RSUwM^9ei-Y4%TlOjk<&EH_j#5K`gkbp;E^HItIyhMG_}htk*_VbZ zRcN!y0^&toB|0I=xRq^2wmU*MMTTx{d=CVg1vJTkL84Q4$_u*`vkilsQXito%)0j5 zxd%iB_`r|YUD#??4_FGEYLL2=6SSgG8WXMw`PkON8h{;B2cd+n`qayEfVGku2oWIE zeN}OKegyiQP!Ci~9Dz>hyRidyf0zbeBQS#2a1Vx+_!OHE@;pPYqQ+QtR9WcPfT&$` zIq2F?;0+YN3&M}-Cx+To0D~nC3sL0v8%8pKEKWM1vIm z$cjwXmBbLn3Oh_RQE=cmb3N|r671KvgNPI1(~9tj7M)OSzK$~BbT_9J8M@i6-p(vh zB?v_bbVKqZGP#SE?G|M2oCd0x2~yeciEzR8F&XbBY%WVb;#1viYKP1k zIxV!sY-V{MycbPeQjGK7V?)PIL~g= zf&CH^iJ&(w!-B6Y14vxSt3nfS&G@npnzu_NBj&z6moN};81^BDzv)+E#28i3f9j3t zhE9Ct{xoi_AE@(~JU*TG+JYp=v1l0?+S%dmNa22!bX-gm6@j|1@4bHwCGjEIP@}G* zFH4cz{WQ&){N|o5`?Lxy==@S%{@K%edhv3X&i!aorEMYB@?pbzv2VCFb8ZReYBSHC zKyLgnE=%V@`p5=>^-@dI-U-}})v>RCDt{QL51vAR!|;oRh01;d^(R%_oPYW-eocVf zP}eEe4U6)8T=ip3?uqgZ4fe$O@maO(ek<%Ktg;s9#gW8bjC6zKs1kxfXN=TV(rg_S ziS?2(gGLq5fw=A=b&_3U`W^fXHLt_(p3`F+fR2^+;^hcb3NxPlz@wcKlkVXo`dCT! z6*@2KmZU9hbO$IJrQcfveID#EeP90rulLjnox` zvOCW!!2TeAKG+CAMf3!_U$jVQ`%C09ZVM(NP}rP|(MbfP+`OqPJduW1prW z>6U$Gf|Lb2l*;*rn23wj@W>%5RG1a@&kaG#o1w?Zuml@h?lE&Au=QC8GVeC-hE+%)8SZX5EGmN;O z&cgz9BHp6bgAgduts!b~D!>KK!EeM7Ny>qd&{zybA!NNM8I)2B$4EB2Nc3RK8(Bbnytz}z8z`dIxmXZuWGeV_{7yfGZRM{rX5m!tY}4yBI< zeXtJZy>~M38(^4N3U!3-ELGX< z!5Yd%P{c$YaKBNuquuJ0RlJPpusNu!&5Jyu8;tSuEI@@Rz}dG6 zV_IJ3_6`{f4g;1=fvf%GLAfw>NgqqcFq0-YWR5DANc_t}^Ja;9wkzBr)$>Qbn(KV% zzBO#G1>x0F>y73T*%iNEKaGNb9k4aMjLy(h*dvC0EKBgQqyz?U8e$#ZA;m-%13(dX zgacB;?rn6n4idQ)E4#!%GBVJ8cx&L%>}+p@I6d^5jXRyS4Rp1>gf{v1B###T^cyx- z=o#ADxM%5*$bR^Ij0e2IVxr(O*F08!u4n7W`dHe0gSMVwS;#5JVwL}7pKs^cJv~RW zZ047L<2S#&D{k8CP~gFLd46`D-3K4RnfC5l;|!9aEy~nfS4TaytrL*>km|Ugj+0nz z{oB!B{iuP^!TKv9-UL=j5L}Q{f8nK8Tb?fvxb#BX$BP6Yfre%agKvYYTaizeR~sIF z#V&P=BY(t=l)TgpGg(doh#eq{=gmqvwRQ-p)O;>uSo@D~qEI1C<6_juWFWAhe?)uE z5{i0TByI@>vcjCAb48t<0u5qxnFb#P2u3g$uu-WEM;K=DxfK&99biXCSFvDlSFd2T$c{+b zX=5rGARYpd>uCKYFEP(lg!U13zG7P(*GOdX&q>X~T+aAoC%ue8)a+CbM*gk;pP=)PP`>;RlGvUk`qZ*_3hLFEd;<9zD8?sLycmPgL@6IyQt<+ z6##U#dcW)MvV-N7ziWHEon4KDFoQNIx0$++22fYL#S*UHJH9-{#qbyN_{ZDh?eUBF zb&%^**y_8D%c07$k;`C(V6zHVvBh?$mT?S~gCy`Vn{2##lJ$8qy4 zHA3Vi;RwOBLzP9;;%Qx30YkNIX~7?$O?ORNX|CK9{$g}t5wX9eC3YJ~M<-6C6 z>(StAm*}uJL5>b9^y$_5{g|NWlTA+$5-yY`0j)-Jtmx{C+D-TY2dK%z$!Wxr25Sur zl%8-#L!`5AFf!=~l=ZXnezt3`6NqdSO;JA1=nt~xFO^g9NL}<`J4~H*5p&Nqjmw>4 z&oNbdRWZx0THoGWVQ)(uFuKDFcb-mbK6xQ1?aaO~N`=OcMU*n6wpC3uB_9;oXRD67 z@u53UgefL9_<!qptm5fKW~U_i@Ix61@~7%uhC@Ap=>vWMcyZ%y9y|0;Yu?hW(J>Mk10s znawBco7LT_jCDF>i4a#H9~V-PELg|66$#@6k9qc(B^UI5y}R#u%l*(sPOmyyC$P~L z5sMKNi|j#3(k3#RGgk}^F;Rg&CcZ&QClx24U>xrFkTP*%4Jq||owVl6{`w0`x>-+C zN^uc)<+62cVofw`=wdhNKh36`!r2G3Ex%fSjTtWWPFrR-T_A0lLlwj9JW6g+=c+O2 znB&kW`3I!Z{zNiTgSKXm6FS(-JZ;J1w&}l&uaMZG{Uy8bLFH?Rr-vf>g52(_iHMQV z{sTfsoq9NIvwi1cy8>s-Ecsyg)#NNkm;@U9ruG$q(XLG+-7k$Gm6l!DhZYamduyDl zN5&?Iy_3je;Z1agexsV(TEm6r<#Kk$JYGkLiKfZ=>3FM3X*ww(w35Q$6=K{$1<(~J zVHeAWxHVgW*hW?&V1aja?HH04l(zU~BlYK_rEG{3?BeSK{*FDq3X} zaKnP&pNQ!@21Pf9z)Cp_vu)R#*wc-bvR-s`z(%4zaSVIY9d!q&04fFrD2!ZLX^(d@ zy{Wa#iN|Cs$u^c*6c$mQzRL_D#<$tJ6xo!Bk4|LSl$dBeHx3^rTd8e#@AmI6Y?t+u z+aYv@->S_qmeK-dlDmMJ8^&TeSq5QyV)Nj@S3ONfmg?Q9&ol|%3vm{9Ya zvcu!X4et1Y$3DMfJh9vXL_1>6>u5%m)=NAfv(} zv>9ehHB2OMLi`UOPBVoM7ZXgQGcI`2i@GR@!>F&1som-zVx*Sz<=8LX#zMWuwfUsO z*hIO;$msaQnX~sy4xbn!Fi)?cn896i#wY<&Q{^%gGy0fRgnq;E8b@-@9G@I@7FxuT%eGS5890~Vh`N{L1ty|yH^G#|FW_zyS z`azYFXb+wf;)DT)sc=hzpiC$W5z2n>@=Cy%EG!ZrI6da>hcYo52%SMWa;4aWxu}&C z+2i$5ra{seshM12815(95UoRI8s>Y!FC9d|ZWf&sC+*dL%>b(0wS2507beUfY>k>XgJI; zaa-b^QFg?PS7BAAu19vv>@Q>y_IX9GiYpNMuJsaS#4##Nz?e>&ktBM2qD6*{C4L|2 zhWC-^ZQTF7$tIzn+=L5pJ4w6PeM3$di5dU2jEyQ0=%@vs(c-Ka?Ig^0Z9QiqYmrCE z;O829Ck1|*tCOFx%{?e{UGDIbZ8TX~CxJv8S7DYnlddgZW}=L|C)(B+_Na}{M$ipR z8*Odb_=U=_a zP^1i23PnpEY;#kD83aXUd8XO`eNgX^v<|BdV1_}{AP>mw2I5#uwwv3;{Uq-eKy1n4 z+5btu$T;ebob*ZPv)yf-#UlU{`o-qqk0F$}yfP`eIl$$=Btk$slQFvO0RY2UGfr@AD0s}_S z5*HBVPLP)X4;oq=7+aEAvH?rM&X|;qHpqd9!b;3;gTF}eu^D!q2cwnVE64siw1jDk zT@7GML_HCm;S#_!sV&Y?pd(3mynr#WvB8>5P^baa%(?%r>OB@08VEe=+2b_VQLaI`^OEsq2S*5G}XdqbMFz(&C*nV-t z?zz$=Lr~h{-y&zVY<~1cB!i4me zJ3U!|Vw!5N9#B>fE%H6Fl zlEr3!azVH;@IimKltbfd<7yQ`B$g-Hj_T70)Ys)ULP&ogsQnHX2WyT96~$P%x3s)|2Ei?BqKn8B838__gW zxo4utZZPQ>E0*4BYE8-NE$&Cf_JJED_m&~e3OmAa+i!&9F~`? zOpkv85yTh`=!kg)E4`&yxjx>g(t0Yf<5WgKTFK!VuZJ+9jlEIiJV zYd{9{5T$d;T1~=V^fe~Cc&%jdZ4>a#j@dA42g@+owThEd=i4hw%MIcBvJeB>-FZ+P z3deG1tl4Hm^!2IINo}dJg#(%S&W8qzBa)68BWB6;_3hO+U#)y&q-v@O3{<{zU0?50)HvW5W|Hm~c>Pe@sB9^PBNuO!z?p6lTRJm3IWyd2mRfx?*>( zYxc+++W`BX366CJFdc?3qZk0$vQ`KLUy`$~Af@~u#we=e*y*t)eg337D#@yj4EJsRa%R88V9ciHegfrF#TXS{@yi3jNQ|8YDfD zYa7(7D#;;!jN~Ct?RSF>T4(7Rz^{ezK+ILvvmxUt=Vx^28C}}0##6vc$#jf*pEb_` zFKf_cdfT<}oKT_!FiP&T5%Ym^C(}$OeWAK}(7`Sylz*gWTit|B#O6Hx)wB03xi0Nx z)7u6=D!pygDT5#}s;?-HL3IXXWp`Vb#hpq62{JfD>dKfKOF1;%4pFHM)UoU0g9s7E zL)~azF}wB0d)|cluL3qhl`4PUNpg?cfdvsG(j1^h_B&M@| zKenVsLGct`-5VG&QDd$#?X3n{SOiw>0Yi3_;)6nx_B~fF9(PH|;g3NNSEA2?gM)cV zi88Q!nBpMG#N3m0+>&GoIU-@KhpirK$LUoammEA|li*X*ACkV^YiMPIU^O0utQQEe zc1%>`2Oa|{h`v5VIQ^p8CBZMRRMGFyyowNlJo|)f6{yr=2EjO92k&QxU@` zWfwZ2LgkHXMMTtM8L5k!W zd^kZlz)=)U0%2)Ebi#Bxqa`fzPv!YZo7SvE24AokE3uM_B_2pBkhKrN!;d;N-MU$O$iol%GUgE#+Cng8F}Fua*o2jHrnT?uDWZzrKDZ$_We)A z{rf^F<%Pm*Sb}od*`bP^ROY3!`>7lQbmP7uMF<0Ui2G5L*O*jMC$yB}1NG72s33PS ztrySBKL%GvqIz-KosxmvicB`*ETQFIe+cp1s{QKvSNpJG(DWswh z1;k2%${#qBzLG}|oEvA-zw+$R>EW>3e012*K7yd?G!*zMJMMO`RYB7t$Q4KOV?`j}9=XA3vG76!31Xcg_|96T#he3Ut( zN}@fcM0g9bX6IX6cd+}kI=7Q+Z^>|Wn#q`mSc~;=6zfa1_=BmDI-vnoYY{8mF#QlV zXCNIkyBCL}r9DkGJePlFAhg%mXiQymzrYSIXl4 z=77S8LXqqjHXml@=gXFP* zV-@`XS9SrWE74l``PK}suXsMh?jq*>SW+uo~o?xTh=pwmC2rj_zI;vS#7T$FFv6o`zq!9pnTzP7t zz=@w7x}{#krF1xDSjdhL0XabGeVh7j^k2tEh+GXJ8vAbOJRA4zaF&wwQem-i851E( zAiZ5N;h^G}^$H(~sxD{&jJOO(tcRU@o(g2ac=bj%9W{!+S8*6oicCi^LG)lZp4nPo zHi8{iwysjrEc2W>B|0ib@V_+4I-f~BBeoEk^T4-)Fqt&txY)MSt+bctR%$<+pO4Yl z>E^ybylY+wp&m;92+zxlPt+T)p*9`}J+m~0jEZqYOm4=XPE+QLq5~#_yrNMY^1PAe z%rQ#<43ROO^Cl7<7NKa^xEULJyX$VkQ!!S7-W31}gGhTkQ@#$^S_wU@$*N&y@zjlhIng7)K9Zdb zc7x3%STj6h#Zt(E!l|6+=E8?LZ$lEO8yO{@o7CcPcaNIq+j~bG-`HZ1+@}>Qx@rf+ zu6@Ga2meOq}s}nKCyNz_rC|w0SjR0o?r2T0V2Z zf=6zk+uk>WXYI_(vx^Q($XuCHOru^dGC~f^3UcF97YLDNLvymNsT$||OhRXemx?22 zJ*sAAWxg9VxB5&>6Hrz*vYEy7^CG>nY3TocoX3D(;xE2q_Lk@&5~>cK#HQL=KDTgQ zR>O$@9!>yp0@*%H`s*G+Iz8-5Ha1Q-s0pi$KCgg+87Krc5&*VlDkfk9A5(2v0L;`z z9ULvc8pU59uzr)U{$Z3qwnMm(gl#h2Y+GqRnU{R8#R;#>7n$^*$`U9y$W{Pc1(Rke zDKVL;g-e|G=vyU!i(mk6zNty*D5 z$``ZUr{*?#H8gw16F#Af)NQAa*Uzr5$0rhfgay(iOR96V~@;PqdXp*x*r0x3ta>owpJdLAf z*&WbMpN0i7)sf8RAIF33nbfCVt+X1P(!>pu6)hD38i|0EW1UmKunf0Fg-U@_)p6ut zFnLA1*JmejpHOoXhAx}4rkWc_rKH1;;U8*jh(#0e8^|4EB=V+e&M{!YS=HTV$To%PKGuYQuo@7P56Xn5XJLJ$~l& zLnwRX<1*mr*q!6P0&G|R5wTd>^-5kpE>nSuz@ke|wa+VDjcUOmCC``!o~tlzfsmpS z%V`*>jg^H^!MdT#R}_4_e;C=AwAD0)PLUtjlK<)8krOI3q|&tbu&5!0JoTdMv)!KP zhhV0%Qn5Z26cY~6pfn-6F>B~d#E(j3Wp-6@Z!{?mWdSL+3U}YMmY2~Oy1leWKJpx- zDpoAI!Yjlxr{H7njC2*oF=!*ZU26PLu3Wk=DvMRm{PTa?@M zVF^Xfl|85hok4GM6NwGQG6=({La^~-@Z^-DkgFKNV@J&n-oY!W+;iVL+(V^skRY1G zWtlRrI%j>z>~xpSr>nOoH|dRe+5Km>`s&&aiei{9nkU`)Q|+hkQR9d)`7^8^6VYdu zip%UQkE2{6)C~{$WNI@3OnI~#_FJ}U3i}KUh#ggBlA8?>@ zCKVP%-3SckQg;;;=-CHs4*>DA1izHB_pl~nRu@B^l3~e1YxuaJ~0zU!`wApPw>1IgNx_UnG0N+}c0ABdi@fPAOY_NwLGipknz} z6e5F6kXEAm%n9juk{;YF;-(uvcXZ5MVFpe7pcsL(z9)PutTSRcX=w>Xx3S>Z=Lw=j zFx!W&aE2?WX!8e17bx;ZV2WlSp1EuMB#C2!0x3+%$v<&h=)z@dJl&Y-#9OV zfQDUK<3j@$l3NS{`dDDC0sPI2&IG!R#2U^{oi}!j%W)>z*^0xcm`&Ivy@(rVwbIwoPH$-yD4*HDq*4C{MWpok=?%Gr26N;2@o{KWPj+AHN~x;2-_ zKlbcPNXfHNB%N?QLl8{iJmNyZw3_h2?R5c_CK_Bnct_5cpQdb}#fruE0_nPnp&l(w zv86H#!Dv$K@eN^u)+r7DVW|%ArHZ*Xb{D?Z)?Zw>NVxw+JR<>)Zl!O8yC_@@Wuv;1 zyZ4kE-Mv;s?Pbo*qU|PHIz|Stc9S`R;6U4k@wQnHTFZYRkY%#X^j1OU_TxX?V1Wc}0H5mi&giHVj?F8NSB0 z&%PtujAO@Zp?5J^B9mPnVufY{_qY?&;~C?R`hbW+@AZP<$c?-}$a8Q4kw?> z&!|ok=mKXj$N$H?N{FY1PU?%v{b69nO%?|1NV>~vrszM8HlScC)xLQFymwE~(}SH! z+u46d8=%0mtfOIGfgizRd}8Wfo8Q%VIE@LYuvowD@v|IsL|b!WIYKRae!3;OX^I-G zs?BC|WIk!kf_nkR6^DVsGKX%ds#`ij6$=-ve9v;N4n-n4E8{hDc9V1spP|;wZ8W9% z&Uh()6ovE|ce8^vie*HWUx~%G1k}nBl8EFkWwD3z$jnyF?QgCKz#ISB`(!w;gr*>Q zyQXDpyv|saJ@pLcA;WdmJXGYPTk@Oo{`wfqT5i3YxH67_ZIM47h*1l3A>q?SW=+U` zl2zaU@7W#;L9d*<0#T*|QOES^G1h1UQGY7|%rTRr3@Z$?gI*9TWi&&RL8ssus|`2jyFLKxIqbX`N3fRe!yH6@rT6`cI`R0r9IZJR6i-Fp~N#_KM4N=6PG9UH4{Lg!ymJHzd3YM9rv zq|^lq7(Q_Q)$EA~`r$%TZ7fmsJYGx88nU*IX)z(fC5T4V^ZBVsIi;y9fv`c`#V!9B(*)4^=;K}sbzD-_|*W{_39m-k;+{lR+HbEaTV@D(Y6peXCWyTF9K_uh4->2gQbq0CCL9XMBNu6 z<}j34WvmL~gq3Ij3dR(#tT;m{vY`2*SsSiA8wFz!KU6|EP)*zt9on`$k#ET*N*BL4||Cxg$z2ybH6HN9a0+NEh=$DX{3{CZT{_&kE&2X@?_g9Lbuzzkd*9eUAry}@ zHfD9ZXd02lk?vs}Hd1*6>xgqklH>rBOpUL^j|)!5Av6Ct+llRp@-QyS>90#}B%QXK z@#N9czGh8QPgwlsVc#)AWm#A8afv2;UrEbH?dKqHz+xa4YbKKu?dSQFyj$ct>nzwIizIlyWqW;T z^(D*gPJ6X>Q;@vF4unvGwAG^gvsw6rQe;G`A%j$1!qAa*4`W5L2oghSX1PS^Zr|#~ z;-`%>-^EysFyoeRm^t6D(qfej2bw{x(JU0(ZgxL?X5vIRzL|QsOa+b)9|(rXN=-3E z##p?#OWI~C<(x)u!)+R((Te=x?ax1Yd~x9tHLv-Jvw#uvbuB&n{Fgfy+ZILh*6nZG z{sTI}dsdPYT$2-Cq0u#7@NgD)wd!pWVmjPIay1wEyVr`nj$J~bOl@+fCmiJ9arJc) z1)^iKqN?AAU`)NitH)8721Kli{7!x(B$9;#3fD9BgUwFZAFibTr@ME7v#Tuc{nwsM z$Zev71PvN=0|6#DKT zbY3g8p5pNaC~6sP&+QKm@0j2Q8XnyDJzXeEdjJ2Op{&w9a~3S#5>g|orTni8{y$0* zS{ElDACw9Yv7l5mwcaZ!{`_)r+AL;tw(4KxkyufBf-#g7BmNkCTS8wUevArL`CGNm z!dh5Kv~I-Ez~WUWs-O~hNGJS4%uA-c9+|jYhDl&-OWk42_c88Bk%;+QAemef@K#&! z$I3d*1P3rryk%45b&M6;hubp{6Q#TUY$aXZ@S1NjICt=ru*;n0@(ng@AbPe4vrS4^ zXzjo;hA%_IWHEg)e@py7ND714M4XKvTVQZmCc^*yX$yl*rDdfB>$b|bW9g;q+;NBA zHR(c--*i}5wy5EI40cg=9`t~s&7Gf)3;Q4yl~{m}z`~@dT~zCM)lzWz+FC-jY=O$p=8mheaGxzAfqPMHpN(&$0$p6gzZ2_yNQmn+ z*BE+SARfz5Q$EpvbR`DfSyN?rs8u(9Q9toA?qfiZgkR z&B^fkP5*ED{td@k!|vZZZ?#==w)WH$U!o_QUX)y^&*ba>^eS8DsXHc`^zXUJa(RZ? z?)GXQ4(GZ0vV7Xr6HE0M{}VT%!~k2xm%2I@C#+LzZrV1y#~yn+{egX6vwNRqK+j7S zkGUdV8?{ky9zAp6oG>IG#Zd*G=LVXVq#ZS+Ui(e2c7C#EC;fsb^v6^1n;!f{$?}j6 z_1s53AUK*Xc>j;>=svLI;+X2aJLTA% zjGa1RX>`vIZw^n^6(+bCCuAJGcgq+4#*kOLZor@Cj+L)WI*fzp@(_&52Q<L!aV!+s%%wjh>`mCuKoZL{)HsG94vENy&4f&!du+>a09I z*f4bYb+Jr0zpdpYUwHU-d#8NE3AX5?lXk(Pxa2kO-132( zEoS5H9SKV|_7_=7=juCcyzyZE6->pfakNA2uOaDslKY4x z4$sLV{n0{HPsU(pVG#NCtr1$TDSN*G^l3R*Oyfu&G}W{rj=};+)p7@Ym>_D~2oHKI zFWQO+CEMhqY_fU3n**vUHk&%H^bc*5X;G`X8FQ+ljL6$rGXSVy`jF&44YCwp5#8AB zYZiGrU>L2Duooic693-BwbRqNtN=D76Na8;Iyqh)8%|4~X)68fkmiNrU;TTQUwtLL z8O!U=>WP{{dGqkV#nnFSkudzKq%?o-!gzqC_?Ox7FRZgEIdm@T{6+&_Hr_xH0fsdc zOGU%@w2>itN4D>|Xfh}nrQ`?(YaveUUn`f)JU!+?h@nFZw46ysD7UbvObWxt+HD0> z9CeBNApAulJB7?18B>Nxp~4u|seb?;>^GZAzdB_0IvkZk%UU0r%}^ZSuoO{HgbH-FEJ&}~2XeyOv zHE-Ne9n)i`{M5HwRHU`__7iX*-fEcTaT2^NB8}W03$NKKAp4`{zB~k@$8gPiSbA)t zwJrY5D^ikU1^1(r>4}ONN>Yr%zBUQI7Hw6tJWpv)u9!h?e>K?C`hKZT8}3j>cOO9a<-QxaSdYdu zI6C%~kb#XOTj{BW4)SoSYrl8eF^{ArR%20*k+*2&u7Y1cNUcluxLx_^P1?dQxKf!X zTSu@VEZvNIy@qO)bRl+GJ(Sk0n7dBr+VE$=-K4)9VA(1yj$X1z8)T5!IeYCW$}p8t z&If~g+}4m4$H;*8IOy$pA zk|s+W8de;JVPduo@X+WuR7l7+^sHnHCudoumtjFx*-NFi`SQ}zKR1Ie|#sEH`rvA!Q!l#lw*xj6mvKVs=U!Z`1G zJ9$`%A)sWJYXKK;87{ML+PP9W13I1cXEW~o>6LdDb2?gT2c2=s;NW@0K~@Tkqr*0c z7`-5xp}Ri~Gx#fk3R%+8a22X%Au2O+L!BV84ClYmXOMFYR9Pc zhAO`&UI7tMa8r+k!GR#A9go`?FmGcnhuyNC11shPqiX0d@O~Ad#Udbpurxpc$_hE( zI-I}&`{DHwO5*ID*_qk#hw*0vpXeybS@h)d6;%U6c_P@cz{ue6D!@Z5hBhiS`3k{g zZ%8NDcb|CH;~<}T?CmGkqEc*LiFoLqfj}Q4bZdcostd2BWMpK*LY1DPN-7pQI0*_l zoo6tJQ60and)mb*g?xYz@ffa4`SW!fI^ieX8jtWRzhRuquA~wno;J;0M2_z8o{5rw z%wD8_!456e>+EURsG1P#$O0z{XP^kBUJE5(0#W=WhCHMQSdpN^vhYY9!RJp|yv@2I z6rY9BHV74abz1VpXGB&Lx!k@#+eCGmO*G%(JfQe6=TGTPpb%|mqTEK+I&C-KI-@ja z*1|Ogr$FT)d+W+iTwkR0Rziz{%?_n-Y{YRkRgo%Dm~?cg){ZNaUFzs zDO~|EXjB~b<1j_D!>`h|kF+EupnR_uw!m)3E6Yg|!>^uvF*+VKsPM(7j4vyV`Z&k zwr5&a4uzBX>Q7l27Jp4Z!h<1s>5{oe(v6m03mCSDlkm6Z#qn>}QKM;m?gR>D^E-`T z0~e>W$dI>b;8opCJ_<*|>715sno*iRtA(Ty7_i$c%%`NXS^gM z@o5?9-m)`@Fk1dvUnf7tB=>Q%J4p^;;D~mV>*egz7o34Ftu&19cZaN#3?cgbR}@i(f(jEWArs1Un4rFy zhHM^*AzWNomYAVZ0Hi!yPExqZ*!*d-HONV^8o8i$wQpV?Wjo~P%UgcXT{R;V5P>@y6_BrWEuR=Q5)#j3oGTmW$g^Vz* zEWX5@-g*0`ID#@3hYc?<61`is*nvt@L*MFi!{{dQu3%rjGafX1d;gFr_b?{kiI_mS-|fo_QooWHgm7IIJCiY4M4! z6|ey8SxfZ*&ci2uGBdaPVNk)NbpXNu15DVO<0|kcVl=4gYG%tvweE5$&`g2;&9^Ai zZHqm$u{N|zZS|8i1gx*l3{Z49Qa-KuM;Hu^kq50Rel2R`ZkprbO$EnL#85*a5HQuY zi!q5(YMlwl&@(Ct=}t5opo>G00P55#!p>hTT|4*a<+?|q&nO#iU26R2f;IWCllbi3 z0-tr?zb;b1iyQbfnV=|8eS~cb5&;FSs0-4RneQW^>{n*jP!8;MW>3LjbDpb z()`3+@5z0yWUkC`z2fNWKQpv$VK_<+=nn7zrXQ-{N7f=Z9?Mq+`FW8 zu%$r7>uUiTpyH%I&1T_=#~=aSjanS4$a@UYO}I3It909p(&4ja_aTZqEl;|z4HK84 zEE+E+k4*9_*kqI75<87nbS%iS9|_X{^;i($i)cbkPs=MmAW?7d;MwX7M3EharJ z*cf8rdJW?er4wVQ28N;d>YiX53btm+tZ0Tf6zo}9%(%2`BvnG0)d42zo7h{pWI=$F z*Gz6(MZYizAgj9!xxjTlC9OZfE&-2!l+uRdufq4 zW?GgzcUAk@r8dItJY0!zpq)(GKz-_hHG0TjfdU(sU;5~b(h;*3$jkO$lgIu4&HX#T zV`NOf%zWDKA2P9V8WL;E3k&Id^eIpb)bGg+i&tXncvs)6LAV z#l&5ZrNQ2tOy3R0@njErqk^eb_*AH{bC215dMIkci*qTS(oxgdHna0u=^($gEwB<- zRk)U5r3>#MP-dZ=0Si>{R|By&n2QN7b1l#nhX>4#PLkWiPT_e7C6~4e&(_1wR3uppT;_J{0@)sWwmU0}cf_(VG?K8WG^tFk zCC8OWgDpBkY~{v2tkN;AYtqys*%!vOBD&e(G+c}toi~6%@NQ@tt1rSzZJPk9k0gG& z&;m_cn7lpGeBuIQbJeX_r~ z;xWrbRhK%8xy3T@#X-lgs?1w!I<^CFE}sW_e(hYmV3^a7k>sb>mwvZ7dLav=-U zBe8{z_Sba-X(*`eushGVC_Rd zsExgvZ9qsU1DM3U)e#KpG2J&$!LO=Tx&3$qq^XnQiRlSdG)|8bQ(s$WpQ-DR+EZ!& zaW=m{Ew31`U($unE}Au*+7rs-FrucwSa)V!LY=Nk zO2MqmJAebn0%&=EHk1$u8Xaj0URt9eZ!?4*WvHB^WgVOisw~kt^&S&}Ti@o(YR9u` zosZc_!yKWq7-2e_%=BO{YaRGs8}WE z1p$#cC^G~NK_=m^Rx{1vNMjhNec%0b+65t8k4L(6TLJOikiw0DX1)v9i_&cqm+JttMmqh)Q?e?cJkL( z8{S)tMkH-6CUO==Cq{@A($|@0Pv-qEXyG`EdxBMR4&7L}(hBY=iIpT*!J}jO$Y3yB z4F6d@hh=DfJSLvMbbKZ~J?~xZ695GN%c?$MvP7Azmc7>3MqYVUtr>75-Cgct>oVn) zq|s0Kg1>AJb8`1im}0xlUP((IpHVt;*5>837dA9E!Qa}d1Wufgv0FieZ4}@^6KHqz zD!#L4$~ytCTzBYMOOU!Y>hJYL{quvC&pq2T8r-{6ygzU{wPLg!yP#x7^}k)UgJyn^3mV&5?&3bu-XqF)c zYr5XnmBKL^+D`=>yqxzMiS7V2+NBN9Op9)}4S3?H1(H>f5 z(NoK$7MIHD&p*ZPSk#=`FH;Pv=dp@$4lj zO{Q8vE^u zwCm&1@^+=BZqK{5RL3B@1I-=-&MY9WDHBqKp4q@pQkKr0@~omg@$b>g=(y4T4E)-$ zrGPAYGUAB$dUWlF#3vY&OcX9Q?(a=kJ1{ud&|_`Qya!facKo@e!#*%_+T6eUz{oud z-kG_aiv88%2}e9kwvq3+vwR`fqbef5YL(%o|HJiaFD5ciNwA!9+@3TV7vxaNB$f-( zV(u8Q-5OhB>fsO*6((4h;tmOsJ9tY-%y5Bx!}1u*(&&B8=JlwWSBJz^^7U3Gw@7 zerB>rFuN)g=2+*$G+OdEfBUFytTq0jt)Y#B%UONqryqzUHyb&QWX|rljnJ{SP#&RCz3N8 zH!09LyogIwz}1sc2GxUcN6DD;&_PV+#ZF(up+u9MUpP3s6nM!Iy)Gg9rdzGIu7`H1*vnfpo z=H3A|Yi`YgtvlUzm8)`IzqNmBZM_qmZnY$x=>T|{KgPes-#X4Mp2D{hDTwxjut-;{8a9P!hKtR~AWBLP&0Van2DQpKSW?ulBR?(SnZDa;GP6WRFYg4i4pW7Y5T>yj zmY7YU<{^#1I?wSvznJPM5gi8zd3i#5l794l~O-?-`*Qgf|FZ6e#1ZL^PS!4DKq#y z{ynR%)8~xOfA#13T)Y1jL*mV^IAi=@^||tQ&$(hIpX(p1EYgj+`&JG-q|Z

    )t=1 zwlMkioBnZdHlI(w;^jN$@OkGEKfXj2SgkAmvoF&$q4FceARset+(qH|S>EQ{J%Q%2)Dv;s1QY zPmkhr@8$3L+Od3o>70&*R2C%n^xpezW!7Bs_<2i~^SS#Sf6}^&&mVm8k@v6Rv;Vq@ zADzMH+rQDWa5JB;|JWb5UBKrXUi#tJ_VPLB`j`FQ5TASQ`|&T{$mfm+4*lNMe4hP< z!P<>{Hoxs7AH0pvp7l5W-RJqd_RITE`5%0~Z2Q8}zwmj_;h(s?8OGkV;_d%_6rXqh z^2!I+@_Ey))th(mIqS(YfBtqpKiT<*uepcMrZ=bW{~@0@{^938b36y}(oMA!cJg`G z^@rW@5k8l`?GNVtjL%#C>Bjc6IFJv&boTs@@%i9;fBXI;IFOqkz4H2Z@VWMTk3YJA zgK4_v@8;ji=ZnYZ{_yo2%)h)fy{L(U`RlLTH1rUkAAjnS%Rj~e-Tqr|d(}rcpikXf zKJBkLpyR%F+KYa{0gc>$!IE?5C&~Z%=(n!<1_$)-H+=i{w{Spz`^>saYv}2(I<9ib z8_Bnw^Wj7P@+%zBk-vEQ#L5xi&#Kjx*HQ}d$G_h9#Y9pn^!g^+n*>s{pg;iq__U9H;wIYO3r@x!}HVD8Oi&7GYz-Ehqlhy7@F^7DUO(6#N~<|N;FcIjt-{nB|!`q{^Z zUw3{>(sItiFaGa)<|og5u4mcd8(*AszwIp-ub*{j@`-!5e)ms*{F3DOKR)pjUp?aR z6MGGcv)(^vqp{ee?A1oLnm3u;N|!-gRzi^JBmG^N(I}Md|TFZ~V*| zx8GXoxc^^Y`nk`1qf{Q+@Rl1+eNofRKY#s^qxW|=?LYLAkx#wknx?&f{L-!ufA`U* z{XaeCdjd9wF}ryl;) zuZ~QPzGZpky*rLd)*W^6Gv8WrY|>PH_7C3vyGxRt<-fh^mGjf&%GM*cZ0R~Vx%u9= zfBDMRQ^NW4e zq~mj+`}&jD4J4JX{Mlpg`_7)^?pN<$d*Oe3OLF&Hj;Z$DcYX5HXSY9g-Q6Ef%5S)K z|JUF3ndBQk{D-&izu~LN?j`^IC+W|gvZ7G_bH~@rOdmk3xowNIQUV>)wuZisQi4v1 zP{m}z1jhG;sKeLRt;#Le+QM_lNy|IN=Jn3kdeBndN6p`dG;`T(o*Z@QLA|kJ8!Ad< z*Vn4DQ4Tb{O{+Fx{e4*O{7bF@t;?L5EM8y9U+$7szu1#D+ueG2dW%rySe~tv&28By z=c%}oiz!_(MVFCAKxCP61(aLgn^e~D3%Y{zIQj#qVuE$(dIigT61aS`=D3g!So%Vz{^Y0_>8ZLY<7a(0P3o$#|rCGUx=uCH1})RUrx{`z)nR)pCU+$36F zWCd;|Iy3VN(OHI__MPQ&UO`A)ubJoHZzHA~0kCcB;v)2f%h9 z6+3d-Lrbhfk6Zi*w_hz>-B#U!T^@F%-zOa}5X;0&@#pB(Tb7=*d}SIz+5jq}FDOe_r0|KitN-?s|Iae>Vkqp zLR>{+%!Q=IWg#?3(C=n4_~PnTAl6?M@sz$Z_t@2Es`a^TVKZqT_0r@oHn-y`cpVW> zb>Ez>>jF2e^MqyHg>+K^l!qnN-oT6ORv9G}1NIMf5i%UB9cZXUH)liH0L7|9&zXp0 zCE&3s8eq5ZBF^kU&-`*6w}Df{?KyDx5LoP(3W3#&2T|mQ7II!Bm#*eJyM##O4!b?N zPCteC+%7oP(H@eNo)e~b`D6!Vun!Ff{jQiWgQk^@Ob7v zTo>LJn)!<=h|uJrQLrxot&y)MWnPAEz>{W4K~~1u-I^^93{c?K^FC~C z5MDS|TiC`k28L-2!UDPw?A}c+Nj`{!iG%9_cLxLHB=`O29ApZw?p9Rae2syS%IC;+ z&s>E!ytsg47VY6{Keps+$R7zPAYi_xT$yH3u+8iiXQ@YA(mYO1M{Pcu(R7cS?rpj- zxE1_*WP)1il^|GHUY#pu3pgVm;Zt(4t)bY+IxB>uPLr<{yE$y_Tz|TJhZhr(Bw<^}lyslt)!rD4n!*!nE%Y~F3|KHU{4twy|w1JEA9yL|4#t1oPB zkAviM&zwgFElD2!eV8!gd!CsBy>Ox)9q}7dJ%d^Y0N?PeYh~qFBf1Q29bW(?QaiMK zapg7kumN$f-Uu|YWn-}+0Ha+`%0@22BQmifTngKIL2y}3G}3?~pDTx8i6e6anaIN7wK{qz{<}1c z`TCk_Ohf5(;T^b?bMLe-M~F%5enFcr#{@g8HaLo1H(!)}XXq%7X{WLwpE-LeUX=2D zeBo^y3Be2C-3WZIZ)pCSWyit1C5O%K%VdNJDg%#SsR4Y#m0KIPNbMm&ZewkqbUo z(o<1QwNAt6i=fhoyskGhHGF@Z&IL}?!cn(EhK=>IW^0UX9l_F1Nk*w z1GG>=b_GG;y$S9iX-6?Ha;AK8mji*8LC5bdnMLJL{DkH98yvxE%0FL}kHM>Uh2uIb>}XI*dkCK$$6XUtadf$#67| zrt(@alU}kL zD;y&{uPMf;m$;Q64fPeUshn71-xwZw{=}&r$2u3lY$_c)@A!6IyGc@$H2qTXAFZt$h|LkTnFndnvxs4$ z>T3tK7zL|Ne!2;|kSy>5)uz=s1G5diAeOc9^wBCT zp-X8WFs`-AqKyMByrxhUho{v@$`VAZB*5bQY4U(vHgavjzzl~V!N7OS>sAf;hi3py z+Zep^X_U z)@;VrZ{%D*%lcjs`Am|NxHZ;0gP7q@nPl;wEgi0u`KR$5q*AM<{ ziJ#;D{YeF~pB#3C+&@vkS10$_)Bkwx$BP0*JA>H2LCxirogp2c@0t<*Zkfpb1Bhpoy_FxCAx z9KUyE=@9neypfySGAYHVYUti&L$PeN9BEOuLojWqj+ZrE&<^!&9GYIqIQFvYp7yLZC)K}n5c z)m;w)HKh~Xv9>2NGs^ReVj_aZjxIgl zN#@+@0N3harSPWeD@w^G@MrcMzrRD!Lv;BQ(r$&Aa5chl=nehc$SPR@;VV98L@RvL zZFl4K^iGsoZ>1n=j^hfz>BdRR!D?YGXKO9L?+RN!h4LejYZfIU zechPLe`ux8xP|H%ECkkQb=gr~1TK{cai`5sh8KC@Kj4s(<;!(M-9y~cXw5ns|Jl;h z>D=AASg!3Kv(|NHt{*z{95xv*;8nJdB8cG$Lt!Jo3|j3V2kkdiCk116v(8+EqQ{{B zWDh%N11l&lL7Kq6rVBLlT}pcoH*+H7oG^nhvgK-$itVnilJ1#iur9fQ#*~F;JKEQ@ zVkYCx^kXx3j{hjB1w9{ZE@Fm-$x6>Qmrk9Pl(x-V(c$2g>tJZC)bOv_;F&JRtifNe zrhMl6@*Hr2PW(a}g>U>#8eQlg{}OVFSdn&|HPoeh<}HgZ zNvcAD(@|r4smyTg#OYXx*N%SNU@pRk(8ZPpRR1cIglm@J2yRs9Q>kxy=u)NUrKO*U zb&bzE#RwtxbR8`<{&V5#jGo*pLNgW?WED_orCNQC%jOq>kDf(vQ>@+SLh(;o&yyI< zWNIZkx756z3^|DFB=8{VZ~!rD?VC-8QVo$dJ2^sN#?mxlzK(py+{aVhsjFq>4R+@+sJ5)*;&k=q zZ0ewOUolU85ph-H&gu-;S+IfZT3WN@!48(~`hm8qnXwtYc^ga?^TRQY?#s#H&MoqV znH>{+0tP5s61W%eKMHkFZo8Z@RT)7Q?AHJsh1Z=s7Ir&543SwJMmhwK@V#e`a-f*3?&XY=%XtgxzqU(x9^``oBGYa69O}UHh!0 zn>S~8ZeA_8ij=AMa?q_fojVm$law{;hmB|V_JWe0Z4PI0Czgj*vf*NZa*)r4+luV= z*Y7Hvx!de$=oo&saOu7Q59}z?B8As)NtX*SUF;LD!ah-g2b|-qpBsBxWF{-gww|Ea12ak zvQRCzg&(YIL%i08Evjf$>KAf&4WYUEFr$*OK64FWB?koqtIw{^QKK}zhp@6|a$E>eb!oA{HR?D~yD;KQ7e}d#&-@l} zeBtA<4*?t|=PQm&OY!4U0wX5l4hgm%anm{~n3S6iE$#hP5J*94XXoee$?2rPRMO;E zj&QbG@Zan|W{@W52A9|!>o8&tojMG}t{PPxDqwpkk&;qXkUx=(qu(50Wz5tTeWIrX zX~;~n8K9K~p8WO#v5PvrdG)bz&E`vYcDjiG;^O$0ioI;+M*%GLhn=8A&fLKm8Tgye zU9av0OU+rMlXcZ8X-A(?jw5n=)wr@>dTh%Q9o&;V{aa2cp$`J*ZN_sH34ws5xkw~) zfe}DMcc`Z88dkj#Q@E6Th9$@5B{mEMCzPIc{l4UK=lC9M1$C5zDk=?w0*Xr7CLp<@ z2Qtf}tRY+haxtpYkE(o{JYDVzRlV@%NG2EB+dgj>^VcXO zGiNwkf^m?b#gn*D7l%J zv|)g=Wdz-9vQ4VVQd6jTQ30e0ROzfYxV$~$1>8GN z3uuLFg4w#n(%LFy)63s(X(u_^YY7Tf73>0$PXl{`u|=oRIu_L{JDaF2@R7^tH?Vw# z5*2&g*L2@J>JeJHxhF(k6-3eU>4p8YRl)fgoVsgxu$AC7S>#?%UqFQ^aEQ$X8nwd(9Yv7N`)?L|C*R zS9VVN*>)x4nJQ{UvHE0pp*2FIJKu_3#@vG(HrPoS!paAf{qNc{rl*__M33#aA zpJGTTfNBH9ljgNnfK{uL^0jlP@ysdDnvw(1!Gf$Qm>+4xZS5_?D^1Z`gG6CmjeGJV z61&QDA5@=B>JF?{7qTm4H5dv6f4>cDb_An_Jmu+GXOZgC4eKp6rVH{u#{nAn6p`(g zCDW*O#gkCvlF~!fp>Yskc2KXf)AI#t!^+p}Ve{c3cZ_CdR*=$ub%$Q@b!rGhqwaM% zwm75k&cn4j)@Bf81zk{gKY+TLkRN@l;H(b%&}&Yk^H8{iV|#Us62u%9lX&fWZ0!Mq zJ(n znTo`5g-U+mdT5gs_=q0{#tJCPxsqJ3XH3sQ&UYiX8A;lRGXY11;ts|LB~J_$>S%*ovRZknF2t6IeEv`hf(HoL{% z&*Xw`_G4@3Wpm|fL-Dk-DQFMcU&Y%$dNHINb#K5wywejqaO5INoKj!`Uo;>ITp~Sn zkqFtOc>=7sX+C^f38=IMpRvjuP!5Xd^i82t|MN#D-suP4U@I51NZB7%;j53T1Zv-tHR*s+n z?w|qx;S3CO5z3dz=f$ywwR#nSyc)b@OuvorBXN6>BY14HB;zHIORD#pu!(z*YcgSC z!B8#KD2aPTEZJX;L%_%XI>@mmAV*gKBQ7gx2rXwje~y}cc3Pqj5Kl*5)qzMT`I$qK~SdyG8J-{jqvPd>N(SlAh>!@Z(toUQT|H6QNVk(I}f zMKmlh%-|=nIKI~dsTigh3q?>kv^KM~`Wdw$YUzW_{tnZ$-dv6k7*7xzV^GnAMaIa% zrDZBUh)HRXr-oY>_I$*Y3YZ_SPd-iU1g8d#Nz-0csVg@}(v|r?Xyu{2vO|{9yjZ4pbI@0Ee}~1y zECo_{$qbXtC4^w3wG-Enw&n9+bTP*!**xzkpX>3-%;3_R-Ov%Ul0IN}?U?|L`vF#H zCLU2156AO*VWm;osBCN3N*b*_%u+CP13yHqKA2>sD`u9uXEm=mCpMWvRrR(&v1*bl z@#d{;@Ae7-E|nQA75_1NB?IL@dW5Wel#GPN5SghC7(G_P6zm4;xF2c{7`afc#y(AW z+QkK1aTkMiRwf2n7K3A^&lMtF&{^>RXE8H7Eor&!NGcQ33@$i^29g|Hg=CoEfWzr6 zQeLm}D`gG#53(?Vvv$i|a4HKSWe3o33A8dlvpG)D1oG8Yz}+?~YU(u#zcge8uQy36 zc1a8}MuiI&VHGl2W}RyikM* zrtGv}v8C6riDJyrTJ6>8k!Ptk@Zr5S9@Uu!>k#t>PUa|5|FZMfjuWH=MYlQ^>GD*M zQu5S15<+0H@%N0)aOO$|!HgoU*s)b>cC{$bR>m~>r5L=)QarZ7?6M18?7Sn*`vIUP zYVY(P5i`OGt!&p$*b6bK(P0()FonHmoIS&f`f}f}i)X7}*+A+(&Xe%8o#wf<-U=GZ zF8XhHQSC64DgU{_MMc7@T`~0_$Tz7XW@||vgyu>6GdW>FCR}eog@qGe*`-7#R~e){ z;F*ObrlqT9!iG+5SvNRR(tlcd)}g4V3&QYx)83CmXp3&`O=LULjoNAwM^kbxUiWMjtV60_WygsBrhU_mYAz;sZ*=SxH$2#%MaL>YH^^y8oExl-j|mu4 zmlGm+o6hdSdI$X_{w>OCt4ZGB5?EbN+zu0&n$-n2gtmBmaMhl2r46U%rQ0<^dwFep zc|+SK?qyM>7ufkU?#xQ|dxZ*PUy8o6qHdd5+*JnvJ0pvl3{+4kg=_Kd+WeiVay%d{ z@N-Eo?b`rtaettosCZxchz8QK^09nI_f^DqoYJ$m)^XPcHvH%W4W9ji7(ayzX0IW) z>(4&<>Br~CqiFu39d}p`yde0sy`v@NKdSfg!K|~?4(=7>&#Kl9qhOT%x8oxH{VY~2 zLLRCOY{9XCDsCFUTW9_Rq+00iNm(ee3)q_udBc`Xo0ZXvpU_`4GeU3LU6&lYUI6UM z`J|E7P>7U-hL+&XWb4riF-UyDs6BfR3phFX6=wR{n$`KD;vr0*EvHxzJI^L)-FAh=fI9 z=Jw0g6w6q1G6dmfQl`{)etUVlM39p~{^$Xwv5k9NqH=yEy;f;s9n?)#5`(yHU=Rb zG2lz6mhd#u&@N2dbD|K)!a*>;h>n5KM7D*j4#)>BXNj+AhwaNLEuhJ-U{pkDY`O8EEZXzj zRyya&40YyNeHJd&48vWDx#G4o145+?|4;;Cfqi2_qL~(1^pA z!TSy{fiOJMK*n#a5Sr02t8tyMxsc%_ zjPeKMiKujwhU1$ykVVWwpD|Zz|Ii-tRGiNQ;2X2Av~{DANz>_`RdNH8|yT7{a$qUCvG?tWD8|>;zZI8?4Zc?Ph4H8z68| z4M9YoBZ*}wk*ucdOdK}&dN&kSxvn2&-50s9X%35Ah_$+@ib=r##Z)r2L*|T}(yYN8 z!eBPdg4KUVt1uM~zP}0soCn2bMSas~6qlJ~m%JdM?@EBDq&6F<f+dZ^%xHS2T1)Dn&uDgb0 za4L@+=LwmOrQ~qVt>uG61mcep1-aijhWUdRPP;ra%Rw>=l>`#u2W=@XRoo?H^WxNS zO96i{mM#Z=Jb^>HtuE!C$IHx&e!bkfOz)5f#(FgL4Ug}jz(8K?O4t?Isy3Co)6$;P ztE1FY)W<{?nSGyS`9sY*NABCOhqBp(EN%v6##LNMKVZ{N?0`wqiu1|=)_R14DSQVi zF%TgMIl>?p!fj+C!5k67L)f$F3X+Fi@ip%tsPBA>XGw6z_^wR5{4_l+IKje1-I6$! z6lu6lSK^3{!+_L0g*a&FHU*YsyL7J0WctzrNpY7Va^`0wx-IqE4$^k?Lh^A9FKoBB zl(5cCGtQibk~#jABM6$G1`jSpN(%Y;`4mF*gdLu47pPM457iG!cQ~Z=o6XGrMH*bu z8-T+#hCodwL?sosNbYe{wqF^Gr&%g>eO*Y!_RQ++p9|J)BtJm80U5%0XNiCDmV!m90nk|Z zd`uZ;gDCMK`98}b*DeKLTT)#f9)dbyP4#r$TI@Kqi?fC%O|Xm!X1|A`xKk*`bFoHOd^D61_zqA+b)UL65Ceqn8^br`=mvuI519d?%Gzj% z6#14Y##o0v%3rHvSd+QXwQ_PZJ=um>N0e4DN>$z1Qo|-tzu=x(wwie-kuv>oe=2m+ zh3iL$-&h+eB`ccnUmx1&;`Qm-Ha<5Vg5s5?2_k3G&iRq8mB&26xEiLH={|%kq=w54rJc2wF=L8eX3&yw0KnVg}Li5{@a9^VZW1=f(=Btu?Q_H+w-1$*EqiO!<}ia-(}Q4Aau} zGgbT5^4i5)ELDum?^6EPmiEo=?%8^oXBzHn+Q+ds_hof|b$%!mcBh`E=qA=C_RuQY z^cvLZE(yzwD?2eE0dWUfS3#Pggm;*L=d~_+TvLfWQ~4VfIY-&Dt2K;|MYC0s!*EKO zB!&&4xsf^kWHz~1-Tbt=+o^9DETlaHlwn~y-6=A`na2T@WZc$i*R+Ye;9`nTd6H@Y z3&4&(3RZ{HB`eP)i+DZRtm4CJ7_qO(qe>N%qvq_lWYWY1^#XR(O|J(zbr+ zk*CFo!yhix>;X&xI>JVflNhDZDU24$DRs{?7_*BG11ks&CP0Q*pPP0a#p7n=!l|UTM>8*5j%lZXd2Zm98{iAu|M#@e6 z_RM`v=YUFU4v(mWzpX}VFkX&RWSqDSi%{4=nS>=GEm4F;E)N04r%G;ebPDM=AzMzF z%{(UU1HPfogk10_PaW(hq8vJw{%J`l;GXcSP=BC*(tL*sbZ0yDXXG!{x2}0c9&Pbw zuBAj1b43CeQ?L~V40B~gt^SBca3-IZxoYIb#S04hHmaBgK}c1JXX^SGQoHXA3z9Vz zU$KfK%m&3y1TZlP-olw%b!c&SOO<@Fz){*O?@@U(ys+T0&YJDTNYX%U=h)H_zx>q91nJo<)`Dct^I0DRUPC;gfwN83 zJNc&h$~qdb`hc8-tcvKV#|bbjwZ#a|F3iGNsisPqp7C|5^J+c%cK;7=IUYBI;OOA+sslG24i^PXn|XM{3S{AW6qPZy0IW)6_v_j z97=a4;^l~8Y82h8Y$$HSK|C^4>x+_RzZf$2Fo&U7P{?yMo?k>V$Sf^g&~gUp-JZ(; zork}*t_*)OH#1S^*mkGbK%p8QMlD0zkfw>7r#gxf?mx(SqdzwdDUj*~GedzLZ!F?b z)JQgAJX2ITHK>GBQD`VZPwUaC_m9Fmi!?b#lh=%d8}{agLq-?=YTyeyX;gqW2$nI{ zziV7!#Nw-_|An<^1(2#I5(g&3SHh_VJ!+!GaG+qzW(L|a)Vb!x}bC1%^z(?#d`*HSE6s|bUZz?Q<}lrocSoJoN&IxSuN zeObqbc3Av&P_9_}C8?A5+a0t~Us8mlgC742QeUp!0R0YH`AED(`%rYpp=|Yewvskr zFXBq{lMf3B3v}fwk`zOBsIPCZQTS)2Fb=+uW%$%SI%Cnom-p0J4W7tpPfRGPuuQUnzZHi;Qcd{?^vTQZY6f%khD9KZhP_ zZ6yI8J$A5V!{V;d;mi64hO0xR{I9JG*6WfUS4%IEYQ5Vyfy6zo;fRg8iw6_)%-UsJ zs4LZR(E%zw)iGYYYgsHTJf&yM~x+r~WW~qNxOL;S} zu8no~T{WjXGI3(BwkV$n3b22l7ee*MLky~bQZkj0PlGCN*6KPFJ{Glz#rYG5XgguY z(Q)jfmsE6NOIP7!=u9*A>JRD~kN9Uc{x^{gpl@i^s&fuBk{xXX7Wor#eVDlJm8uR{ z7pag~0V88o)v*!d=rr0nU2Ud;IGLpD{A#3%c&T!M}IqA8B0}` zH^ID!9F=DfnH7hHf$CnT7++~oX=$RRd-3_bgAR;R{@0EUGDSuwG9lVtj@xg(+6fyU z03t0vJXApf5ysWhMS2;>Amr23eub!~$6kv57Cp<)X&Wxj+89{DjqZ4zIy_|Fy4xN$ zwMS+K(JIU;l#>yZ%W?I4%9!bn0oce%<&##NVu^1eOO!>~gY8yG25E5w6{}mYx$2cA zAV@!Q5i>W}p)(c;OO&!MtcU6>lT$e)mT{&Ps4%>3oF-ob9GF$#FAD~sEf>cHFc}zF zlCIo}YZu6#i?Cu9?&CrPt&3W*fA0cThEnz}0Z)Bwtg-kCLgZtu;H-UP!!iS(AVXPeL+QsDka{xQYs*Hz_VLm+VZ1ZV`^g^7e{pR~I|Iw~ zhq>l28S`XJa`v@f4<^oreTaHd{P<<^ zR2D9xl|nC!nR%cc6s~MKK!a!@M;?qQI@XMi6>c0Fd#8@8@QxmYC}4Qx2Z+0?p+edd z7K!K3N_!@tmvN-WO)O9eBkS_>jwcw9qIi&u?4?Ho{m4?*D#+vSjMoRauNrJ5JwGWIDv+1Y&q8fH`xE(K(UYl0vO;!04$_VUEg zP@2f7$Q`YS}`H=X7*SAD{I?H)SbwWi~Q8Qi^xqy4b0mo_^&Gtq_@6r{ioNvp_ zrlya!d`d$-Q;y#|=MV&SlT<`aopElvt4c>B2Cu^EDI+&GCHHCA$Dh}*#y;G8&;u86 zKRVRBb(~8Uq%&DVCwkm?J7B0o-y6NNVU`0L=~Q&y#JkN2pOzk-SsKJg_;5>a$0pAo zbHr)*S4+oQ+D_m{9jmP$9#t;VqlY}&G8Xyww4con8d11T8m4yjQ!X9zf3}$^Dhpm5 z6f#KLx1!fmvb%wVx+Hn@5P;-~U(SKW3Ny%Oo@E&o((vihM8YM`KSmOH&U~WfDS_Fg z3tF=vpm`)x)Bs9I=<}8yKBP2`a=^SJ(w8MQO34CPU=I+h^G$@Fo|k?MM&|y8+yxW! z>FgC>svNk;VMRVu^&;!UVM`63D-RgwoL%N+&(iXX<9G!Pnvr+U^M8hauo7U>U*CqU zl{M9qE))tjBhWsg&iR!>X(y; zjTs=IO21Xt(#p8rvbtxJ;}V+nSvx7WC4RgI^ceuKQj%L(ZZ_BWV1ZG9sWR_%gyl9f z5XJmp&Y^Q)SXCWwjWZ!Y%XZ~%vPj+8Sh6f@w`DS_e~xzw<^j>DXBro#$o3FiF&wKL zkti}@4X%CtvfPK#hoGiGobo>49Kez~JhVE(B1pLaZXi0%V$RasKWn*qjeWb7qL3iIe$~>t(!T526TT_UZ|$&e zLRHAj`5pemCR7Qc4r3E@=6AHk(R*u$&cC|d{^h_veE!vyE^E?`PDpUvoI9JV6AG9g aG5_ifn+Z#K?4s6bz1HeS&cFJo`TsAtU;L~9 diff --git a/chains/polkadot/config/res/westend-dev-v1.5.0.scale b/chains/polkadot/config/res/westend-dev-v1.5.0.scale new file mode 100644 index 0000000000000000000000000000000000000000..ebdced615179f0ce080a1503d141919af441c38b GIT binary patch literal 286065 zcmdpf4`^f8neRE$)r=<5G@90Fl~&nR-cwl3dy3XG@noG@C(oX-r}m3y#u?kmWII8Y zrE6OqSyFT*k6l`5p@kM2NMHjEq|m|^8fc+~23lyLfd*1&p@9vwu!R=3(83nBu!R;{ zc)#yE=iL92?Zn>hKI&$4?>*-`-#Ob<>gzf+#6 z*E@rDf1&a4c_A!e$-+kllYd`$`24fm7SsierH$2WSlZM*91IemNEt=rz{ zq{psx+I3rI&CA(Zzb41Tm>g@~JLhvx^Bc@E^?IY) zZ*JQqnHfAXA!G@Y(%Gmw&5xN^q9nwLvM8gAC&YMqs@rRBH~Y;UyUIhHoj-r!kq8}4 z2$4vO$t<T(cHA1er}fkK~0%$bvB(TIrWrXpHgoZKx>Z+F$E~o zVtNFWl2=~HvC>k{zM)!6i&;5)8FXiZ^qjf&X0vTCG=!Ltd1_`b`M5YCif(}e6t_fn z*{-z?P!jZby}xDmEPrc4G&E{+?VVu%K?``k%6wnRTL2sRa5lGdD%xqheHtUHe;WsW+%f+1Z> zPu;=j+wF##mvMs@)f4iS+%hk9ORUJQf9+qq$S6$d;(#Uc3++Y|i_H?da#t_Frg{}A zofHMV{!skm^5dcP8Yypy`ITO+?bPZ-;Y+nW8ZS$HT7Fg6#OgC&t6lXu0_1}tzud3g zZnifq@mUu|N4<)aJ|PO%H#ThAJ}mK1@}_R6qu=TB0t9;&Oe%X}WJ- zMrw?S0+wZSyS8at;@2)dUHvXnK96-aXml*`Z?a{8<2h39UNN@R>+GVF{~^1&AU3bv zy-3OTi^A1GtKW2*AOk5~6t?xtNQDoGt+|%12v46;41kxIB~D5C6WyS#i&f28R%M`7 zUX>BJIZ=G7)3!K~vHskZPoRHa;q7FcM5enF$>9vAnCscW6>W}6Rz zrB0^>x_v;(S9GPe`>oogk0IcXi~B|SO3mr762#k>oyVm7yso=}_tk;=5UKZ9Vj4T= zPLoFnJ!0CKlk!WtGR}MbvAV-wBM|;t6u}7CJ?ukRAPdr^Bb-O-ZKO&;6rbK|_H7y_ zOT2Nyt#Ze_jZ`U$!b;DsIRjb>KRe-0d|$teRCrKKEY*6og?7C)Pz(I$C*%uVysB^2 znr)}rG+!cB%OFRT!wmfPguLaeLO;#Wi@z1w`QCQd62D_?T)10!83FmQ!p0$1V9=*c z>GvmSg4|lfFVKfb%?mWVn;58G4Xae1q@DwdYR|lk)R+=u%dJiyZKO`h6^DLC$~-0t zGXtJ;6gzcNuGREYq~!m>(c0_WX|y^uY?7x>%0}HhM#@f$i5cvsn{B(HF*tKl?tF3eS3*{K19Ja|%mT2}*lU^c;hMeEq2e52Fpub4gc>`8Y~fwk&aF<-P`B5iGm zX|vB?ZQ`H+8)u1!(4^VvtK0f@r0O4pSjhw!^_;?UjE`(^kKhHSiD3l|H|xuTI*vHU zk`spE1YK`*Zpv}PbS~f#oY@OA?SgG;73!VsE?8{4QE(K1jX|rmSDA9*Ua2)(b|Wn( zU9fhq2Yy9P7`SuvEcR(vT1$a;HyCWCe7V!G4a1bMmewxT@nWrTr{)v}ijS(4uGx3A zcw@fNopbG#v ze79@8+cXY2FrN@_!tKi}IJK>DnFm($_$5+S_jia*mQL*?c$AtE%H5FV5OP?U!Mmt%DjE^c}A!@`D;fW7BbH*9-NX2E$u zz_~T76?bZN)lBXhizwg@%hx^mL`YG*YJ?M!5Mpf@K-Hj3XP&Xqu1H_&psr}7eUgOR zrY5IJ#creY_~lx=-RUoOI=2U1YV%U9alO|B^N%)jS3AVESYk_-)lXGFDP~CyAOV%; zuGz-wgdkkL)&YN^1XPg{(<_}0da!4TI*=d6RywzBY;Y}E;$I5hNl}{VHTzrJcE4G- zL|0CEkE%pkO!#=)TFVlB>F0K9EmiK6D9-I})dt|#8{#fey4>mY23_KZ#oeO3+OF+j zY1GzRw#bM{+H|gU`ZKLo=MIXW7GldkXn`(6@*4xAZttdLdN4^s11-#1`FYj^T%EaD zy?T9ib#bmbcjLzO8`ZgMm#@#x%~qEe{$UPEf|ehyzvr?vePz&YIDX79Dc9SrJu{S; zl<`Y8P`rw9-X3gYUi740<`pQCVtloIyWP3d=A9Q4k-Ne|IOYIdc9f`$4xRuL!n3U^ z&Uac3u;vpOg1KERoCc2z*zilOP94ipoD!m&o`5`Bb0;S)@jK zw-l4J%^h%%o%W@@f3SNUqT#-O9OC9rrpFgaSiWI{e*g-Qn67meYkRaO2(g=))TfD- znWCF^W&#qHy^E3H!!Ru~cebz|g8P}C%B-C7ZF5u&J9vM_-J^KEd9TBoXK^p_}pa=f3?{;uuwqkvJ1smiV@0V)@yFJ)0bT+VQHXXfPemtV02@HA~C#AI@RuA~QX*~VbRk~^9u)t!I9`AFA;$z26^R#@LF5W__$veN7gfftLMW&L8A zrpXV~Xb1}>HNw<=HIJZ3^YLt@wAwZghiNfo{W{X(z=afO(}1UyK!b6%GJiw$@rDfr zVy{W84C^@G&HTvu2D7RxT~;9?_6N=yfT!>TAc&arBl5h4LZ@B_@ zD&s&e(QcSUT>0r0h_kIit+$Eu7>gUbRNK zsP^;AVB2t>9H#kGmW(uSc8U>=Z#SKFd#kq7?DWo7ayYX=Schr$F6))>7(-tHAedMX z0CpGM;Y#k(pa*XEFu?DQ0$*n!YB+tsi^~Itc!I;h&sg_H#th121t{D`q15ab>S%MF z=^oM>I@to{V&G^8;unYM-D&He!b6Akq~L}Judv#M#E9-$v0LVQthE_;q?ynMx_l+K z;5Y-S7rP7IV?88SI(;n2CW?{PiEBd(0%pxY2eHSlDS}=r7x<8)bE8H-8yF8vF@{6$ zp^XZZ5>B1?kYVj*tq0@UYuNj>*RaqS(@jJ|zpRv{=dzxY&D}~jz`gIt1@3pof z@CF)AMf0_Xf%m=`{IGh#6jgF7TQz1_V$aOj*&U04)@LaDGg6-%3)-%7P&I)mgT(<7 zk(0%~QJ*j;xjHapI(r3Y6|vPI12(l07yRjrQQZJSSfL+a&RC6M`T6WCw!KtqHZrk9 zFH0~T3~DWsV{>v`BXfO&%pfw;Z+62kMfw>zQ}AIy+datJg#r=>HwkrPeXFnr07~~z zYk;1K(rNp~=0;Ktb~mj-BpBseF2CFby1Zz>ovrOZ%Ad^|5rH(cSXz2OqT@1~pX=4s zU=(2$ghB@b0L-m;%gnft(>t|RldXefE&)>)?!PRO=7B2q!k2@w#(zF4@(St&%RUZv3iC6 zwK3^q7!znu!qQNdn1s*EkKf=5vmOiM7mpgC0e4M=Xu~?qebw4?C|%sHDjd|d$3lfh zk0&1;_OT}w?~u;X+{LJYhP0mmqcBrYbqXbS{0czCMd_@ElcRV6A}SioO&Dge)w8Hj znP5f%JRywBG-5>;T4dBP^vcrqg3QDEybdjxkVOVw#jN`&Daq@EKe;+7)vOD?9Qpu7 zP#xSHG_aZ%Z1z+S%Y_>DZG-m;(U+mCo<_T}b-e}6Fs2&xulfRYVx5TqDoky6GXy`b zO>>Iqt@M2)9ziuwV0`ItQgHS0U4S(k1553a9ubO51sKOx9eNiVf+qBygH~e}Y9%_$ zVCNy-DFl_tWu8`tEkzLSQ`V=IT9ITA5UiR(hvBlB2z7Fo!0QqdGK6-Aki?1XPkiS$ zlOw~y$bstgWEXCI1Wh_y7*d}7ThEHC^4j&4xr>DrDrS>?7w0$>jjg?c4YdTZVRyDj ziYKKFcy1ik3hqu5^WeH8kS3*4fMNwd_R0@PjL99)2gs3!#DF6GBz0O1GObc{p1@;% z_ZYgnRr1)-k*eA|?0B4H&9q^aX*>oRQeZ@ihEFFY1dmOG?1v0^nn>K^n5cz1*$Wzl zHN&&RIHr(a0~gz%J&dJp^_GU9zBOpy#t2~T;keMp&sxJ}wiO>hCE4~+$vx2|Jylv3 z-DMs@H@+9AtZ#wxl(EmhUEOAYhSJ@|Sy@?Dvt(?XN^dXjvc9&0m1s{g~0xo93`%btiw>n9y(W4<_eStcNZ`h8VztKmEBK%Fe&)CobU73B# z9F?$KZ#b-qi0>u*FQ~*n%E@3AaoYOAjITRHL9{QRpV<1S4p}*|lT@~r+qJH<)#S!j`B5nW)-Vx?uEtUz+M`y;^IW3_ad zI5>qX9qiO|y&BryhI!>nGEZ+XPa;doL^7LTokI>Fa-b5tzoBdUGc%u0hnSh!$PsN7 zXN+^2gjSk#4WzmiFixroB^`LX-|Jv4_Mn2z>*8>nkzQ5kkhAbjv!Oc{FJyu$-x7|Z zDz?owe7MXxhjMz1#Xp8|49_bx=Oq}zz~7QC_zS+nGQY0mgI8pB9oBXsz5u_e7sM;@ zn-bznVYu$F%4`Wcs~Kc4$2SOExI!VV zy!K{E%PcnK##d$b3H&2uf!wjkt~wznuXk(Mepc{;jITmuo|IT4I0@)r!O5w7U-Y4g zwae;M!)B}z*frNuWzO=oz?sbZ;{{owvJXLct~cS`cb0L$p-lR@;PFJKil>L!z=qZs zbX%+hQinJe&El<(5V*42lUvVLtZ`QRg6$-Q&{yG31>ZopQ+>@8T7Y0Fn=`ROduy}`f0C<_4_S3VZQE>e+rb? zpQo<6g?RsB-h&kXFiy6b#L+Afn*^e=zHr&-;|3gy>?KK;1zl z_wW0+;4$}Y@ok`-{%%=(H?zbZuiE#os>dS(lyggib&wJYito!QyK(-)g>#QyylCEj z-}RNv>u`X1=cX@_Bj*BCU2L*ro{wis%ZEl!M5^y9$lc51(9?f(mgky;yD=r7@3O5%Sc*{B?A$Gls=G1t&W_LId zV3FmBh+F+PCG3Z4GKv0MeTWM;XPBupf`^*v15o>$R!+fywMza7zMu`6PG7%mi63FV z6B&%YC2(d!w}KZq0)OHj6vmSzK&-4*DV2@y37DODC8DtY4d*|6!Oe+JJQ{ijuBN1P zA}karMz{cOx$x0JW78%rK6K_&2L9!i4MAg=o;R;|{;&cKLMF8`fsR`hl-a!{Em^$wG`h3I2xk`rnA+1iizF3Bn zopfEccu`{kyfWjBA&+{^0Xt+EdKW-t$!(QPPw%!}%lfRpT@8@i$HfF8kRuyo7`q)PdP(#8?nmtuDQTkE4O!%7z@Wx4mQJ-G zun)XRv*jCOB}*9HY@q+f?6j}Pz(2dYr}3bU?w+|R<8ghNomfDd!<^5A^(IlI^3OKf zB%d}9yD7XWi0j3K7$hMmsR|2i@NQ(>P0Mjunz56I37@A ztA-dAYRVwPW_1PJysEg}f2uPeN0-dI#cqh_T*4v^eFSS7t$k4RMtDb|$o;|wqg?c8 zZ&4$B8GzpX@G9Qr-62|MOe)heii$OY?;bY`mf%JIgt|Pv->uV(GL9RJlBTBUgzH_( z8a?4DI=v&K;kN7ULqVz!3UohpIc^=A5M74pNgc?by+lVi(?DTJU?|!vsQnjd7J#)5 zwV(=l)MFe?mCVYTVb?{W0JG;-tqmPFHX*H2H4b_e*fqhY7!F09ZxFGGdC^7$#Y5p; z%ih2ypz$k|)JZYGdp2jDtxW4)x~%f>-A00iXhSiqcY#~a>Yjk5hdTyI5W0u^%UJ)C znbzKFjtTXM&Opu$4#5tUCFO5c&awmEH5PE8!eH~8ay~Rl7i-Cclt4{Sm_gTbyHbF6 zUmeQGLqL+&qN(Hqgcva`Mqy*h66{~d-4*l3Q$B~BjkwI9yw$xH|BSZY0CO{8b%+Y$(7ex2K7z^L1m(i8UHW!|kxK!bts-{q27?Y>}v$5pFrKqOeV zVaX~rH(*0kVlXBGzEJ}Q8z}_gvlW>EX@|Hm>$8M7-Yay%AXGhTmkKeyRKPtO&4EMs z>cbX_l}}P(Do1Mz8f~*YFg$FAs+5+2?Tj-EJdbu*lf=J%gz&7^oM%f*WEJaQyr^HC zjUViNne2b}FB@#Wp=ATL2DBOfkr~%ygxzj;FG@#a6Yw(M-J8=ZcZBjqkV`W|;SqG# zI-+aAreL2bD-BW~!^|5*rMxug*_ykDXJr>pp=pLwNt|;w1yt|uajf(o*j0gXT!DsH z$R()hYTN70&4Kc>#5vnBX$BQ!vlo(+Dr85!mVC@fkm2>IH>mn_us@jw$F5~w+_9x|4ldygPZi9UC z2{5~FGJVp5V-J~aSaXO=qLT|e5{>T00J<71M;;ZH#Iv&4z_Gtc0Z`G_^(Q+z`lAMV z4Ap9TvAjsqn)j1JjnxC=jE-J!|H%kh2!Aqjiq&ma^uBB850S|3BKJa(S}`-z-orXV zR7-nBdvIe>l|D>ITAMg6GN+Nf4H{4i!k`UA8?7CjTeC)6;_7`U9z$_k+zjF|@;W*Y zVHn}KRElu_6D(mAf9sxpCjK_MlC$M&_8ktnMWh1!R-n44P#jk=OJ1rQqI_+ilG0w<5q(llYJ}u?coQ`uRnG>%d2f>Vp zu(}~!6Xt|CqpJN;oThfeHHqipsN(2m_~h08%;Z$V$ARL;b;A{*WbrlC)|xA6E4f*{ zHLRck3zOJJ!K>jE*rT_kwI~aXvuov5NhgnP+SF6%4A$XQfyJaxClx1E;Ann2ZsGEP zJR&`hIaqVyu0h1-tRHupjt#>!wGh)&?dsAPAQX3#OCiXfqp@@=(1EP)U6pGHCxWzG zx3BX!uaT7;&Zy*BfN?;t`n>@Kzmk7d4abFILxWA~(I=^kPTqM$!ysM-4Y1o7Z4|R+ zUODOlZY5xbM^5{gLz#rmNI79@F4GH`4)2qMpdmVsS=pd?4uTwJso0b`fNwBJj=2*C zU70k1l|U*InME)aE?hEjVsYUZfqaDh19m_xITF|$a;=3}3!|b^rD!U0v?G(5Q=BB^ z!ADN{%9GTuCi=qE3fV}5c~9VSveDdp+$R=b*}>On5b-Nc!hfAuAgy?Ixp>!cRE<9Q z0O?7GQd;|xpbtb6?s)k;NIhlpyTs3mI%RPfpEh4HaWF>8843g2Y_n5U6y3_~61rzI zF9BUKsEIg9G9}zAys`ZCHbh3)gOKoPnb#~hC^#{ysRaL2xPt9`y;i>s2C6uRcw(qE z>U$*hpONWVI3=_ZVplb^?1a`3viVG~|2TZs*+(sheRr2q_1F!~i3zym4z`DXoprxf zo#zH*XN`d&?mgfTsFXrh`chj$GxKGMbiT0*);Zpl7M#9(oq`+rVkGzsa z$`eR>P^F<(HvmV*d1xke; z7JDxldbEFvUbSG8*=)|krU5*RTy-_Pf@XbRs*Z6J#gp7N9hrrN~X%2BcyN{5BOpaQ-1 z_G>L%8dqhM-L}a$DZ*w&p~;-`hz;x1W$vS3jy*O&lEGI&)$P{Ftw8%8^O7cHrO_ACQUDr7*4(5#x1X;l^= zVQP;7t)6vTFA;FpjSUd!c};y@^9RbDbrIE*m@g=N=LlWZu8VCvLfEUo)=(%Koxe4o zp3mzpACTXNb_0wRNjw|{7aai41)In0Ux5O~+ijm5S3zTnN1)nfz}S5SjD+cbWmPUH zB}Hu=W?R>0#6oS>#E#$2!J197VL>?1PHdk zzR)ykrC2A{2@*Hm!OkKuL-ivK@iTDAzg3c*c-x~^-P7rR2 zNg*dg|5Sq_$g79uz@>T`|9&4?m0uM_C0-O7=E$n0_xZChhYc-Qv$f`9Xe(@)SfNDN_ z2T~0}d3sQUdvi=0J+p3^$vz7519Z;}7Hc9)4ApN0oWF8DXmR@gY z0WVr&Sdp|2UW3;-94Y;SY3NKV*=hcXTr_1uwaQgE^o8tH+OgL?U}tGWl)*?%3be#D zgC;sVW=e*ws#7}XjAF0|D@BEhGI2U%ZSdrhueAxg({W!!_vS#TEU6WMW59<9B>5<9 zgpVLO470l^B-h=G6d7V5)RxLC=Mea<5L(b7XpzU|xMC2@>+~LHk*`l1W=h&&zf4@8 zD|nxMT-;3oFx1DtL7a{Yoh&jO)8USpUOJUELgQ*}_h6VzA{Y?~bPdwJ0J)6y&u+UW zV$mx&y#0>{he2%+lw)kvfRq*XoOJ9QlKgqdd-dZauG8dv5gnX0A2=Ubske>F3n3I+ zwdOY2VO8A2C_E{`LKnLr<#+Ym`LGRw3Pxoqg$omL zfUb~>3QAbgWl+C^o1!mzBg~iGV|_Z@v`0D$WTkPn*}kM!=d4X>iu*GSvMmm2ZAg4s z)_QYA#X`Z^tD)e~VFdw&65Pzq(#of;NGT3@`YLN)(-a}(IPaw8GuC(Y=s>|rK!R=7 zqRm=2bzB9b1l5z0N}%pa4--&)2bs)dkp_%J<~%DjDO5m|^pT2v3bLX&EB)rbhh)V5 z_YmYq{Lw#F`UN4*4R3nMM`&!`rDYXWrjFB^HfaoeD_RyIfmgM)D4=K+7Xny58pZNa zh2^8ek!$#n3$B7-;8U8sGV~fEW{*Zs?|0-u;EQxZlaI;Fq81eWNjsxL;uxtaIG}2H zIOGu9JH{Q3v|Jg=PaHu|S~4V`l4?kR+>jMO3c~zeNEETQ)^c!gm4uy)y#^C1pIG)6wsb!)88*_SQLYfQ^zAg9xr=4?bI5 z({-g$r$0d{bD|_#hFWLnMqxln*L1cj$Z&wBp*zI`x9tnpOJ>0jtM-`XP+&Q9kJ?9E z2q+D-30>wY4p^)!{M9(R3#d>MHyre&arSY@X8zWQw_4MD2J&1{WG}F#w1G5cgfX;6 zzt(#QBT*?RvzHzL5?3He7)$a1!Xr4DUE^|tv|~UJidzH|K#^b}Cl{##)jJihflXNF zCoH&m{2|Vg^ z=h}scl{eaY4TTiot`&0s@mlbdXl}OL*a4a@F0(xYM22h$+D-&tU6o;Xu)RQz0oEG- z;~hBWYekNcv;XZsA+H?$yU-vjf4Q*mxaJ7?tMX3-p@Mjj_=CEF#e$UyfdS$h2ep7& z$yNl3fKC^Xxj}odU6F3_t8h!bM5Uq8W0`4#%j#v3)WrbF7;Qo;b4Q9iNn z1cm~azhW2>^FkwX{{ zf32~{%#U(#skOi=u-6N5G>7j=8k&p8^si!^ zc?scAEM8VVG$gwI1;+U9VaK-1Dp5)lO1knFK`%q;F1$(h_V(M1Q>DSY6{i8v2N8Ch z|7M3RQVh}_!+erTXb?HcFaqkhEnmfbQgj2;G9_kx2lSG~GV(dHTa!!r1`rzBt;&0> zS4<0PH;Ns6sPrmRrkwUyKMri}vA$+n8G+4#J>aj(Y;3wbT!E!-Msf0*^`)5ZC#5wn zzjH!na*J?-t?#)G`NjE*7qQL21B(pt3vIZ+A*kScC**{#tzJP_g4~Cc0v$mTYSeu- zWu`@8Ih<1l%9khMg%-LIsI0H}AvRpdZ@U))txEZI>Da9e_$pNud|$;Z_K9xzNRn!6Fwg8lm8>ix&w#g@w?+@O7F}iS5e;-wi|AOSN@$(U$Tn z$JsKq;%gU~S7=Lzii57|cu~sl9B1QhQ$7sfiwm(#-L3SJl;1qg_H{$P)&qAneMQRG zj(q>|vkOw{FW)G|-7vRc$+wPkXs)@}){!;V&liO6t3zz# z>&Jv+#kbElxMeOw&Kn#j!oyOe={`;H}lc+3QWpak8V50n2T%1dOFpR_dnzLx)1lvUm!3d2EexaU&GyKDLy^I`=bwiQ`Z`ZGSV82p#Hao6ljo zrM30X!ee5ZCx{r~r+ehXfF<#A>UdA@aErc?c-()f>XRpq_vA9yxBA)-Ue)@{iQ}aO z_f}XR2GfxXV7E^k?+P{d>4j-yCUC3l;F!n4y};Ht7LluJzj)$!Pb>e$xIR3B7vH{m z%p-yMPL!eU4WWZ z)5JZkvb$g08l3!q@0hosU+7%PQY?cg%h8m%mt6Bx zQcfd40Ks$Nc=^_M#=jlEUvb#YT z#L}VkgCGs{{23{iu3;jTWD1|_dav1~tU3sW3^o!4a%7a!lgwf&pdMenm+6HN zpNSiVyc#nnp5UdGe(GFWTJ_ISpgIn;asmH23qrv$Nca3!nJS+LIy3485tu_k2cP2| zu3Q$+s}TO+;D?H5kT|M|BX>_#7oxA9XWBRdQMG|@a6WCe4g6M2fv0XbYxexGC1&%wH@x(C0WGYcNK|%XsD1`GjQ6Y*pV&lm!zAK6%JZts*d0_Mi#=^=>AOW?TM9j$s=Qg|J|Ig$Dv0 z(Zv^O`RV(Am^!4$+^F5LgrAobMcvNB=aEm-cP9r@Zs;%P$1U+?sXv_`f0hz(e35q0 zAK^9bg&BkQOj>-!OGKvQCj$g*q73p&X11%mS0Fg3*586-4YsfT2(skB@K>?jfG)L* z1E~EUgJcy4I*!b8PGL%5DiSJh2`F>tuAL6KCW)`l7AXg)+dA07y^oRru7B8CjUC*8FEkm zx|FkY*7^1-+(dc8`g9OpxH16Fsy0Zl(bT#h>XaL@N_#+v2-9IHAp#lA9nF^UDlNL4 z_&WZ!7MwR$5Ty)0q zz1Yb(qfo7d;R-cpwSv>*RR*Y>3VX-K9FJ@wye+HpG^Hkd-n~lDlJj6C!Ha;sgdU=b z@EP2tt6cSx;c1K121s+`97(+-Z^m3qXN8YN&2Z82hIlO%l!isE5Ltx*Cd=Fpmkw`m zRM`8D8jJKs4}jq~iI1}HfSG3x$y4EtE2ahjt(jQTD72DCS_bG{xY|3wmkp~8$Sb&! zv}H%Z<~EQkpws(~7ID>H9)km zr2DV>gJX}c+{=a!@3>N^y`ucr!6$%wg$Y(IXYAG(3V+fc2&uHr>GmIDo@b;|E#a!i z$HkfOOvb`QW0NYSk;(|xbJBkKDSlkSXuLPPNP-a22GohP;|<;6-WT5CRC&}aA+d0m zaC5*g9eSR|!uzfV4X|;gVI3+?I#oySQTK+=0ICQ8y!L?`d4FmJ3Nkg#Q~bBy#jqn# z$G<1#&C9G{x!(21?vd_^i+dZ$e#I9l?A(LS67K6zOuFEC_9YkdpbjfG#XBr+vjh*m zg%ss)fV*%ZA%dJX1>iVIU8=kJD}ER%MOQsPF5Vxv&xJ+@gN7s&q!s0~X&{JL68k_{ zm+7km5L;^9!1C7Gs|HcSl}=u-V`1m4uf=Uualp{jJnbLhCTMr}Mf~3v)`dmu0MgCi zs;I8-v6?)yFT&AfpC!FI^64$%AMru!m0*A3+W`jSD%XWMF_Ff?J?BCJ$R7&x!2X(m zbTqu(YsA#OEX8-^=o?n~WP${img&Ky5Z~K}2`m@_rVA8u$R2U6)9FH9%Pd2~A#&1M zq3DJioaUaG%GVDA53E!WUN!>njl;mh;Tr;oH(?Baco>K;gaN(~f%jwBe{`HY!s<3m z9(<2`KDdtkEh(Ru@k(}I_Tek6Y3HOn>=(b#D3buAf8T{bdhNJB)9tF8G?6Nm@?+L0 zwR`#TGO6|cqB{EjV*Na`_B$DPxTkSN#OidwkKy44KLv@{Q1%iwabIVR5ET)FQ z9NAXzR#;`sbQx9gXI#BHY53okMVCnAFC{jJF;?gQR?5$kE2_3kPbrl;@(v(_uv-Bn zg*(Eq2R05^T)ZtaK|2H^Id0b*POVz+?ZGhOQ;Gi!hcbWiE{FY@r$Zm(Prl+mm-3Sz z8BG3tVQKZ!;=<+X6LZg0m*;LQ%q%Ya!`y6j8UKA&h@WH2Og_NMr(f=mjW;^b8;M`R zsHG8d2SMPitJhaJ1uOjqxw9Cp<%JJln^{@CF&Bf?ZwRXy#_G4R6Iu4n#^@=`=)1A| zq<#LKl=GbLhM)8_V%~7G(%agcQ*_KO@k?aC^Y!a@vBRTMH!(O|1CD%L{L>m=@oiQ} zl}`E2YJ06tt?_#jj?_;Wi+HJ2m8}Lw34bjir+thE2``PZ&+ve=hmxiKJ{Bv}nA;L& z>yJ|IlGI${O;V#k1gs4m$XSLmI6(g_1^!?{l`x)4oM%b=AIiy8!d0$oGfG6co@R?X z*^r?qqkm2%WFGr6?4B@OK>UZT)TcNVVNsoS1FD8?poDuyHf?@_r9Y(Y@V*_{hH)wp zjXBiuNQ^zs`TVAe5c;nC$&?NjqQs!ZI{a&G96ppNWTg{x@aVgoaS1zYV*@FF0G1sI zX%1BvQdO_!iQK0X@)uJ+ug1dxn_^%!gmrDUXp61i|(D= zRYX&&dkgPP$UjZF7kI<_P~R|lD8OU9Ct`KJImLu~D73`sM0T;;Y2B_hI#BGu4hDr9 z?$1l_JTl=eE^z9;eRD6)Sb1hBoJnsK5q`QapnDUUn-r*O?j!d`>mWAM`@AKnX)&?{ z56)@bpOA0HGg?@&WKBlmY&yx+VW&8*zr1h5v0{B#E@+&tI3s0(P6@y)P%PskTkEjR zRNYMaib-;J{#aHi&Ujf`xEKdo9UyRQW^o^&P9jR_e#vfwC+*T;Rkh&J2pcdTky7b z+>v|02O8mC za|a%8WJFbN3+Ar3EH&^XxOF-sM#0A=jzN7<04&-ma)V^5J`CE4uvx{00+3}e8Jx!r zH~!&%0ko*{xjmVXD}*mjFy&3^sJm*w;~%&`$*``_*A_LcbcKhWhKOsY4-SDP+ga7U zNA$phpHo$eGWRs!#RU6T$c5Ag80{R5rtK<-Hu0nsPe!@saW&#Zdvrs?SkBo)D%x#J ztR`eXc!`ZFIi;zUw&c8eLUA82UmZJ&(N9hZgY#=RVBU?OAHbMfhEU} z)kG$kdd2l~EyA}%cg63r0u9^^xb0zp^d&C<5=^i>STq5fgKd-VsfWAzroGosK%MsEf&4LC}|4uQQ|!!uV0IM#H?3h zZWma<1uyG=c@^1U;bth#h)J*Hx!GD#llYSJUqdkVGw56w>u1wa&ogPEshd02uPJy zw%O@zCuH&eBG*58gd^keb|RZm0E-_rZ++ioF*}cdPGFe6c@8m+30W|ev1-yc&!>a$ zf=>yQcsLV$H|i;g@)OxnB}RRN@#E%&u~8)s{w)PqkK_(s{@^7~0P^4E4_^MAmOP1e zCJXPh_B*YI48hO26jd-3<)fLBf89N&y+3eYs_Xdj@OjW~+wR}#^llFla#km{zoykYmo0iWbQHn`Zo7@>6nb;SA;tESD<_0^xt`4Qx`SE=#XQ0gsxIHGtTtrG@uCupKzBDpNRI_9q>|i zwcR8pCV#clZr-LK*IAioV*rFb>H6FnN~bH^_}*+tCvLQ>3M#h9-k zcIJRJEW{ur(s_===-JG`5)pnb;ofZA1WNrlk#cGR-e9=l9^;8|>cP*hrW~GM9_HXK zA`+h;0ECQjr5{oaB5bY+ee&}O+0vq!2__^pvrYhuohs}i;D-U2Y+68s8inD}Kldh; z7a)1Tnk@|~pjqq(Fl8j-Obb*EkR~}tA_!gKCnBEi!SASnSU0}Os`}AEW0P+YhtP=; zBS$HF7qdR;29)#eg;+ZBs@Y&i*P!R774|2KfMyIi4Jsyuo3(t6A^0TJRx0c*r5&?$ zWq?E23sjG`E8@o?oQXsBgtZnF?KL1mk$!4I!B86QK`dz4iHFkC$uRaoxM-=wjW+F8 z1N@mfjpAC#ZE%sYJd5P;7ca)p7?}=YUSoxEx+CaK?z+M-R3X5F$PqR@dB^~@*{-VV z(FHE$9!VEDrB)j{91@(RCb9dI@|JtEdDzLz)dr5UfsJFrPK8M;f*nwv;3!T*`-sci z2cf&dYdugO0Q0naU}a%L!+(c&j8E#96EaIH6n>#0%FuAwv&qKXv9xD$>AkjnEh+cI4n zQQsRk)o5?DN=%Q7BtSt1mp-@M7ZVhU%4u-fs7r&YH@|YhtA%Y9QD_cgDfir=mt)ja z%X`k;vDdw)Y_Hkrdyiv?+iv;_PjxrDWX9OEdywp4I!wxG&35uhj@TA7I);d|P1}Q# z??Vd(G1+}1Uc@EJ>#75A1Ox-2gsif8w`12!UI!@!?MqPRlKgl&DRb0kL|TcLz-w9Q zmlH21#LLk!9qaFPZATHD{DM-E2$6-31<^QPWHyZ+Agg^D574~h0TDcG^X7+#E%6m< zfgdKot_biNRO*5yUd4wK{P2h+zK(~J{P1^34~mC0KTKNUH9VZ+hewfs2@iLPF=`VS zd=F1|t0$oFI-WA>2{^ogr_<^QNc<2_?@>>{;>UQpM?C?LxA2rzPeA0WxYt)b0Fk%x z>AmU+nEVV+?^91e<>z=B<0loGB%pX8#LfeiU*g;Q)e}(p6`nqzo`A}4@RU!cUs+B)v}a1SeDclcqO$f`8KFCQtHDn%X3UIFzM{O@gDuPny*v zIAQ#xDNWwZKWRRb8U9I=nLN!uX(p5J;h!{($$R)GOd?MhGeCAfc19>GoZ6xim%4Na+R`>rR_o`muzIPf+O(cRCG{7?7Cy z`UbW}8&pzS?A&>Bz@i`)aglBjYTKQGgGDSJ@USA2;EvskT3(9durlbce6!kqT=Ky! z4kFC@`dh+bg3xhfuU3dr)7e&MRGeQPzSs2uHrrwRd&FWBfR6^J)Fn)&%{{m;Z6H9p z-EiWABxKQb_%`OFapevOg=w>cJ4Rv++@B0Gm!U?1$7~YU{pKFGxQ0d@#N7UZI@7Mq!K;U^>DX6_Oou}Z!!Q8%XslHaCSA`pIR8LXu^Dlj z$z|yacBxR1HN6EMCHmKd80^O~N8HuC$~3(6gb*Ca+8p`~jn+OaxGb1ENX{nZH=aUu z^nm!ofKU+UtphPQw8lb>1D_RThYWqd{pS0{_Z}nK$#ASuERHmo+ctR#n(={vIAwmH zQ^L8nHhAyP2i{xZ0SW;`8-3NdCVCntGAx*8{L}Y&5zM2BmsaK`6_n`-5l4)1V3Bh zPA0>wl)rRfkZK!{M{)U?{`bE$1x1((cT^aA^lQm|!{bur_fZn~Z_(RSII1wpsfRJ1n%GqZILputt`ILR4c2ggtrMQE2mU zvGTyfl#H~c8bDjn{<8FemO%}nxDW3eN*)a*%p~2=MX1YnqjG`!SAS1)|v){5!r|j zdxwLg*fOo}h$3`@d@(uq}^L3KRXdNiWs110EsqvZJSpV zdh~AEIvGw75CdN|OZRqGgUudb*^KCBI@)xk4KzKaXv?$=Mc4tF-DmKRW1~40<|;yX zqbo|w%BtIacYsX8OaKqDu4B|O;nLkah4N7R4KHLQZ`~o z7^1U0#4a34krvl5MhG&$LTD^TA9`T4rj*!9nH9V6z3E>~$`{NrV&26ItOxFpERlCY z*l|3PoX~U!U7JRP2Ta{In1H`%7rhl}`JLKg`xD`D!+oIjsl`LnEtu~kn(PD5T+yAg zl$70-5tAikd`FVuWf(&5$d=*Nz%m57VFOM|8E~FVW?sw=Y! zCRHArf`uGrYd0@2yxDrSJ5{ICLTF2;y$Vexc>}@XxU64InICkJAYUjh67A`T779De z!-5QVIp;x3-gHa$mfN*163z6NagPYJw;^q32nP&bi?~|&v^Ter)C{g%J;WAJKBPL_ ztt>gM)?S;=O@4LOk}G=gncK0JsVMNVz7f>djR1^x`}7%}L(o>X>w8sqFrls=w2&ti z7v6TsGt7C2x~G5BFu1Nw2htNwky>HU8A6W;HM&w0NuyyX3UOD-+9&6_*=e*b3gYz zod1pQ;o;x=9wsD=@dm(!)4qpC?!$v1{1dgLz#q)P&q+He@F!0ENlv;58~h4h1McGm!XRQs9pZyiNsPrvl_=fC6t&fgdIX{$RTmY zLLNC);9e?lFBKpM2oxX^N!)J<{4s|7-;PEc4fM zmTP8NuWdTj7F>V*47N!$oEbyjyxOKEOK>9N@EN-?RBVkXE4VH;=_%Yg1u+zfUy&cI z+S!0@xJ6RyC=ob(l7~P5>PqO9vd$tR0eSOx;JP^!&;46ZgjH*?O&!_svtVUzX(mhO z;RAzI?b1b){z>7BRBmNI3ZVdmT-zp3^k`z(Jk^6kZWd8m_{AYtA)7Wq0P=x^vtwX+ zdbO*Tymbi)j6i9N;~Y+9wLCBq?0MNXvW5iZ3|YI~E1gu-AO#Dc2#?7|Zns}U(Wtw>rt8t4dA^e&o2 z_YfT&o^3Z3cJGaAJE!zcnEhb{lBEkEh7WYnO$9l;OrD%H>m!!fi7>~gu)^3ZYP}fY z&Lj>}9sA27i|D`bl8GpmVz5SM+}y<2bs{ii$;~h`L<5lytIG7ylU+gM*|y&ZA>0wE(drVk+E&}YYjLG$AT=FuReR#UEy`iLXL(4sAYOa z#xq>>f;^=Yl-80q7fw<7Bm@~HzC}}%PEkocrnHTWDqAEefkxL^MaEtiq7o#^^il00 zai5obpUDw`;lzMh+2pXVDi!Cf9(>{bGgdHnsme-vcR0S@HwHA&IBkdztJK&ynj?gKI-Ea(bEl%pw08oS z!#AhqV))jv|2gxXuxT>f3R+&`F=uBu%<6WNrwd$)_kftdsmoLVLV^A+?upoyiF!j& z0DaznTB)AFmdk2Iq-^s~l*oq7pV6uSsFQ#r(+ndTyZk0;8a>)Oi^LmRWGm@jRy(emx}hi;SNS2qMfbKTSO8fK%h!_(PG;}%3im? zIVoR((5uJhGJm*%iZMD)@xE}X-Qn#5t7$bE-k`=&_gI+R!j%AMvDWw~^hD~sYCtXP zAZ1X@O1U?zw1}w(a32q29U{TlA@kAp1u4I)X~Q>gL1GW8jwqM%_k$eSJ~#l)qtUHg zwbH|w+u|j|YWiKi)8#90)YtM*z}Fit;5Y0$wO+#^8^M#q0UtJD@9F_TL3guXuHI)3 z2Y#MGtw@QIhu1~d&Cl8A~snsh=Tp+ zMTY#W=@L5%jG>`;4*ptH$WLR&bs4+a*m4)?AmGY`>s|bw$(eR-&;N|{LR4^O9a~hh zjce8RDW9*Yl0F!Sta@(0ZYfluvnE~cU_@!(S_&>C6W3T+WFPEvyV#iZ@AJFZiuLb@ zcd-NO-xIrNQ2)NLOZgL2-A8sQ8fq_~L;O=jhxjMfA%4QsA>vjaY`2($xV@^Vtx&j^ z0G31WPBq-sz*(q}tPR?xT_m2R{1G~Z7wrOM?t}NWDtuMSMI8uAo+jQdF^w?cI;UH% zZu8xOpR(k~XLVjUvcAS~kde!VU0c>o1j*taJ%s5t9n!zKe4be!Q(k&19poR;2*pCc z61jyD!X|VW;EC|n!b3m+y7nQ*eyAPABbY|EEM-?lU0hkhY59iLgwip1;!=6kn{HFM z9%6*l%nxwH3~fCXX0gL{0dF3`ct}xj2PZzwKm!LKAVLdSzx^k~^V7cz4R`KOgr$;b zZNO~kA>%1#$?E`!jh1lL7vobz=jx`AwT-a2QcWL32Y#)Q0wgS9Y_ScrUZx*uTs z9|2HC7h!C5A~sk^R7T1$>`Xke5;1dN-rx>^TW1?pWHmAo9*g`zx#y6AnYj&ILqtE#I!*PgnD~JbytzBHv#zQ9s(!X2hf~c@Om&mq2-2&abiiI zY3BS0xvPZg1ElMBWdQ95bEwmk0RW(79*`=S)*3Ff^b7^>a9kq!Qhngns3@mT_8_Za z?T#K5D{T7HOICSr)#&gU;}){WhvCphiA0r+7on@w*@b54Yf+j4F_1&<*xU^cFGM7~Cf>*uM19G`yb;j}Ce-I5C#azEbWysbMA z!&?kqR86jcFW?>(Wi%Tv!KuqF#Bg8{g(l)9%cOEFu@5Pi&zk}=O)4Z9C@A@OG{>Y6 z1riG=^%wF__#F|2c-cx*j>wyCFG855(@!Cf#TP-YJLe;43-pj1oQ?JgNPp2Feg2&$ zwEQwoPLq=o2`#@o1fZ`>D5>RF&|L!nat0^047?M8C!N$X@Ge*)_@t9s9=Lq4HiRfj zYWWUp2kYsimPZ0B2w5k!JO;?Yc63t9V{a$eD#X~YxKtIF)UtS(q?WIOUcKy#he&1_ zs;IWh(mqKnLzRv^c_s1$S@M%l+qK(XW}~UWWSKS_r@#8}`6*nqiMy9arm*}bqUQoB zEMLQt^rf&AuUZ+}fzmtY{X>_{%(VAN{Xwz7$f0r|OrS_GNgkm{@RCZRc5L>h={x8f z8zYIOMGB|MU}q_fQ(9$ln(&f1ebYtQ?UPLUJ3CPjR#@{AE)57b%{%zbK|=+OD+(tS)^x?!0W`kBmbGWw zP|9Nb;NTwU)rqi;lt6_l0M1JAHKu?fc><75hK)h7RRD`AW)t4m-D(eRmpqfWgdU;I zaK$$uW8&x1*0(||JWw452ko$rKjlDos zOI)kdxm~0AGreH~x;uQO_pn-ksNy2v{-Re_r{}Q4jEak(z+s3x0Vn=UYyd<&1T>)T zy$yU;$cEvb4(s*^Ya)9OGXst^4+C7l)a5K5rtjnKC1%LYiX@Gnk4|E+BEWr%8gbtu zyA~+7U2hFo6I`p;?Jg&)4z(0RGxu137}4B*fPo2b3b+LwK`n@uX?6NRqJMAL36KyE z6bB4;k0A{Xt}RuCN2M~yxbP!nZnz15iY-DuZ` z*LCr`-dH?CH2{g1c#r$L)7yYO0O?gQhBXM3p`O1#Zcz`b3CQf)LgY8- zlIuYgyT*WyHaOn~djEkq*Od5rfXatU2)JJgb;!WQty60I!6DMbnG`%3^VYvcDa|*U zL!p?F-|B65s~xCaaJH)q7yUjIQ$Aw8KW^k>s{!UM>IHv9)_8aqcxDEI=raiZRal=q zq#|H4-7!q$VQY4gd=DFxaXkuw{p&c|i?0jFOeg%6ys+AKOEDESgdO3u3XDP_j!uSF z1#D&oBLz6vAxec0#4&#(Dg*v2?tsyB(-Db2z?ZbyCJ#vP8>&aaP2_)sHP#0Ng7!Y` z7WI#np|8k#En06z2{Y0oe|5CMYk&&{`vfK7h)z8iw+0RZ1ucHT?G?3X&>6kv{>J*3 zAzd2@1FiAN-`&}uU_fG4d`m5ORR6EIqdHg-;9el)O$6sVkOTg=_0Q3c><16+@)5JX z*M+8#m;>C~0I2|>oUCM3tL7El@Cunnl;h5rVO0T|*}0mt*REG7f|3S_NPAn8@%Jn_ zKSN(HsgFziO*|CG-o-&d3(S_=e3?QAUeG?^uUm3b-LlZ>X~2~@7ClrMFj;W$IQR7$ z(nunSyc!DMruVmT!b7wkAo9-SeE~2qeZ8jUqZMGEZ|Zp5?liPI;PVuE1=LYaVV9#gT6|WC%cPg~N z!iy3PJ8xhgpqRkGa)tBW8y129e~2vM2L?V700Bp-$*Z+pTyoOs?Ja>}bjX~q0wl#0 zysPTB7dxAD@d`@0pAuq{KV1W5@7Vq?NwKs9re(|Kt;~gN34Mi)g*$+DHc*6fB;c4! ziyuR{)bGf0hdYjxsy4+%30rdL;i7M;qVz6M^aL(=t2x^UUBi7ew^e75lO3Spb7~Au zzRSpV9tpGvlaE0fT2i_r6}u#S$b@)nBmfr=+*hmjXVfpuXlo|{czd*ZE$3{ZrA9=r zCXR;Ge>S@HV$;aE$A!SpMIOTIwI6tjKK zg06%V-?gcE=s)b99@oUH)eeLB3!zp$_Y73`zf{(cdKzyDRtp1ks4iNsJEagG^3q~$ahX_GMt5! zTx0v=tkRTV!NMCDBe87vg`6M?hgd<1BSgs{CK^zL_!Vs@zd@$|q1#E0lIz%wsZb|y zVRLP-)u}b)Z>=)2vbVfPC{ZeXprc(K#NNFax=vp$ZE z^>-MFlj+~%Dg!H%Q$@zOM3xF*nTtOTZ8_Wxw5j)0@#mof8@!Z0cr&t0$$6(2y;51G zyepOU_h7}~mC7lkB}kk~iBqXz+alaR0<>k(#ow4fxLj#!JDrkUjy%DY9v%(eu5BCm}Z=a09S4~2b!JJLwnE|ik#{T z9OoNIk>3Nho!*%g;uKBKX5H7^jWRhVG}*`0c_1a1+;XY`T1l{?pBakCqFccOtWYS@ zdg#^Q7livXaRWF4%ajsIt;umocW@WzViX#edsE~*uYOZmx`&hn5E$9idLZir>+Z?L za9n1|uMhypDiC-xPC*V>O3;LN`ffRIiQSi?m`Bx;x58wRk)@5ot+V87naw2B&ix=# zo@Ace%V7K%5pi#77{4`c`bZkU+|ppZ)vVJ3-GiT&OYY|NeFp;*r2k z^X_Y3SqdTy&C3PQw{}ws&J0#wk!F&$;0m|i?X095;vd8~u+oAKEs)XvxB5&db8t<1_TaOJ2J%o!K{=Q5pgfdHuep35 znK68q(k@=tx|Mk-0`>4&ScS3%hZVZPOKaTB+GN&aLM|b{htqFdyvS#TIy-PooTDxE zp_I6g^5+hDG!^l9eG~=34?cPb!ZXJR);FytS{c6hZ1LD3KzZ{U0y0DR&!xoNP$FJr z$_Z}VxLUNZ0R1|=CgBA&~qb ztM-+k&M_V;q?4HTXpbJ&9(@aL-C<>0v?Z#8mRkA?RhF^Z@}*gP}>3E;S>K66TRI@%636v?m}GX@yim{+frGEiOS3RyGM zeJiY*j#i=}rToYyr64abW`lTW5%m#z6GJDd@bHWPNbPkyw=rk!0UgvK=$1STgLWd^ z@CeA%Fe?o}FQlDkMGreB>zh%tPJg?<4Mq|g9bU+;*a?nfKVj}<7?TlA0TX>W3)=+9 zx{jlpNDzBY9~q5emJP@I;!`Ynro$R#HO)hyqxqvz(QFUh;bMjmVq{KvBp9_RGD;8D zDe_f`j(H+SWR~ylUm2NV#OPy3^V{HwDQ0(Uw-LqgtMO$E1ZnL6TnN|(w z+z5QtJU!bWjD{e*iO08&Fw>sYqraOxOZes*( zHuk`1&10x8D}yV9(nNTRj6wihoxGZESZ=e)Jm#n=lOr4k)i0A_bAh55 z4>sDnrQT_IMj7eJ@Ne;T=Vbjh0*w{6%@3(bqaO2#hbjs+6&~|pRSB#bF?IE`-#Y>N zicupkC;Wv?e@=v39tPbTB?hC4scFSl6Q!bfk{^$wbYz0{?8{_i(=&H6eyk(y)1Z)| z2ucBGtLp5*X{=OrZuVPe9(rYrOm0CL!p_$??*NupGu8^D{9@Y zH9BAh;G_k!k>@AkxEL24q>k8vd=f>y3)2rWF}v=7blE0lDq)>>T23^K*CAAB8=nE2 zLos7ol3Jp7P^?Vh`jRT#uqfpiz50}t(}+@i!rr@1FS!^*zL0Z?%~i+<>hw{|{dg z=NqF)b{JTEbgCd!%sO{!T{tHM(N)Rcd_a=nvW12+Q z$hyz#?evQ&i7Yj}+K1KdI@8;P*)Oas7zr99uoY8)WtBlUyhq81LoeNr7DQWD1>jFc z0n;TWu|BhIjqPJ|$!nOoe9QpUNa zCyHhaZ^;zm_~n!e*vC(p?z=TqyLizJyuMlArV9nX6w}oxd^FwSrajr-H^D90Yhz{k!6)tjBh#o85}0AbCNM7g50Dyk0xxuI;&0%F60pF zbU)RFj6YAwt=SG75bQaXlP5p{h{|rvL*aGJzH?bAN3KJSbVG%Y&~51)`C;OY=?v>;wFuLvTin^WHO$aBvVSGONbzO2eRyoS6}n^j?^m2YbrV88R=%9q|Otcd#*d zbOc^qZwRd>{JegPP5NoRP;-$U#rwp>4Nly*Jm_^13@XOp4s9!vpNE%0ixQt!;UT*8QK3b7HCvN0N4B`jH{3@<)4uTOM5;&!F{+#o^{5ioB&JwSIZ6>!0Z@_Vm zzDDQhcT(azaS;4-1N{xe@b6)}=OLk!D}yYGuVa#~4BDGb6F~b^NJ(qRW6> zwcS)cKF=DcXkL$l8)zCHFbb0v(gY!~Saxvk{3MR{^0iLe`|t)#C8`IM?HF1y(*L{> z2RvLXUtERj#0DP%wH|OcLT=C>y4;VCbI4|| z4Zx-ew9LC`lrxb+M=f9_Vh5uu@5GP6u4%`#5^i(A{YG?@;8ahDye3%knVrPVc;u6- zUy(=1j{}ZYZ$%xg-U5wbkm(;Qoqanc-gbvu=R6!!i%xD8uJ72r4Mc1J{fSlF3y6qe z^6SKqOR=_UZV1%duA5;hAsX&Cvt7C$lVUb-T3(^ivBXy3<+V;9`a!$bZ-V2%a2GGt z^tlUGV@j(IU63b*A`aBL!pXPOV&w{Q4A_m8j$wg#@Wm-Hg+k_hp!8Wd*yjx(I7h*o zf_7qYw^+f+gjj0lDg}RVsPHnRV383w!3Q8#kG&UY{qxm?7?IPW$c@p#FWw_ct8HXe z;1pfr9x=Y!zTJi}$h(-xib;dtEL?!#x^_lPqan4w8qMf?#Uzl`2g4QY&)9RvS2`Uy zjp62ZoP^kN^|q!XLhcodt8E;o*nAtUP?lGHFK`tPX>1Eu4ilm8~Z7^vR1P&@G;*u{L7fAwi zLXdbtH2QM|YO=u`rAhNR5nwPWz5$Ca4^=q^sNvgw#4lZf_3f`Q98kJ2OB)0dXGRyD z5ZR}jEsVmi;E_bXynUEf$FJg=h?GlbW_W3j;h*ap@mun5u+I~G|F(<&_E3hG>||I z3EV&fw@^a@@9+Ptwf4vPkTkZ_d;7iy*(2?}_WF3%v!3;QKf0UVI3B%`ep`_7Tp#h@ zb_;jEJ+g4u-SPn8uDfZsa5sRBN`Kv;=RLZlJWwL`U^05fC$(< zy#n9en=HR^gC3r#A@pv1f59!4Q2KXyR3z#a(r`+VkT#&x z+tp^L2VbWV_#4~Rt>Bb(1d*+O_d#Uq1wjw)A0)E%@BF9$xmS{pZh3z-V@loiJBz;j zMyvmR2PwMm*!|_P( zsYYm`yVF5~&26Y+6+U|(%&F0QtvY+rXl5_|OSIySNcU>{pN;<-T{L08*gBeth@ynl z>{1pXY{d&hxg4txNq?l1=s9!(DVz1q?bhz|`$L7?m~+yZdY*kS;qIX!|1Fw9HhA99 zgy8(D1i0=)S#~8;U=@bCRl9!@&B2Hr)`720();hBjg6v|Jm*z7 z_9}Wfnp@gxRDC6jewl+S+U}idg9@wl4H830FI7-Mb(6f<=Y4LOGJEhLeOCkt=#$d8 zTO|_@_fg5j2=+tAhoj@eeR}9s$&gbyQ?E!RGYXx~^ZwCjzm5t`j;1=fXSk2*@HYLclQHAy$s?x!XhNNx{Plg#iU=nu)!f&5(W08^)%`j64PvJ78p zw6}#sQn+|M%>^_a+hCUIyzY-yJbU?p*4|bvRmA;~F&x3RgtmDBeGd5&TDwl86ir7{ zPqdavFc3Wu&5Cq0@+C4F{IR>soNDhsGl>@NG@<%uS?Vg+4LXAd?c(vKAXESRm;Q>S z|Jq-%lyPS>nPTao{)(ml7A<>48w?S-RLr*UClN>TZi8hX8g_B64-aQ?t`DW8W;Q$2 zsABtaK_`df7jslVsSncAuPwV+S3rKAKRVhMlSQ6say!o{#ds8e27w=oPTuvpdviuV ztSjrGVOYyRXuCPgczpWm9){GmjO|X{n?&y!jz87A{y^;vaU2Mug;l(VDKt>8dA9ec zpAydcp0{Cv?=8?)7@tz8^EGjmYFA<|jJ7_S0-%ooPJnElE$n5V`Wu9(R&>XkWivdF zmQvb%bd_ZH1(&KM&mj`@swB_#8=|Kjsm!}ol07WR1^Ap^mECs=|PeLwM&( zx9MM)PwmnAn=}n@=m(|mg?{tzoyUP1&r9is9!=w!?GQKZlfwhuipy2!*U}s0IzFe^ zO8*)gVa;dyW?_9oIOFr?OXySKx{xwj_PQ_jI49;t!Ix?Lx+=e$KjJmWnf!rd;ydN% zk#;=42gs{R*Ift%#UfxM|^`EnSNS? zIdugx6yLvXPFmL>aKoe{cxLd9&TQlhX3AAp54S)b!s8p&9c+kQtDkpp z#gNfxsa8?%e#UbK*@Ie)W9}Y+HDzSn26>HkpBs)Zdb6MDniWT1-$nVJJX?gnTLA!7 z~fPC zO1eDgLkDy=tv*RV6~(DLWT$OpAN(4 zz@H0cJ^;T;J>(+AW%bKQZ;wysa|L#x+AE4xohVivF3pm~#79Os?SMOhcvnoHt66@j zB>LNUvF?69eL5uHiKef*^i%zl^TaS&8?|;diGD(*v$}pwzlBw)7be)~onXUFuu+)c zLh-y7=J?1^d_J9|*5I>&<>ndp&zY4?^>qlHpK8_vv)vv{br;YtStyvx&fXIyFi9RH zHP8h~5^JtC=jE&$tJ_67>h|*<{3)0cIwlBmr>o;0_vqp!jo-;`=LPh(3fH=r#Tg)v zV94+BHutmWGY+$OcCQ&`dEnZ53YZS~PFkT z9<_!RK~(#Fd+hZN_dRxfMvrgLF@0fpVD+;uyc)1orRlRS4GBWc#1rH(kbY%vczkvT zYQp62Y;5;nx~WmLiGRyXx( z@upVyfM}8Gon|yz13~Z-o;c!&dBfkK)AN3D`@?aqFgqg@OExZxSislM&0-DLi0u$X z-d$R-Yr;Yt%v_4Wva$(nirfC5x|W{fHDKbbX}WI8W_0UeZ$B~|f3pBR?d{?!Rr6Ge zidsK^ar$)L!ybtCl?jh^2depz7rNERsJO>u-EdS2t(rsZ+ZH=T%Q znUP0PVmLlg#J8TV8L#FZ;x1RkyG-XGj7zCKSA944jG`mwJrkM@gg<$AZsUQSGU6Tg zGWCuO$a=T3Jfnl?V=59uRmoH0h!t|ISuE+8rM?U|Fo#r|xL)sgkKOsu7;x z{=j!FSjxt_;|T*QhmYupc*1HkM_d1$f$T)jEmB+#D|~yHh5ca*j9MvP)$Wc9F;U;Z z^)4+W8eX|@D0FX&X&F)f3LVu)T(5_RTYVIM@t|<4PwV}FaI237CDyz9hFg7n_|R~x zk4wS($>HdeX-@@LykdOVJKbHma+JQ3#v#_Jpy}t21AtG;UxYbL;?}S?|zY}iN z$EVp?&8o5TC=*?_Sz{-TfTG==eD8!?4e%2l1W+$u^^Z?GAX2Emd*9n1ZpE#1c(_&H zMn`e>>miN*hlE?b9%tIf5jJ`EBYN@cyqiJqj!AaQHMqE_`%8s1I2@n%Q5P;W!>47#)<#ifbH^YxrV8dc-=rwnEZQm3u2Bh| z_ok6G#Sh=MBooB8A8kOKq;8TrH#d~`2APPb$tr3=+r=<~oKskLTISw)ylo20FAg7= zSSl+u_w>@unUHL!B-*nWj^WVkEgxty~j*-=A zps%kCk1u=VFfGHHqJDZXW8Aw?k$l;;Qc&rqF(%1y1=LNWs_a4-$0pRn*SKsSZ``TZ zu2~j{f$mIGdplHW0^QzJzj1fJt~d4&|DtV>i!|Mb&3CA~5BKHUh6i689zTVX38h;* zo7;5~mdxD{T-J74jb^6+BixjI(u{B5GwU}+rK#3bAgo_{-VzRg7VB@5F8^DD9ZHrPH9Q_vD{Z?$ zB0W+#_26QO=u4Kmz`8w2- zo&BA9dvX;-*{6z*>fFXtldCQ2Y(@A@PgM8oZ9M4g1t+{&-Ov3=#RbcWkv53FH#~mE z4|RJJp936 zW_o<*XUui}wSude6;9GD%-=r`gJeQ;VPVW>hQrgb5a=Hb$M!smC+kXFQ;Sc9sap?Z z6B!;Sm$SL$bU2HY-P`vk+hGLIijoUBt5A8iMZdy^1=5A{E9>?A#VPl$x)pegQ)Hkk zhgOyHRZB6|yqUyjuJ6@u;sOLQCoiXHXG{^MGzs%u`2w&?{^Rxp z(xw!Nm)xoeYj8uk30|+)o9P^C6$0s0<3#v;==jr?-M!v#2FH@GFQwos-^Sx**Z2G9 ze(>AmcX6rE>$S?HVyq#SbJz9nnn9w^y5ypw>2okzd%HcWu#Z^*74gLWu~)nPR|>w{ z4)y8tc=B)@b{B}W%gXc8Cauk%yTix%>u@lu+kz**Ry$?&+AeDdLUub1wh<38x5Jfb zAMC`XNmg=L;a=<*9qih19U?z?Oxd1Xndr~`KTLt$WW zcwzOGnbG1k!7NEQUHFvF{8f&1byauVO52p>L< zcxhR}`L!FnEqvbk1#isM@9ZcKX0?9-q|xM?4(`T69uEC8*|MK%!Ja_DoS%Ae(PK$x ziL>nY%y+A^cgsGiK(-s4>wcfcNL%|#$OZQ^7uUpjL*uuJ@c_x`fj@9ogZ(*?T;yQ8 zwrr46?+Ibmn6F*r;9DGGJb5`A;)Z44GKxtENcnmlLIV59mog5CfU6|VqvW)HTD7d`b+ATL|SKW85 z+@9Aehu-8r9X_x~UM9d5?lI$RCg5y*d0op9~_?NS*q*T~Dyg(TFuZdHma<@LWzpU;(*BHrqmKDWM{ z4o%SM)*iU|w$3O{zTZ6~U#X0%>hL+Kc1DdVq~mV|N<+!t@TI ziG}4GEKJLZ$+3%VOFggu)vh;JuD0y87VR7k`oyI$6oG@_K%_W*IOhFa;$NuSva_oY zS%`VNbnDN~r2FVm=q_tGpUKs5F4RH>Bl)3kL3!w!m^sdZSS5cImGQWPt&`#dJW%`rlyg1wdY%K)uh%&1 zRcGjky{@=PTKe~^z8D0Nl{q{bO8yZP)jWMJ`mE=6_@Muc=izfTTVlJRq4_?K3GKxk z6laRtE$H8O_47+6`I$bcR?7FqUKPv2CdogG#_v|MiJIoHR_?UQUUvq!3?*vbEQ>`T z(RL2bi@BPI%G6zo9vDy(I|roWrE9Tx4&|I`y20znU|ev@?AH(@Ba)u_`r2IB;-?-j z1H+ByZPDTdT?fVkn4k5QAkXadkKz7$h7o7NOhdNmBTaR5|*+_1WMVDdlEqQhM z`o7&PLY5w})Q=YFVn9~GIll!#Z zJnK@4`xG`@Q6X!04m)y5!1GVva*e?qO`v@K%B2;sh_s;fEjSo(9nPv&Aw)Bs9R!#N zSP5S9*R9B_i)hME=HU8t$;lY@uir>zLPt7bSNt8aYu7uMx(%wA{xEPVJNt#1rKo#k zuu=V|ci91DE2sQ^D6RUNU+=MGrLa~j4Opu@oy*()cx!i~u8I6xZh4Y?wR;q_S86!-XPn7lutxRhiDqq!J`NmHTN{T%+edBQhqk$ob`TlE^QqGSDt+? zj89mQW1{N>E?N-T=2hz6^|QFnZO<(uoz{-xc$$a>l1 zuE{yI<+IPNqjW^mK_=RyN3GwpJF zQ)y~YjS<*GI{)4B^*xf_mRsOpYbVu-8dD-J*fo!1P_iSIYS(6KccNJ@$|!8IOMBBy zf|c^B^s0U&SZEsj#?{ky1Jprs8&n$DdRY|u)r#qI~{I^H!t_NdWDSOn#p;oRvNN)U8Pps&Y*9~Ep|>t z5OcFUcDN4y_+T&<%9-VWQ(Az-&IJRL`!1i^qkp|I6d>Zf*Z(r#^ttsiNNaV>q<5}N zS+6MH`T=cFnY4MQf_^LI(BcKuoya>-2-}t3l4~8Ach;QBwCC;kdmxx8>wjD4nnT2G zh_(ghA3{a!exte9+T(=QxhQXx4GLa)4(rR0b>I%(x%hGADnV0WDqg{;+Ju|Y9D~|6 zOtnBoq-Wf%a^KYNU_}zo>@S|m*RPUG9omxXQggIrb$5CA!5aZpbUZ3u5clZwuaqs69R^i4lUryU+i1G@Pq{Hn_aJaM zBIwEHZH^P_+>Wzr7?J|7`(oqD(oZb=Nntw!y?tS?THD>DDuCCqYZqNc8mSlkN*%*U z;UoVl7)H7vk$gM15;MS5%1c;V%&foxLREpF+zdz|n}@?>@*ISb)3tLTq*aUvH;x|l`G`YF(d_2DRNd+DTC=RHu*D$==aDZWUm+UIT9d%#K%~AL zNR)iaz2@E#gwupjI<^~CGA)vbq%sGl`}|1|>wZiLS+$@74z@YI10QC?#h#lo*~xY3 z??&aK0>QV?H_3Qj+pXVzTLv3SUJ3m{Cn1*M?&JD(SF)vsYVB5*S5Od8$#ZMpRc#so zv}2`*4HJ|&OE(9-X!W2bR&mp$a==_aVtpds!pcAZE|aPZ#3I#O^&6dUnz_|+ zXLZ@}ylET4QicycZ`6kW|Aak^(!iA9v+}jfRu|r85LQ;#<2QclU*AED_}-I(v_Y zI_dtnDC10U6sb&|Bdybbg_DLreRFe=f5K;=%b}J4l2H$(hY~a|A$54segLxdqjTMf zqe{v85=M>fRyIJ8?H8B0b*Zrft9+%}XyaYir$d719ph+JJnKa6cm{~|@cH_o+QfSY z(}}JOF}>P?iPe>mKu2K5HfxEB3d-{+K`_s55YyQDc5I%B#7e-EYohyVbv5MC8Q3uv zgabNG6Y6wzysq@4`AN6WqKmvK94X}f8A|>^*kOSsI3Q&raW-SkQzj{I4q-3Uj|M1A ze!u|71`UwSy#D})?&y6ZeX{f9Nc^)iOMzPeyD;C03%q|MULjw}>C;;f|90o}X>5gh zj#}r-=R)pqoj^{-(`PRQlbqdWDf3a8xXM zD)S|M%6WOL;g`D9GZSfdD^!rf0Bx>25FM)yf*Nk%l+qG)b6LsKq48&8j5oXcB0bgv zzgVS2+?6&P8=K`?3rPSA5Ez0B7nmGsx^n>0Y47g)`&>40s4=W|m4Z#>>b2ND5D~Lx z2Ee8?HMt%j{?3}7`;sS6)+)&|ceWblB^9PNhX!>g48VoqJI<`LWUP0KxPn?}pR_nO zviUdkDbjlHaITKevC?yK7a&rEPaz`Z6LW)asO=k9)2ZUSd=u6Owbwd-)FmMs7}o_B zlaJaj!dd2kW=U+cFbrI<5?fo9GL|@HaD<2GJL7rp>t?bT3CZ>r@JBIc#oUtwHta|X zaJym4FfwWr9XLUN@MXKYx#}$0FxxILc!M2`NzO;2a>iD&f0SjKe|#v-uDBPc z_XwocHTfrZUd3D?hRDxQUCP3zEt0bt?2yEn4B^2sxP;0@2W*%X+ZgkWd@C3S=qylP+!eKtm&1Lr77P)C3tyDD8qWFa zrR<1CAZ{5ikdj78(85qRpEN;N(DkHW>N>d=Ypw1+F`hom%8{ZlmYi)xY;U5fgOUah zge{$>Ij5DMt%3Beo|9t^Kav=p1s1LWFEIfe49Q|(l!jTmHSvtNouS}0&602hckDLx z3ih9gorxvgOVbT#nRut7&##m(RhxLKmv2fURH*@Zk%9&C{?{$a0`Z8t&Ls9}V^l_> zA@zLf$QYHBEm-A-Cb^cIUy&^sOTK?4Fg^hRJ!a+j0E|sSEbl~!lG1XitWq7AX%gB% z)6MyK;=Cd)4mg`xs>S{(s7@r`Hm@-A70o+?Wjn=PVsFc+ymuj{=DCd$$}@f>8W4fvlI$dDW`g^00^u{DVF!)(Wm{C zi|fCq^j?k)dWg`a5^USbOfM1$XSNnE59u&6r}Pr&Y=Z7L;h39$i=7i6K*F_(H=k^^ zkU>N3JU&-eYzOyOtGloRNE$WWh}?%^>^^JhhtocO;sN+v_SeNu{2pxLl6Pkc-FZ%b zQ`ns@)~!m~2UWV>v2&&i-k-^G3w@vIC%{Cz>OUMdOh+3!1xM?dTqr`LQ<1+J*&E%W zE?Gbp=%SV7b_v&O@}?NLyAr74z-Q;Ocx-?Fceb2wvXP2`(;`_=3M&?)Km;iTB_6_= zv9py`f4@BG%6|GK+^sY=F@5c=+%AF-dEm3TrsU$C>jk~p@9KJ4DDM41T7iBjOrC7d zWv%%Q>~p+VT%uJt8bxgRc7u7hd&i%96NuDehH@8JfER z!yhD%#vzC;gMe}9Qu`Qm?DDm{xy-6X0mJh8K&M?<_mt30Tb4?YOn#7W>%=EZ4;^*l zI20MkjkV~zf`$D4;(@F(ST2eNy|9$>eU9e@F_P_Wmg&Cakysyt7YN4|K4RFC?c_H9kQ}|Tx%6y$QcIcACW>Y+SP3(|DCJ+kzDzpaMb!lq5Smc! zEH#z zSC^d5*3B?VuEqX=ln5IZ))~|Rfl-olC9=BiTl$V#yX)oIy*Bh6DF(}#(F(^}ovh6G zMq=vka>jE`&$NbCwwA#=CeYeyc!m7Jak3g_4&B)aK~t6UnKJKOlf%3BCZ;ebuSa}p zJ7~P+W|B*~F_e5N%qC@GEd0{z)odaa>ayLeUm<{BK3`stAGmR*D=p;uIF_s$%dR9K zrs_eGmAH8*c0V{WQ4F;9NFK;~yDxIYlQWN1YmeK$$`_BIEZkpIXMjqtsk9LdMY9>m z^GD=ZH2F*e#|6qrMh}e)&a{z3_;D9Tc!g`%Tf4iHV|0Z{_RF^sWu3?u5zAY5CXB95 zav!87#95;*Yd+OS*9YURty(e3M?4OLU3_$ec=?kf2c^2m!6jK<4w))exsIg7!~PS; z=cG|c)qh;!_&B-4+LONm#)oI5>)wzgDsB8xFz4aHM#zELDsuBKEnM&^EgaVO&ovPx zCP;^*7RFRCKgn_mB2iRx>X#&hH|A`e#24$81@G3K?pt4{hH~h-$A4i$@?y`^k`z(W zTA}d~cVq51y8CQUcRvQZaCtp+ZoZEql#;dlx9O)3#Gx7FRJB&cfURrv13xpuORI+i z91cJ1kBpS&eO3kY*`Hj2L&P6dhm6l7Rj!dT&?fPhZ6E*cXVnwqxO6Azj0K8%8@6BOrb6MXAa+PM_9oid?X`_oweB z4Z)1HYT^#{=tx}4a)G2}C$0)>ZxSTR1db0yOC#fj)lFHN`u6-|2)xgKz>FBAeHf2t zud`^E942>(%wWsteF!(R2Jg^rpBsrkh7CGcDBxV$?M2@y&+YHOh@x{NgY#B&eN9Ac zd|`z7Ou=Grle=Mrdn=0PQVuG8#MGLEw6=ElU7P4a|CM&nC&KA{!4{hy@Z5q=X~F4> zANR?bVIVQL(SC0wOPL34pO?|4{xc+h3wuHJ%$ptZmvH2n!;>SiToQ_qH4KQJygO)4 zWWb#0fu(zrfztktu8ml!D|Z#Q7d^TzUw1njk<4Ra7oG4N8K(d26j?lO69`cEe?`x@ zkG<5e;6L_aLKKyY7<|gV_gEXxG+-UAmObd*{c_pG6M){~n1u2)g|m}Bw7&dA!o!K` zPNV(Y2z9vmmkhp9d=U+6vn{X3Rl-b(!kZI37r7 za01+Q2E`Ro%RpNFv&yE1@f-03n)CK*3znRn6t(jtT+}5S(63t;AVQO+6uHfHf-nnZ zvJcV1`(UCYPQvFCSZ#@}0`xBY7#jbdj&au@I)^l|h4@9J(x}NS-7Abn<8v^RdML`@(s&NAhT-|?m@+HM0$0j)uUs{Z?5i60mpMHqX7tisO+mb)``wuXe>wC7?Z{oWBNUqzDsIw&c=t#cC z`o~9lav6P`cErhi99Elq6!$qaHI!u`u?(iATH_{+V;i}wzHGm$g5C<@^<)c4qEC** zh?@3Cu0gcm{I_Ycf@s}LqEC;+)aIn?T6mTZvP_C(&o2`S~YV(_;}M9x%(^ zxj^(6J+&k~niq{$Epm&@XBL)4@YV%MWf+9ypY@SAo{)8~q^lKz$PPyj10lh6M99zw3qni4pWGP;psgG48H&sH zoZlmWb-)q_f|1+k&8`%PA28y8z4%>1_VXj9UQ~SgG4S!+PHSTm*Wt{=Q`c~^@yR%z zo#hsuEAzjTDgsQRBxtlN+V>L0YM0ytZ7q!6U)}Wq`=UR%f1NvFU$lceHxd1{jv9Y` zWn_HLJ2C0>qz;y*&CyjivF@+Bb1&>QZuw$n=sdLVsL?PnqBu-nNIijWn*S?M1*?_( zV0X=GC?!k2d)6Z)v2bmxBu% z&i10%S8Os6pZgfcr4$%2Ss!zVQ$=-4ywtvtX72~!)&wzL@jxqX{4o-fn$NJjAD}H6 zPUOLmyeRU&Zq&SQ^0~^_w2R}>)GN_9M#dL1A2i}CLaFN_ZO;VrlagXmhBywJP`OEQ$~WS__~X)MSs zE@?RZ1 zczhf!I4tnQB{ZVks8(bi5%^URhwqF;-|G*911|L+_@)0SxAY$jn#kN0Cvq*rWtEow zAK6mlZw-Yd0uL+q3Ost-^#e)tBQ4 z(DsnznOWoMh$bnXg(jY+&*mEDdS&~gp9@&8jYO~CHL!l^f%PvrVEr|k-X|=Z6N%ZTH_%j}A&Ga3Kd3kyIbm8j< zA{tYz)>vk0T855XV-Lsq!Y6UEpkXdGn*Qhtp8q0v{&FOGqZbl|3pQlKoLzXzh~CY# zkK`5qBn|!Pvi_d8 zO)vk6#7>O3K??Gom=^BqJ`S41%Bgc$u3@~dH?~+8B>v@aUA!wKySr^3zX~u49af&T zc_3AJ$c5xg$WugVkXXw+MnVRr^!Bz1kZ4l=aq<%K^Q+7)bGdsM5(Mr?+}qUxR5Y4RqurM>y>%m zgN|xDDkY!DKHt=%{8!cny|DkpVP!iSO+J@>bi>X@;WOWkB+rLlfxjIoZTho-IG<`- z!X8{9K@J*-HY$jjryf~q8rp#UrKjF4>5Oc+fi*!FBX9gucnIjJo83~J&F;S5*=4l1ZQDzbG3C~8QW*RGlFBce0>W08%i=wU z6X~7Ym$uXF!aUXh;_Kj*5rZk|mM$Znl}!$6hTSw6Nu&GkdP$L6(${iJdZ1@XrR|9~E$5$~g4)!=?DEf;$M?Kr+LW9lBpkd!H-& zPq5oBxjcZ|Qm+Bq-mpj!wqEBR$ z;eb^y`n$V@xkDZqlLN5hiRzU;8nUV1GUQL^kxCS z)PsVHAm0_EKr1RH&`vUtLS{io8yuJ7T%#zS1x>?Nm*N*6TjeUaRNcvMcdk7w7zzoAQ|h#!y@SUoBHxK@g;^-Oo+S`(-1ExeqsVpZB41i8t0 z25eAn(-uNawj_tc7`eV9%coBAe4B;2HSLze(D> z{Ni!siG~`bh#wK3SEB9GMAvQYIaU8pPM@%K3IQI)Mn|c)kw~dO!2=ZGXf*t@z#*9) z;i|jf6ZuZl3J|sNy>{Fwu2W8n@)(*{bl*eCx-~b=y4SBoNyXRUBCm%EP zhN;#zczp^`7OQt%7hPLXK{VoD0F2ZP(?*)M!2xdKY-tO(mko{<3ZD+T)XCSiV6V zir@^Y3zleg?u+I4Zc!X_WYZ)A*A|8rOYVaN;^HjG;8Q1Mk0vWkU%Hler33g;S)&fu5nwq@8rjDsz6Wb}9aT^06mc z89Mr`OqQ@oGSUt=q8#hNe9*s>=Y6Az6FA3VC#Fb zBbAcddy}uHZ*t-9M&q=hBE{wqXS(JJ>`M*efz9tfB=3zcC=3Z-578U%JM5DUDUHP@ zVywo*%ZuX^Y_6%VLLd^NXk@>tr&5+DBGDftpF!?Yh=>%7+d*IH@C!Fq_*31075SBU zWSqo@m!vS=jZFs|+H>$oq#>25C3j(JPzAgGZj*??@F7PsD#{ZLj-1uuyev&@bRTYx z(x>85xNCOJdecH(?9{kr;##|rl0ZAx41@T)L5dCwb;ZXKRs9_gJ`}1bRw~P0%=8FO zZouddOP4ejcq&}&bb&+J1HC(?OI2AZzb^|CQ~VcX1{HGcgA$^dyf#YW+c!ymBT?O6 zKVPr!@Y4QlS8rtTwq9eF&g-c_>DtkMbg6~A=ar(mmhX};-sKGc-p>&I%U#Uy47TWP z(w0CIfZ@f~?Px0bS@z7xty8QJO($5OtOf}rTN8E)wa(hEljulS3v>hCIJ!T1+T4Tf zx=}x(7ZjhWkfS=>#0aDuQBFWD`Xk)vP|thUIUnbxbHp})FFKpPX`h=M#m~*g#u1bT zFO;m%kq6Z@IfrClS@3q2Wmx*gR=Y&-tVMSFJV zRSG@8D)FJX(vziV-+ue@spunjEe^gGJ9+SaeCbs5`O)Kimhf2Y%$0kKvo-(^+LqUCtn9OF+thh;b? zD8MB`XL@<|$@y@-d&_M=qHcp~<=H1%*a}+|SAk}vYt=%NSKtXS|M_6$luFbw&AB$RHkA-I|r4NuEFvQmb!O_wm`|_h`!6 zA^Sw9{D&xn_qGrH@)#u|d!}{KP0M$5))E4hG`-1-Dlj1t_K^9UAt1f87F9QW|=#qsGm z1EljpLosqZ_RPO7IP;3xD!=c_(i6)oO4_6wFZCf0t2Imldzyd3114)EYe-ewPu zK)-q~!Q*eUSIVGEaQN-=6*=4x^NkGq_eipbQLGpHlVCfNFCnU` zagM;keXEq(ke$y(XW#iMfaId%E+TF`sF>oZQz-ENyE5eH#%xFP&W0~9HEIaHG{g-$ z`@!_}cS`YZJUKCSUg&ez6f1M(w4=qKjy`D?g7mp8G}ADv^6$*)wBiYc8@x0W7lx0b z@ARib2bf~M>rFAQ<~YIc+SNSqz_I96UEBQmJ$o|sgHrT^yB?vB>ETCr-N}#rG=Gwt zCeNlE4VIJhYdB3z;Js=-9ugHONXe|x8oxGZi^<60wwUd>(aP;{rlG|OaiR9O;+^pS z#KPmReRy<#EgM%v++}`qrf^=tfJuTg|1Gs51;`(lqM!E8r5C-I&x6h~uHr!DhbbaC z#-er>J5okOdR(FsY|Dyo@9FvtJvPPU6SBxcE4vz)p|&z>`a`GeJC-+>w^0ivu=3byHlP&^va5{2H+`gYO_B<9H=vP1wn_DiE~M-)lWI*Gm;JI7e?7{q@nk1#7hEL+ zha1oB3jAUR3_wk`qwrhq9hyk&MX#L24yEpEQjUFs_5m?yt*c#5gqF%njud3x?W7=l zyhY>&0w`|WF!xe_;(+k`&c`h1t1{S{riM$A(QDzWbhj%{r@gM^3-X~M`&Y+nnzE<0 zK?DFnUp|}-t%Vk?%sFlRCoo$`Lf04{3>5ST6#VC<(xSKAOFvCC!2ZG&{|mYS{0_%m z?26M{#uFJWpMIQ773e|Z*D>?N^Tw#Ip#*BQl(ohJUff6hiSYCd_xbA>BYaN~1~RVH zNlUa<`wfE9Bh)&6{jRB9ACmb?qrfoSzv{DGXSWTDKGJfbWzI?EO|LZibwjEA-r(dzG+vG$7v&`EcHtTwQv${pCRb_qMmdOclm8@{a=NhZ+uk5z&>~pEy4ZdV{iQlJOz4AF&N~z2? z!D+s}+adwl5h(k=+%@4mc`PxiWa=wSk>QV;^;=i~ml-Yw^;5zn@A!PVAV2w6e z4s+cftfR07S4AR%u0?mK0_pZhiv!l%Nie>{tSK^F!jE93L%`WZXTD4MubUV>pndu! z>je`A=3Ux=4UTcK4k|Ow?N{pjp#)8XD`4QFy3AP)9s>1{2vNsr_tiu2f$VWdtgMIC z8=H1{uXFi^2}x3o{oNAm0F25V<2MR6W_KObd-`jqd9OmhB#N(Y%MgA~oW<#-^HCso zSTtDgG6l;}1_z?L^^)*qmI`cOx4O)4D6JK3RyjU;*Y0nliDBuzqnXlYbTlu_+%wuE z%-l0-!puFRr8Az}32WG$3G1#+PKeKslL-mN@udO}6HibqSu<{5whD0ZlS7#hgP25; zT$kRdQTwNOJ}9^74iOYekK+dXVJSWzhNV!mf2d@A^n8ifER9RWd)JZUq#7HK9E(5W z`^$Z7^msAHWZ{Yx(q}w56c;BOMfbA)q0!OkzR~d>0Q5PXXWYiGwgPN8qn5zV5xX#t zz;kexg9!Cu&${DnphJbN&YxAnSXf=<*;O;R=O%ukxq?E7v+*U9UxFlIX3b#B?qDi|7~XvUABbVK3O2S#HGTq>}0kdsuQ!m(K{P}-(WieWL(a`Qe5}EJ5uiRheu<| zT=p#9_rftMuARvF{pc?K(dgjlNxzgYnYSu@h);)HIGFK^o>%a?dERPZ=qGHT3dHleYS9i(mt!Ln>@A)n zEKd9`uH)9KQqA=F!_qrC}`lOfK)}u@Ob?; zLe4+&Tlofj!jZn8wc0TfHcuXbjy^h?MxnO%YOP+ROmJ=`&SkfLmDgbAi(dN^+sRP##slM9Wmcg6kTF{Ll;J) zCvBbASm(97UgtA@ozLag`ApY3=a)ELBv3cCe_@dm=fSafK0hs6-vmMwyik5^Gh!eL zMe5@zR~WQQ-4s2iWj!+*RYy~241-HAwv=VUvU3q755`agFZy+YMMU3W+2kOnc4=hG z^tGr)SeHUd?MNG$2@FxkcF}+DGX#p#WXff006qI*x1Q4G9QgJi;keW1rbUgPYfWoq zs*PhTVaeDmM0nNxFt!N~18NKC5^`RmIsmR`VF}i5pEp8GyO(X{j+R>Hp>9aWPHYk- z^)|q&>qJxw<$!lvf@<9ti;ERA9BANnm5dtXeRhKekpY%WZD8cM@^HITPAT~0TMf{< z-qykbY-`Xg1e*-dR2;d%$Mg#AVKCfZnY%sE#vu5kj@{Z<`0&;G7AXlNiH{^T&zed& zYxCSf&h_pHWT$QigloEyu`=6a4{2a6#uv-|GEv0hOjDX+aU9Jfm6CJ{kH)HuZ#V;kt z3mLxN!9A2>wBoRo*Zz>#_8D?c?Ak}?nZ!UveX;&>T1`=FdGB&!i zJeANr7lsp|@N$ZDqm|SWmFs{yPaEpc2V!h*5(Dk{88xxY4s&Jkd>S(CE_3|N z;UBg-ise*^5ct3@#jmrj$C&m~&f?Q&3{7mn2(~_kNxQ$86^qKoIFbCXrNNVjE9^h_ zw9`fCfy?^ERVXdhxHDpHdrO^55ysAon|8?-L}E~f;U5Zeh~#dyZl_Tf&aDVd>K9f4 zoT9R{M6k{z0n>AZJH$OX0{Pt=ExqjZHn2U$%dh!K?5^4R)^=bv>qwQTUaz*caDHet zbMkZ~`-5sz;-jooc;-b)LOWuTfai5bWBqc=by4cIam@`~vKZ4O=U^HbkF4>Ovf@=OU>VHdmCSiZ}-9 zRh_HuZpphLFkR^8vcJ+ZSy!vdR_;3^P7a;Vf+eJAN*$6g=z8*kohaCa-l#sVO+oelmVf444n z`t)fs=GJ$KU`*Gt4$s}$qr8jUH3B&J7ehp4L2H2*SaRlSOo*QoJT`c$yIH%-ugYg7 zZr->zyM-$YkMsO`b>n&ODS0Bfs1I-Wr+y;~VGiTT`COQTx@NT@?Lnaa_av{_(u$zu z_OP4GxG{eSV1%4%z@wWxmBPY~cnRHU>AGQzI5DpJBDfV$1ho9COyz#Pdb7PI&Tzv1 z_XNpbePR#n2PE+!lAS~YDXWfUfMa;;pW_v;uFSuL#!SfncHr9?MqA@bqtI5Y{0085 za+g^CQS`+@GaP@cdNWLrgrJ*Tt^`xeUC-aH%3c?(!|VKKA5`Fepn6!a;GcT4ApU{ zKcaVXkDId7(3_8$lBHvozY@|xiv@l{w`Q#{~LOBG~!1A$y3qy21A&!H5r4Y?llARB!xHA zK&u~&#;0J_JW*CI4eW2WB>|QpVq?%oOe(0g{n}{!tcJOwKNhJPK z@o4-vzCkvcv!z|(bzTSYcxxBH$iR52LqV)gXRE%Z)TG!$YQBq{JC7`g)f9`dcNdKld`#FZ^stO-If>}SdF@Gh(?-cBmQ-U< z>{47@NYJu)OOaG-a7`f-r$AIG=f03Oz9kjgb?aP88^o$bwKF}t^OIPR0Joo>3({9T z8jCG=@DfMwV#D|B5W>{Y2Jb4d%m!O4S!3Lr+b;9J%7OFCNO+d&p+iXsi8%E;Rq=Im zh)iG($-+G?I$2pptCP;fg{=)^i_J~Q59+4F+;%%?Z+#AkP}B#tA<^xChj%!&68u(K zc2XpgpQXH8!f-m0TtZDq2}>^xSPqCF2Pi~Jx$&B&F$^{i_2)Sz#`4A=Ng9F!o-724 zu>_|R7pDReAhSiK$&Z@gY9Jx6E^bWHr zyCUu$D)eBv0+7Ws7u;*2^{XdspZo~^_;?3%(+iZJ=X;^qb=T5>&!6ZGh-Q1;k4p5g={U$&u+W&3Vxx=+!;!t^{DSlkztX8}eggy684Htkh>PXaiERU5NL+$Ne=dw}WfS#J%MvWpd_*2tDz>rWM1gEIq!^KT2yY9c z9KmxUKSSt)$pw|C@$t;Su!pmBvvZYe@;@b?!fcnHgnMTWTjr<*T2$slTrSjHzVYeA zSUItVUZ955Lc8%ItAw~V*FJh6c}2geX=?8BR1TF3dY8_-_S(__S1#&qI;T1&In4dz zgwR#z;DwTo6ia-Ig3u$jh@W-^&IWddlW6I*JP+iqeH9Zy8;UitwPcxZqW_$Ho%J@h zz38BMtB-Tb%EzJ**Yxrc={th*D;_(H-|i+b@#H46I%gVJE^R?H6Vn1JZ;l^YVw7zURL-O68#?P4RvUbl{{Bo`j^zx<^ zHw)oeHDRZmd^pNPCEZI2mMfrgfY9`)xA&2^Fiq%s&t3P@C-3UL{b5$nxC&OpWwWhZ zIzA~M7E&`>q==urN+l&(ZJN*@=f@QNt=%Nsb>-Qz>qe;Q$|H2iR@ZH#Q**Idh2#k; zw+Q2wWeM=&n0VzN#@LBAi&3qjpe_?c9M)inB6_I**Oru(i^!+^^{jtoh93OT$C7XA z<8-lm&4&${(nvdh(AKRznU%ap3QAx_^&U3@+5hV>cY083XW{ZZ6)pqbr>w_Da@=2g z;w}y}lE6B;01QFfn?<`VpwWePa^$qu)gLkBzUpKET`NEtepC4GS@-Jt0H! z)Km8RWM)Fmtfdsd%;^A8nXe$L*%65+Za(%R3-ZK_|HTyg3$P3Eycgpq2fyQh7uyuwx=3-rsvN+rd zCIzPUgJbbO=4b_Keh-SdvY(dL66X3BE@^>ZUQ9`Bw>r#&50AwwVR8JKet|23g_Jxp z7Jt~nNG<}kyv8=AYQXEkyQU-$jU^Ugb8;-BM-Lg6Ol&97Nq!sR&xa2Hqc2#In|m?) zsDo2J>VJBJqHSp0a?hei4j91@5(ifTYqa=Maf7BkLa7=Arv3cO2v7U)ni7tO4Ut2( z0Vxjho#VPX8E3k^bewpKsLY%2ECq*F%n;$2?NN>uBI^$wn)vxbVwn4lfH>2gK&0RqrLL?Nei$q8iQzyN=3&)1&w0Rk{xnLP6h8+I&t#_0Q9 zb%TBZL%zv8*GXS_TVbSloHyKDZ|sSysVw_zBpedpkvM@g+6MxBwOX@aL@%9=C05X)VH2H34%i`xIfpKPC0RLXu3wAh{RMZ5;-BEreMrPy zP&CO3v`2x7^}VJBu$p`8Xwi0bTh!N;1vg7)t30c1yb6CKLEY+7RMS!wVj|L;Gi4jX z`u(h`H_)2Yl(En3{}&MUZBhQ$~fSf_7FwQ+*xF-w)Zg|Bd@5K3M3dJyn_lU6#~=P z51o%DRTNB)rd z=`!C*n7FO|SBGOq09ZFx0~6aq0giYQ+b6EXWAVp)XS3lfcO6xn8KNf#Zuhi5qXj3| zi~!-@+UwHUr@Gd)v3%?}VC;^sd=g#T=Xz2NHtNlFu8i~Czx|1>yv7DPd00S{(04#t2f5&k z(}T=8raoT4YmQ_D^)wk#pdRsJdIn&9EKgDTYQaOf_oEfrz0#A~`+i>UL(s_nSUh=l zkD5;K@OrMx89(#vakM`WLgB;lGZ#_0S257Yk|&Q&YNZo@OzrTO<7xO)x&3g`FlDuN z^G_x=>W!`3gD6_Q+Nq=IuVr0P7Uep6hi0x>JkDjG|9gTeT|4;)Qx07DM-iSV8x3e0 zN(!cj`yG7tN55Mb_x z`l6;9R*0-$w1FQTi^m%b!7peA$D@z;foWgy<5W@n*vxK>ZXsm$e6{Tf3}VQ)vxe9q z0v7R$Q@rLlb&5)mz)Z>9bv2-wdPRJo-4j0Hmx?ob)tLC-z_Lw9p@qEhh!{s7h8Wm? zQuFXqx^C~^C?oW)XVcIvV;93btu>U^l$*T>Wxg9^* zR4S_0Zi#`>WhmRBgC0yiDsMMObKwZqAtVF1?eT(y z`RmGTA4D9VkhH@R(=BC1G81R18c0ja|%=|gXr(2#1bQP*ayCf3`P3Pn#kBQfrVMCC5 zYPEN+F^3BbpUln}(WRZbTyG0!%rwc9#3)rm0aqq*LG>uP9KJ6wK$k7^ML<5&Zz85{ zg4sE<{Z&M6?Alc22oA5X;HFj@732X_8T=y~4md^BazN`QEwBbCCEvsZer* z5q58$5#|)z&ArXk@9Z?-MXHn*%QJk8lhY#Wi|I_^em~y}kNJG#M8#z1 zRJPvP5D{%>d;*(#jeIPP8pY(~MjlQ1FbeM3zv{kcXSv?j%-Gl#d$BF{f?L)zThSK_ z%;i)MgFI#Y@n4UnDMJD#7RW=Y0o=)Jha9frU*NZqaqom@+_cx7o1~~+h%+o^DMdrb z4dKwaiXK3gw+@bM_vglapoauPnKt8;Pi8?PCDgHW8EAPaG+KpEb1oMDE^W?tbnVw{B3m1KRT5w&d zQKxdz0i-H#$Dp_1GDr3A&bila`s^fb6{0^OiPKpW%LMEM2p>sXJ4iq7zR8Zy$ zC^s8dny4~oL2aNm?mp=DzLb6IC!Euoo9tSZ+&Tl;ohK0%H4wyrPVySZm&Lyx(MyQ!to zYnpmG=)1y-!D9ftv9%|69`5=7p(W=h-SlpKHwdhOV`&Pf_i&z65WCzAE6E+3d203# z$Ie>!a8DTO6Pvr+JA|X$SqohaY`SF!*c9W;ogxCPcLR@#8p(jWY501dwrHMJ zv7t!pSE}v(=Ej=h*^uXK7q;8qP2%%Qdj6PujN6nl?>Uior**5a+?pn@IT$pXZ;I5pU0%$tWz7jDUb}^G?5kbpTb<8ZUB~IXEABWxmAxi-ryDibZ(_~a zS;Mi+;XFBXnR;`h2ZyO;LfF`vXYZ}LzyP?dw4I(`sE(52`Kri60Fj+*e{QJ#<<2Y6 zMY&Z>Fh?T9JFM83{%rTYSCl0&_UR<%uRtyU-9+cQ#~a<zZ1RcuZQtWp${Wl0D)W7!( zMXw%wM^3djQ6$zjmmK3p%3E?F^Mv9RrlF|smilL~BJ}6_p3=jAZ!CTqud`*HsYNN3 zHs{LvzXJ76Df1Di$yG$KN!PiIzNabvU@YPXNYBqlKRS4>GbF4NH_>WtE;$L@j_6~J zj#X4ZU56Rf3J|Gy+I9c?l)HevV3Hq#;sf!#Dh)+t za-VYYUmuQV&hoE6w-d07n@=7mFf()_fFWh!UcRy0pv2Ygy~kt3Yd-{z?EdlMd7z4? zHXM_ul4g+>8m|KfdH?M#U@UBOE-R1D#rE}iKEPo^9`T2?y66rnc&F3j-zM=SP;6Mra@#nEvklIg!eUU6{d z7wI#JKYD1^d{_c;ur6MKlLcXvk2h+~&{wEpZ8G}o6K3IScu-7Sl-n4(+b`*vOF)v3NdOn@N(3L_ zmBa;9R#3V+zv;7Fov`pGGJZ6jR_+40H+jYLJ%zbo zMKLOdO2sdraxt%e5*Y-|h#Pu2|F}Gh1>xcC>IYFnb@opJDQi|)@MDC}{vi3MFzW1e zFiL~ip_{|$>v@87sQM5n0PbF$jY`(n@)PnACw83sSBDj{GMQ|KC)z7_-gt%U?o*Xb zfBs=egw49cFQGk=b3K7Qrta`#(Zb=jF8(Z@(3(nbWVEsJVp`&P*-OEfoL1mGBw$NG z`NQNN#5e{anTRmc8hDGBS0q8oRd$0T1E4`VWs0OiwN2%ksVaQ8)Ca~7dnpvym4(Ks zGSYsPAt{@#Vr~pUGVy{?OvnZzTV?$`lIsUx_i%jJeI7UJ-L9z51Z zg?JhJ+5~v0;DYxO01L0;8i6wsp)<)6JGr==6-}tO!|(2LH)BFRtqxn-0k( z9p+$mb(FDw25=oYhaMU)KQ?ygz3Ns+9hN0^rd=t7$b4@dL31$)wjHazh=S8`hfSEHKcs9w%D6aGLcyJQR*Vb)*KBNdq{X z{EL%gFxFwA?F+}_bz?vJ@sQC^CFuNoEaC@2=jX$(k45}ML%$r0_~FqT$+_dvuMTFI z7qsJTcyJldn|&;kQ#CF)DgPlOPE5Ms+lp8IVfqw=ab1AMa;LNEW5NSMe9;)lhuB{> z;l!=jB`3s|LCvFd9w#$4i%IJ62{Gv=TpmV3| z;@<60W#1G&Ib1XFYoQ$Kfq&7zZ;VB69E@)>fv?>40@}Q&$7O1?p)Yk}Hik0eDya?v zid5T4^xH92=HSV5SME9J?JKzDLZU?;IvLnDr9}V4iBH{;{@cJ;{-+$sj3&*4;)qZy6){V0Y z(Oa^RC{aq2VY}@clkvQ1!n}I$V4Z<)x@+FO2R9wZaM44FXMM8Tes*CC>1sc4BL1-G zZJ7O86(Y_D`N$FZ0m0fof7{=o6* zVf|YjiXJ&ihj#idHg426_BSX77fxKJZm{24`>*~-%^xmVa#F#0pO0eX$x{?G0&E6?5 zX3e%@xcXcr2_rO!t9F7FtS%#jSVLT;&p&*Efc9h0$66vuAo_{ ztcUJAMFW(K0?G}G#dsCuHbo=STN1(+vOkq<8< z6YF)b=V82X5-uKo2TN%uJ5C$elU0@WO9F6$^>Qe5kT-F@Oc&# zOFLsa$X(DpjqjLP>&NjdFfW9jevSlZWa#zkiGt6A`Tlo16_{DL$B!Ut2#EW~qwOQC zXHM(!Yl*Nz-NiWZz{$=4;G%!aY|kvI68OS~DLOumWz~mroJZ>g1|0yPW%N`7{V<{z zwDP?Z(cS^*gOrzQh3*=4CL{-*idS&XZ+B{^Pv5FCFf6w-lpiGDG@Y8R(4h~`;D}e!v*PTG*lC$(z(}uo-6on7{YZr* zsfDgQ`9hcBz{rLB2`R=>xP}Yc5}_&Q3lynBnYcnPGRB4?E9^s8z4J@v*W3ysaX^tORa zZwal_Eaxkq>*^}kO<|VDF_3AREk+J=4gYF8c;(NpnXsI`Vc-Icl;k$ryYQK#x|dwmMAb_{ps3;oC1a&rF|GsjuY-V13NwjO~Y{kSg5 zdxxS=4ir=8Qg!_eY8Rf0*G*WK+n;yt5CbVkj_-`c7mGZo7)wd?xTe)w+iPu%6iHnE z%e{p^FaPPgpM$&b`q9+mt;;l!V{l(O5o4RAzk02A46pB(@NhwVuljWb?bn{K@3%jF zBDRk_R6F~qYTavVy_hK~t@+1KxXLq`#?qRd$rfye+V*Ep#9z%#DYK(Gn?%Nn8yJ|@ zbhGHOc?1`|bu;W9;E6ZT|8J1HV1Jjt=%s=CKbx(wM4J3J5)`I5smWc`zDZMM2?IikjuA9$0cJ0aI(O(VhXrA3meSVxyXChumH>bUZaE$Wv!`Rat zJ4gUVqjO8_p{esvpY|?R=X2jwZ_3-KbENN-Ie!<`qTH)S%t8^_}#Hh9Qh$50FA1vf6Stn|b)wZ<_%dj09nui2o zo)@u2E5h14NJv%EhKKwaK}FtH>c`8M*Ar(cZx6qY4A||;`D=>maQs$SQYra*?rHB= zXqED)a=5ALD<>ufScS`NG`b3|U089hN>}x_)aKN05qVxs7zojO=t%_6fxT zy>vXjXnoKpnrqy`>+k0=e!$_xU8?RBY1KC%ERp^<^sN&SKW4y%ihbwA~jI*ptc1INSfvLe24Z*-yUp2ay`j->|P6U}{S9QV) z$%o+hOq*%|NHu-kDm%c>8JD(HdfQ34s8`mDJzvONEKt9Sr?GjM#?O5&*3H~?GB1i; zlUn83?2!B2K*cYOdni5WW)-#yCRA?)YU{=dN(I3H&Fn25PR_1tM(EYyNdDauWGC&8 zUUIg_MM>vvir=Uv?`{?SFMlgnQE3|KMG=5;l;xO^Lj=lYbW&L7Lj!*ELD~7Bmnj+C z>$O);q`H~w1paWpyjrkPzS3i&e8nu3-#amJ)G7Dk_Ck*(p{9)^!4p6gyP4S%(%fM= z!$a(%kzMlu`P?T&6nE^%$RwbS&AXux!EWcq2?z{%f!yQL&!%pH$C76~_M3LZx&1hY zRrx*?JQkA#KWB#t+AHUYW8MVzfs&eQ&y1f2rPlRFSZCF?(_UH9FTL~jwqZ*x-PO{) zE6?_^BAl$8aRSFOH;60X3~`s|xB!Zj<{#RE7JXB|VActw{#0H`wa}^ULU0;j12HW_ zuSuiJz%q&;?I)7oAaH&LylJZLz;s8&F&+hi)3^aE3aNk4j3GQG1 zTvW=J_R#%fU^Yk?>_zsRtE2rncT@fy6lJE=`yAVcC9O`HlN#!KBQPMIBMGvXIJo-c za?+9r+!lN(gPT69%veqeGXRVye}Bbq1h-6X1{Qj0i76bi`GXL=NM{}RuHLThME8`Q z4A8_uhdJoB-w7zjmBIwxMR5mj`7O8ks8Tk!0OUI}guzV67$o3dCz{8;ZhuT{hxzA_ zC{Rm-8L^MG8Mj-z&mV!3{Xlo&1EbN829pP);(d6~(z13EaA&spaMNXr%SeQ`83M)1 z>_r*qTxhFPcCrvlH_-GY)Y8CK!>J>z87*J@s>-pQ#tqoLALyi{Js zw=!rkEx&|w?DhVVnGrUx*9@vvk+oFoCp@Vxi&V%`6Z$00ud-Y;J7)oSb8iO|>x=fp zPDe@u1W8m})})*MCCMw`g2(Iw>0UR5z2m;Kt?pyB?V?S?$-jEilv1Q#dUgOg>a_xo zB>&)h%qZx9$rQ-v5zz8AV=?hqiGIRw$7bL@e|mzSyjRiBPxM^bKc_KnB>IO!w$-7j z==H()U9OTS6uQ~xh)yprxpxhy8!qdlxvns`BoC@8pC`U`7WC8Z_tugG}P&FoA#}CYmcG znj6W4O9AIhW=@hJb7Rg7Bo=D4V5LO`kqTBVc&jK>ycR09(84P!w%CG2>y3(Uv9DBk zi*HeD`+k4Vv)11G%$bB>?f?DX_}EVNI(x76thJu?tmppVVoYrsog%g~(oAUZw9>h1 zY(6yRv+X%C1C(GL3H60T(Mdf3Sy5`F_)@8)^z+is#b3L^Pix^m`?<1rhi8jmiIbDU zwLc5Vx7jICAo7?wW*cf3*1~4#6+U!i_}N@$%_jjp)~-WIU;U#4vx)Qi#zrpfC!5T0 zSxHF6Ahze}PKqpIG5RxY?<{N!L24c8feOHtxe-OT#x6W8%gbhNuI3&;CN+DS``@>NshjR^_;>yYrj*zS* zZz*mKZdl1v2R@|vemCDe7pyr$E75S)l2A-1l#MWKlzVSDbGhC^cfKuT!?~>V7rKN? zKBE_p=-^$F2B-e!uh7t|#tYm7OoxUvXCDsNHZ9fYTolC*r&tx8VzddyD!sw=WBCHSTQKvP9HC>m9J#H z3fR#=;!35p)_)&y&bF+&h}tBWIPaDR!ac zD#{Cjddo}5coG>hP!-^DEYbwA0~*`aSNJvJy_oezY98yNY__Dou=}QG2{t)+WnWSj z!S5*(`YbJqZX_4*T9y8bwaynlQ$IAiz86^biqk6h*(HAMXmExubcMKh;>VRH>IpEo zTS`nVLP`cw(3o>rz*uEqv8;!Rt?b`CW@IpQ{XEOKSL|AOhj0PlMmq2qVxCp-E!u+e z5xPVyxjaEgF3RWoeV)%eN<;bp)a1J4rY-JMJ!y|7Y{?#|g^K&6>EakJL-beNkR>d;U5bE{NsuU3fJvM3gIl2}k%Q$q%qomdPG zT)wh%!|85TAito5uZfHPnb%sSi-KJvoEDE~Jj!i}@If9_OXV)|0E#GvFvCp2v3{7~ z#I3q7i8Z@IB*2eEj-)_Ujqg;~ojtab1mC^Hcx1fT(WTF#%xzr5AVI1qpCnG5&$GAU z%cf6J!x(z_c_F53A)og6PLQd>a#jdF!Kc<^hh#FJ5Pvky z+ThY)#j8;+d9HDq-lBMB;ntx@Nx8<0Kw~z3<)EEvx1~aRN~O<&#OybA zCsDHuOZ-SjG9QtuvP_+@HdzNVO7|bEgGkCetCj_5y`W`1V}x*?PezWF@wJG$Cl*TRms0RqLo!Am}|UeZ{JYBr_Qq`Y8)6; zJ`?pO_B7_xqxdr#D@A72#>o0dCXX>C*r@dzn~%cHv}sAYf$FI{RPLPMRweYoNo_1` z&9Y@r{TU|%$3uO`jt}hIH={LO5i?>dO~u3#B?*};Ek72#N%BFGEDOD|VQ@t zg8@2kfCN4k2a~yLCbR96h$BNhXAK7O-`lo<7sPA&SvPz(K|Pm zOwOLs@ZKy!N!nFS6$zkSB@0W*tX6wZe@ZPaElFEzODnrIB_J(lpIl15JcEFplU3zD z05~maIr|iXiw>jxltTM-Vu!5Pc3?SL|7z`=*Pa~H`dkZj9ot&k#@ESlBs`YAn`-gN zvDWjArFL4S=4(w(Xq^Jvy2E;I9N?r&cmwh9EKb`m@Rr&(PZTYe3tM;=CjK;OpGgpw zY_Uz>x7tOQZYwTBeA)cgtm?bl;|cPZmJoKWL2E0GF9Fdu5B7&o64qvZ!_F*j+8EL- zqbFHt>(-tuYUO{nGdMv96oFt^LFcq&8*n{|oU{S4nK4eCYE5=;<=!8!x!M}8$#VN` zwKO#?>tKoM6GJteOrTzd-{}Kgkb&5aNt1;5F?iK zMLElGK^C*jj9x<5^D}k~R1n;tpvKM8A)I;aZoarMIc-KRFQ|7by4R?IDi{chqMYqc zl+eUSnTp>NH%TGI1${I6H!C+6 zzDCvvNr_G4Z1ce1u%EfI^^W!et$A-L$>@LWgYLOYUY0u#T2?8 zuny>Wwpn0M<(bA2EEekRRU zCPW7@wWYMz|5cDm?Sp^~l@2nUM^YOLNwc!L-GvPTn!ve0;Ht7}!{B2eGj*)6O?w)a zOY#3>Sh?{6uXNIHTz^b)hPuHrHW=6igpoqFYwNS4R-x`yJR!KU2EmoRAcBs2*#Y&ZB5s@5;i<5g1(LdXpJvGm$o5hAxe*Aj;uuR(g>H6$>#aeNmBG%r z1%u>|i0_U3c>p%DazS1!j$(c{6LlrS77Cfc4UKR&g`CWtpbf|J9F;77Yayhdh)RYw z;e97EAgT7J8IL+Pj9ePi+&-`5Yj0OV9;U=&xdVDchA7`YS+hMjUwJAEd#kb`_$P3Xw@IZ`L;r=m zZ#n-1mh^_&mqAcRpv1+=u0X@Mdi*S__+{26PD1&u8dTBnQpYE8!V+himXXPI}cruGJA0 zHM@V_6FBYYHrtEx9#vYOY8|~s=Ygw|#nZt6P!&-Y*HUEHb=*lgP6E-V&P%qh5$ z9WJ%Kja`SzAhrJ3{R`2HPU;^V9G0TNdBeEYHh3JH`$HFAp1aJpH2_wxEDIPL22oBM zRy$&-_0-fuoK-}qP*(b2)VB&^^bUHGRcH^%G^|tw%RQ%bnf+FVMnTJzg;gXL(h=S` z1eM74)|M?nehb&8CrzEVirk`-;A*AC;d*tVpWb{Jp=n;|1QBivtoC}iI9$C{>ZGw{ zHkdh#bX9z71AD<92Q{RSjj(Qkfj|=)a#G2yFHnA559fL|w8|XH zQku9}y21u=s;x1^en(e6k4l-hDF%aKAo`dHYk>m@_}NIRoEpbO>L^Yf7C2RNPmKNx z?mgl_XOF)W)1G`_)HLt$((4@OlIUvD1{5Zf*u*3N>_ zeF4nkNE5}EE6I83wh3;`+SnL*l$>1-xyo>ZhldehyCzUH!XDNrL@a{_k&bGD^n~IOlbNkQ))LyfX$?lL*(@H&Q4wUeLL9uW zrPf!D&)h!Av8*0n>35iJjO#K$io=$E$$CK-l>yjbU6Z#MTz&xR+4XG~x3;bc^xAHi z9%&z%Pf*K>aKWzB9qn$#?n&#OWPZ=NcT>ntmsLN_9Dux*!K4ow7*c!~f^Je+5xHi8 zWV6n3R|y0-Q{v*EeU1~No8^72m$$yT^~%<(TCZ)rzV*h|WM6B0*G^?7?y2u1Ds-p= zsw?XvnuBiRZqfA(_b5D+5FKe1*BMKUDojzF+pI}xk@@fP19!E~yOQ5jPnggO>xU8y zeP_GW5_);_fqPluy^LdR_D_~rAKiN!d${tzJuLPfB;%8lw97s}(;vd{R~`7{W&Say zWHL37Kg>tp7$2>JQu6lJv~}%RZ^A#?I|x7ybqwa3USXiG74F=APt#I)J&B3b8H+d9 z`&m??05sQWctmT+(=Kz87cD4&O_%XNPZY_U!N-8=p^c z_+FYlJA5z8o*lk&_U!N-mpwat$7jzD-^;UShi_i??C_nCJv)4_$eta(6XWw@hp!`h zcKGIJ&ko;$?AhUaW%lgwb!N{F-@@$K;j3iN4&O=Hv%}YwJv)4h;`6Bv-^tmt!*@#d z?C>qlo*lkZvuB6zwCvg8dsX)A@GZ%n9lq1EXNPZT_U!PzIzFG~@GZ-p9lqt+v%~kA z?AhUaZT9T&t;n7ozLnXt!?!AXcKB9j&ko<3?AhU48=qh0@STx8JA7wm&ko$=%7MJW z!MrGMa5(qm4G!pF-r$f9WetlQ(&4ro;Nt8<9UNa zI*~Uxq?hCk4(X*?L%3A-<_!+%zP!O9ePiC>kp5=g;E-OHH#nr1=M4_&Z{-aR>6`Kf zhjf45;E=vKYY5lNTk-~n^tbZ{hxCfP!6CgeZ*WN8nm0J4zmqpOq;Ja`9MY@u28Z-_ z^9G0X_p*j?(OjK3IHYgS8ywPikH#nr%A^oGg!6E%v-r$hlk~M^D z=;L{VL;8ul!6CghZ*WL&%NrchKh7H*(og0M4(aWAgG2hMyul&;bl%{QekN-O7t&|* z28Z->d4ogx`Mkj){gb@GA-yASa7gdW8ywO<%^MujFXRml>0Nn)L;A(6AzV#=mNz)0 zf1Wouq<7~H4(UC4gG2fkd4ogxmwAIjdT-v~klvR!IHdnAZ*WMz6dO+Na>{>y-r$ga zId5=CzmhjNq+iV&9MT8!28Z-(d4ogxS9ya&`qz1bL;7Ie;E;YjYY2DL-{cJr>EGrJ z4(UUAgG2go-r$gaBX4j>|1NKENFT`?9MW&*4G!tI@&G$&nhxF0B!6E&Jyul&;LEhkyK9)B)q(96W!X5SB^9G0XAM*x>^zppG zA^lO_;E?`P-r$h_kG#Pl{c+ylkUo(&IHdoaH#np}$r{2P^<>`QkUo_+IHdnGZ*WNe zC2w#@pUxW`(x2uH4(b2O8ywPq%^MujXYvMz^k-Q^xTAiaH#nrf$QvBef6E&j(qHBc z4(Y$=4G!slkf`Ipx{prReV_~Kt96*#1PxGME$BQhPSbMt(xujvB-bCfn=bFhJqS9j zAJ>)!?aPg=ExUsvPBqKw^87;m6sk;CS5w@InjZNtTfAmw0OOW4?F!b^%{$H6>HV!O z%Pv*6Gh#!cB4(=>mXyZo<|$P)v(58$_9~g>TIMKJ7~i;|bl%#%M6IA2>q|eZUhPfM^OX`@ppsiq_)P=S+ge-ZqK8s?#wD9adr`+K z`>t%9at&LY&JCVdbZ?BG4*_o_pr~ANu3(G>HU}i@8sQ<&3j78{aRM^ zTVrH1@t5z!RVP=2Z7FW6S>;irRSP?Mwk-9ug+S1jxxvCnN}1L)I%*f*XSlgRD_ctL z;g#@Ed z#&;VMB{PyWYxnL({XJf1-LTJLib$~dt)^vU2vu9!GO;9?nSi}`jt;XoBb2XhNj78; zwk+@oXC);Pz_ zA@{YWlcw>_XJ6Mf1uWZU+ls*!jP+e7jlNluS;I1CQ^DwiiU|8o!|{2vwRnCW)r1=l z(4)@|#|qo80x%4%n&|`h*N*S&Og9vM+7en5xzCzsMZGum++EcB`QwJR03jCR^ zJ}dv1wwAMc3CT~PHSuXRv~}6K&ayH)CG)mHx+#oFKC|SPt?A%S7dKq{PjiHNhloS%R0(Nab;1$yJCl@Cc0%I!F6-^rzI))<&^~V;VkbYhL~~ zU;bnHWZH3U$#Dl<3Hg*dg07VT+)5Xvt;@1j%jDJHo;*rub=HV;c&J5`Bn?ZGG?oxe zCLM<)QQmPME^hL#sq3`Rb;Oz0Ukz$#*a>ZoH+QdYZt^?h+RuvG|C_e3E#ZIcNbfX$ zS=6v2-)yd)@=dRva%#hSS2gEDxXSY(oZj%>vCTUS7U+~O*AB02OZXr06zyltc>fW} z+J)VZO3IFqNZ#g14tKr-2&B(Z&ml=0^+q33AyTIA z4EaFQX@0;4ys+V|-e$mh9kAX50=BrJ_B%|e)#huw3!#Obcqb^G72d>z;G|>=$sVmz z(3X%MEZ$UB-S^72^nDUIGV~64-&PiC;QCbx@vI#ph@FL@ok>`dUVt|`7fyl76zPv8 zP@hC!@P;Fhy^j=94LRKxLvZORa~$*f*c%#Jdv@$24__=vZI$o!J0mKUK~G;i%khnK z`-^?XRPyze$dXzd)miG=O-@~SY)i*H(3TR7ZvRxOUCVH6(tzrsBJsNL zuFC}%rA}I>>~rackfcTY0P?cQ`1{(@-QoV+?lnN+;^U7%c&__g#musCoXgu%()b$h z)3GT_2*|H-G-j6!93mRUk_D5N*fFYP12{%4eKqAi&?#9>v2 z_8|MCREWzAznZadUGx!a`YGAhKn6B8)6b1gKQC{1@6FBR;>}Jj^oMNuP}3_l)vMZ) zs}6B~qX#?dIU_Oq5O}~ttf&oT%8Dl*HzVDW0kAr6KNxp16?I77-mp;DHZRn*zEIb; zwX8FJ3o(dz1=fjCuI=2{m5J2b$oSfsr5j$~pFW(j!-aIlZ*K8=9ffx|093N-M5Po3 zb9zz9vg@ZD>`*V18ylu{ee;yA_bI)f_gtu!!lw&?^=95Rg-;i^e2`af_LpyNYgxnm zhla)q)j&Kp3k}(dpwHQ)Sh<0|%~CwHZBnDO4+q&$NK7@mkcc zKp{zDvk#?87a_YlH%0IM!;&>yP>Y%KeB_zXsl);GuKQHCB;5gsRgjq1tB9-%?6XkO zHO#cLIMdFincmXy@@;L!w{K%HCM}GbN-dviyR$9%6#ty|xwhnUQ?1p8wfLI%%fHk4 z0zuA~4XnVOQ++twmZ;P&Drvc zc5KZa@V*CKM=p)o5#EmWdZjm5#5jttsiro2t-zHxd#3|#F6t5P4p)h2qL-)mxbrtj zl{TVb%Krs(nZpLK+BeQj&(%5@kdrpx>kT{laPy8n>^u7KRMS3GwE1SkAm3>o9w<|?Lgzh)Yp^+_bLRN2r}I!!&2b~g zyfict>`QoIy?#NuIDSpJtvbQclAl%3sfS3ILISPiM~48ALZ{ZC&L@tuRLCIPk}gKy z<5gqT?GtV3cwm!^G|Io1FP8<#6$;WiK2S{Gl|0d~kWV!)0A!uQZm$%^$$rdd&l6gvGKeho)Bgbe~ z`gFv`-d**cL0Tt$(n&ChrAOJ3zd#7ixDLyr*CfXzG)znqo6FMKqd z{f3H>A18JGn&jA|^9(|}u!eDTnAnkrr&ot>cPe|(g#Xa=-Aj`d+znO9+Lb|g-S0==7k#X{k@#a!!uM0F;V@!O@o$`dFSkgUDGm^lB@Dhh>!Kw zrcdx2?(fVA-7pwY+lZ5HGRGyS-b_kd3Fnw zl7|mZui@HLh6YUPu&CjFX!^7>>GDq%Nrl>#vg+xF3t#G=c@_1h&lhH;tj{_^YnhE` z-!;8{QqnHrzeGhiElT#bR3l9pGuMHG67z2v4%F`oj-RU!EGijD-p?mN$MG z)6_S8d7AJeWRWi=_XQ{mspXr#Sca8a*@-Zw9+7s7F>J>7<;jXIT1Qcsb37YzDf#*l z>Dz3T8nPre^^cEx$gIi`KcsqZNWj`W%4?H(t7C#w=rDzMvMg^+y{-N^El<U9XP#jJ5-whASUssycy z2kka}*`LeBaE5od$K-3pDdEm5*UsT^pR$r6wo1(fBl-ulFaX9wW5t-aVSu8 zN4Xno>>#mv(aS|~nPlFGi82}zVUk%w9yEa^PRet9cBQu&RPj}3=CU5lmaBxk#Ae4q zHq?fF{FQha82~P;l{*OfGsW0^p9}LWfX105f^k=k(8aONY=Ahf4>Zp}GZ~=R7c%y>6Vl!br=T zHg~UGYU?7chC)#%T$gU~l=a<~-9%{ODP4zaaEgja*J!wwtT}$Uf z-VJ4**hzr`&l$62aoGz)P6DOx!G(?Q7AlG47?~>x2CtM?jqFv7 ztq0c{I$1C-^;{;#7mn-cHbnSEU#M$-FzQp?hR>psy~%)phF3Qqplks$(%K z{E9{BdO=iPDtAyq1wB8VvPWPWeu6@m`L^~{FNIGeZwCV#cGv3fo&tzv859wWs_6@2AmhHzN z3nL@7ZIetbptTiu&4$1fW`;6CoAvuZostg2{f}ka#T?^zJ8LKptS2pMVaB!&aKaoJ z#cSK%U|N}=a=9|Kuv5}Ql&c*^xcu;+F*3&fbUL0PVAl4|ud)rH2K!Ee%smf~6{8XY zZA`5v-&^~jss<&waKsw$Of$ZLabPb$N|?H>NLV{LjyS5PDe>b9At(1)pIuSI+!d`j)qxKnACz{JLAdo*wld;lF8D zzvv}NdPMTXG1r`%9`&Ko<%j>>hep3h!wvuXnhUen{v6IHzBw`Y^9Qmwf61GT9i}sr zw{5*>{HSnEudvT_?>$&HfXc7PFU**ztiIHAOr8;ov;;P7jWe-i zETgL}_J5_1+0nx+IxsXbLfecJWKiSNY@}634l=?t}N*Kk3JprR@|qpK>f2|oSh4qVXBr>|6^1PGFWd~$ zja53fZ98=ddYzpEd;hIvK{DHsNcqopp^IP>^*bA?7yMKy!G%QNN^-i0J&#k_*%1^0e%o zCrQgQc4j5wDpg3H9?Yu=_>e>tcX3#Wx zVR8n6ANoqc;FBh${Snp!{q1me%wf$9N16DtAfViWvb|Dabzcr2Pb=p$nGtYkbwF)!yMYIKqCNZ<3X}6gfIEhRDGI ztt*)hb8r|)%*GlhQOZJ{FWi6O6`B3WP7?S8C#SVC-MJ!dwQ-P1a%Bp-_on6WhHtBG z_FSD7)8E+YM4pP<0^U?f@B*u2oS5Sc^Q#Sm=wSDfO)zM=&GArBuyjFL9|cHq93<~Q z&C$S_pVeyd_2NOLVDl~&H3)RTCDeJBm2+@7aHxp-C{ZPOrhE>0mqdUNA;t)? zLH?q0unQ_r@wXKq}(sk>*x+D&J6ud7y)AD1_CY5+2HAaN1T zZ(%VT;Lvo6d9)n$MpbN&K=}${IzUP+QZmZH*oDuAY)TVjQ1+2>wF~yviL`a1%w;0I zb}Hru60l~w77?tm$U=#ziqFZL>6t>H<(QR<3b!Vqbf^fJxO_l%%DEF2JRg}fFh3Av`m8E} zb``-KwwN1jp}*`&9OLUI@5Ho7mdTHNeH<#IgnmP@v=B`kV9n}xM)#E&95ZuQ;|&o(!TR^6>qt)MztzAxLp4LWwTQr zI}z{gD{Q&3^k{O8L5oZ;qOwi5S(<#m950sH5+)+k9ta;CaikX3fsRgGN~at~1H;W| z*&<2LG(K=ija*;VO$!&9ur-^1Rx3=!kqSIE!Pn8AxiPPdk1)y_^&`Hzfd(5Sy&;9D ztT5m;@-E~8E{CM1&{dcut*fO=)|${H%4#RWS)P#{md0ua2KO(B8zfTB~qoyvHpc3TIWCE96uaiiw@l?$C599ko=N-to)HDx$a$8X8{W_FqUNC& z9&Bi%zBVpJjeMM-=x|W|)M?wnF4Q}Zmpk^2Oc#l? zF*m=mc$?#vy$X7~pLHqEM`dM7w8%Z%Azake6)`cxUiQ`2YGjNnLd6_Ji$c&7Bf&I- zlJO|pjO=s-gsvp;{zmse4paJMJYeAH)SY6#E{O@A1D{e}iNd+5{nXTJSOt2-=|Vu= zx6l#@tDd!UIj({a2RguNM+<33cQF^Cn67d!f{t>ia{_Rs;*V?S{ix5u(f830tS zR*zZX9qzX9WhJd~?ibq@uZa#;Ws_MU!mU5HL*V)TZNrJrVJ6|~(8|!2IEKJzg%c*6 zsBqypab4}=66Dv9gOC&E(~5s-1szdsz7BEp^z!0n$GM`t-A z?S&_I))J@8J%NOP75#xLBYss^L9Kt4G!}{*!36&zzieik*a7VguatY?m!&CnLNw0H zxjeRN<*K!jnm~gse<4snx$JF-suOa1PlRx61Ya5)K}?&QuL3&7OW;TZy-^u9d}16x z;!YkEny}W4FQtg-_=Pee?z3`lIb$uYJ;+xg#HbjNf6CRqs&0Ign&s-E^1?EYnV!3T zlWj-_ITE{}q1_#Bgt0XBWI#tlRA8vv+i!X+9Qxa&IEu20zML3G?t%dmx9bjqi+Lk> zIFQP-y?q5cQF_QQZm3D=6x|J9YYjakb%=yJs(W+9JhLZt+F=qVeGEV zI~IK(Ic;(U=u2BB$Kd=rG%C-Q7x^~i+L1k#^jdaq@kZ_|^o0b?QIoN=dBoI6t}YX^4v8 zEmebbnB=s>Av=#~WhQQNE_B^pbjzLs)Cs{ZbGufSS5=LU91zfqk8r_9Ba6#FUX8GD z-X{y>uBTcFmE;V`#4dUkMcMulgm_IEcZoP3b}uN;#Vd<7W76{iRvyq?|x@oeL^jGPpW)@ua*u-A<&znn?2+ZZ{3E7li5|Q*P3PbofH`qAi zX4RfR$kKk-m1a0#n(s(u#d^u}FyaU84BFKV3KV+-k;UHO7-c*}KUhsSoJ+Jl4(6nh z8k`blr|D#fpX2lXY5*!OO5FdTtkFpmH)Z+j+c>(0!wyovzq3Bc~HGvw~wCh7@xmsM|s(VQEN?B+Uiav}T%A{d(w#o?VY(LA0^XWVy zVO+N;5W*jetF3MWXvYE!qTXYMlJ0R~{B&hy~L<)J|BoOYZQqd7nt~sroJo6 z6tTw)>dEIML)`%@PKAsCm~mx8v2qn+=FR4xtwF^0$_WvmAWs?B4|~I6aV;{UNeh9J zb~@YWG)xJ%Yvve&YXUIHf?z_m19P7U>W9mlV0-!l?PIA92*>Po7_I!vuj|V}})xmk#%giQa0^5T-(A`8ZkR*Y7M# zDqMiljLUI>3pLzkbjN~AChoKs`sf!etlw-ZD8vmcZV`b|>}1VzYS;R!B2nC^cG-vH zEG>eo$~Ba8=ST}YV0l3SGB!}(v(&$^OH^=6P0@?q^dc^)H6z=CV?{*}2dlpNG6j#h z;-V=BnJg8Jh;U#Hbiq-bNcI2@vA&Qh#7Glz8v3xvd0fqG=?qUF3a$E*NU3GBU@1&D zkUWWB%QzWsOpme@uxtu-h%2D(?7c)EOZ+lzFKfsgQ6ZwsMG0`6xL`XK?d>PCr!7zW zZZ@&E!rEXu2zF3(5~|B@+M>_k0^zwsmTuxn+Hla=vXEn2g@nkDPGuelB;wA zMLZD>NC}gG;Z+kP@;@k?5c z(m}uBV1=H+t*OD4cnv#jj z)tE=8DyJi(_?bA84Q9qOKHvhA&RfALc7=@W2zua2V@UYtUXZ46>}f1aW{iSA6$l0w zCjbW-Zj-UvE_2Sz!GK#Bl*6X*vtB`JSdS+SrOv|6agS}1#dr_^@~v?-))?x%g&6%A zsE!W=zG#E{7Rm#yzud4;kj`wWkaJbA2j?DOqjDf(l(}mgL+JqfdNfpU*IE>owUR6o zzcYsSQ76W56hbS?C!J(wy9n*ooPBvac+#Ts^6a04&ky!>Xz*7j-PuJ&(6?c{ z9R1XLFpBJcSu+0OQ()f>?@-XN|U&i+tr9;ByEay%) zE;;2Y!g{4U$mwTCtzly~V1Ia_&PsfL%MVI6zA@5Heh6oE_Bc;Z}rZuhJ<9U4kc*y=%30z^cG zj6-6{I@o)^-*wvYPBomCqxi(wtsMGG@+r9cCc-fERBAy(VV;Jm$yk}QidDc;h}W|= zxHUEJP%arb0hlIZ@A%|+mbAY6_{bSDeLn`$Gmnv0i4_R^UnP04Xvf^P@(gr{Hs$I{ zm(kY4M==w~nlV>WEbXqWU>7qjnP8ey1V1j^kC9C@IlH`r*X=66@RyaF!9Xgjo|X{+ z&0->r66>d2c{W~#QvYS+W%yEA7qE1tfvi(9wUPny*e&YQIKvEXxFT8Gb-H;=3h1If zEk<%xq}*Dq{0XL9OOtEN^r$D~EI zLn#>16ZS)m_Q}Pfpiv*fW1>4X2}ERAx~6mHP_!;WZL;4G=U! zSe9rs`y+f${!Lo3Z+alT^Vw>IDlD>WGA%fa^5fCknF7)mgf?`krbz#|t*=;Wc zPeiAyt8M+8Hl~vF3M1)6%2*kytmo>|r9|9}X?f}$^DB1rItWhCa)#fE%^nUA+@CU| z2Q#-7i}jcp1Pnt>1An6MZC@;<=Te{97`z5!rDV1_3oXV+ALN)nSm5vsnGJ4R$x6b= z8@LSzar{HYArU*=k%gTg&O-b_!(JIg@Pb@(Y;WIga1AI1hR_ZSfE}zQrpr4(_|=dM zK-LRA7E=UMPHJ<(gG^jv9V-o=4wWVST_m(s{!Cto|( zYlOS~0wa%6n1Jop(Zp1faQ+=lg`r}0IIIYr7;J=@_3Y8rYM8R^{bWE|!t3u_6I2h2O?vog>5Gz0QjF*A=Cl;I@@(pYnG9H1O7siyle z(Cy4{nUCdhLB$Up7WLr<<}h_o%^3xem$RdwVMjSqZGAJOsInckTjl&AHOPqg6`wKH zOA#1wNME`%n`ymzVWpdC)ZuBy#shmQOEgytk!B((O5TiSp%?iFk>y2V&#_k< z-TWDx;nhsp8mHo*U4r4ow~U=6yU3wChPZ3SII~CK-&CbS1({H`9 zp|H-Iq5YQ()GkFZ(0ZTBiR!weylrA=NCu&X#f}}A_A>bY*y>*#$U(fw?X0`~)Yd>~ z5Q|v{+F#g0UwdwJ>E!KwgmU(z-&FveaA_>Rt^w1ia2J@OnYl?hBl?poDKfgr@`f-% z<7JwL%fA_rk}lvD3AXLhg>4akV~SnfIn*9Dz5+o3p~Wso?GA9rR{}_KLw*B1x7r8B z0XP8>fdOab!o@$$)uj!DH>OC(*1d zqHDmeM$%MunM3r}kVc9_@I{6h?nMkd5W~W>w&=I)tX4cu6#)5P&?@^CQuqV{E(Ul? zd^aT4xS9kGXZ#Zc1Kf|5t3(SU14KAAu!?6B-l~XFDJq;&Rd6OpP}0R<(=`9osvYFO zZE{2{G*mxlr-s!L`wq+Oj&%L=E3z{ARN`56g@nEvI7v1GM&*{aak4`zIUGNWN@8Bu z{(U6px>|od)ZCPHaYz4OK+RVa5X5kbEMzlg%s9PeIkbGv-DTROSpy%k9fJrLojsvQ z?#)@#T^gx5>mL`N8t#X>`o^^z9Y=tUhG(56v*--&d&stY6cnsH7pf$$JV%HuJmL`U z;U(mT6LH;YYM#hbtV~&#Z7A$}mMJM=WDGmuQ;Z@~PXV>p{B9_GaI^ z77!|5-QXQ!_lXA?iQ*r^vU2mF#P%&ZWPTZ!e?iv3ILH{ zxcy4;$@@%PCKzh-zCFg~R*F&&OtD(uu4X z#q3SiS!6~q5AUiiy$i9`C0gnn^&+;KDi74j^4`9h%T2DN`u)P{hK%;uYOEh#iw?yl zs`FTqmbFYr0gBoMiPyFf=FpYVBOHY^U&jg!8g7i;WcM&0&2|t6BOx02s#tRL@7C&w z74VdAD-@v$TFxeTpoof;JpecvFLr3)G!4Ai#$$@xFzvdk{X*fy)#dmD5%zMj(0YSi zIg?PY%+ojanrO|&mfn{AMhOq{|5}!(P)YR5P|4!9=3)6m!M~_(3*~3Q?`BWz6OM*9 zMSykQp{S`#Yit&OrMDVVd~!}u{e~Xx9l)9ltJ)nD7+YNTwaqm(Q8yUOdJLUw$0DM} ztdszyxyYF!{TLtvt`=e zI4~|PW}}4=DJBVHso@5}kCCH^VeQZtsm7SM8T|A6V11$Y0w>V4EMeMOmrl1+3J{Fl zh>bep+#|Y@w2nJbb5y6;lWvmIurz~inMXWTSu9sZkgrKSgh<>yX!vkNR5k{MAsKsu zO$`b!?xdduiMtYGxAFy&ItpgbGLC^{+3rrT(Bz`>8=+2Ea^G$_Oi1zK0h1DRr4Gbr zg*DQYK#O{1$!aO%GtiUdPFU{NvjV3OXJj58k39ykNI_vQYZJl5q9P~Zfk||7qR#9s zf3=!30p-`+TU=athOmDEtELHRhjyA3Xj)P=HMYaDH8%n*y6_FU2A1pJd2uTO+bsteT$c> z;kv1>vEKM5;H>~~RZC8mJ6nCXBUhG$Yq!3oHpZc8 zZ&&7~(rDqBhYK2t%WOf#$}(}kj1j|M+uP-UUwW+YjbW^jbOdO{eZu%n{2d=A3{rYI)khAjgd0a;9T_`jIV!u+_*jvmq8aHo`=HP2~y)m_$jzlv{wzF;Mr z{lg#{T!GTMRLW}$o*tROCNTMOO907`O#LQ>2Q{5IBP+|r5`K(`Egz(33X3%f@I#@T z9K#~*oRV_p^P7rTvMxEfv~%~IsU_?3t5eI6@(wU^x;YiuWaG&59(K0JH>#0(E^Z*7 z=}^mIN!j>dIQlgESIgY3reQIWvg=}rlXQZk~#U{3v>ylGa*v+ZtGV>*cd8Kwk6vV&mLnwG zbL6iAhHxuNC)m2+wQJ8f&-CN#*ND(+xmZUcjv=&qSTH1`5xWTSUywN{ zi1&4c7Gb};iQw=YXmAp8R?G_JRuWjyDBt}WvU%9myOA_)!FLVf177{g**prlJkV%N zoy{X(pn-n0GY8G)0XW&#u2iNFXX1XPY#xyx*0!@X^wm9OB9G+TMep+J*%7sD|BWh2 zU>CzUrn|%vmdQiC(iKt>t`eC@la(c8#c!AGDKhOyiR`DZfH*&^g{4c$V*~q7GPx0s zdVr8xl$YE!7`@2KA-=dHTDc(=mk{i%`?tz$dZZCifIgnW_|xHCIMo38rE#m>%gCpE zpXHFE4;Tckjpq#T8>*6iElpadPD~+F)>JoI@emvF5W@?*YGF=hBsJ zN;s5j2^4^d?kvmIM*qz@{Xn-aM^CTnd`2nN$eIxkwT43p?oG545C|Ih!Fy(2kNJiGR4$GM!}>S zf)zj)gf*fehfmJENM(fEQAk+E^d);R0Rw5VX))L}3*AhwY`H&a-8eLs>i@NtRhDlZ ztaf@R3E|JhZPNVeHg4Q%U&@}dn_PsZFxb3vLk+G5on3*r-yZ#`@E~x8SG%L{J95qm z8H(@bS7xhFo$k}aI=j%g@3;K(>}?>oO7Rf|D|Jy(5_YkOK3i4nmftMiQ?_#%A=GH2 zu+89;1|Klj2k)#y8tX9pT_$XVth{QsUUJ_FeG41FNrqQkv#KJz{BqK@N`;kJOD4ZF zZFp)~VZV70lwDM5a#hRi`tDHwE8SFH<5j@42=Q`tq7YA~o%PBV8%wd6|C#Yx-(4Kf zF3qV1%K|2Y%nt5_{APx;(DpuQ1x-AX=FE;~)pNXf*-R)M1@E&dpavdC=;6PwWEH6h z3v(^V++w_fg;sX%beyLZwRy)h&yi$xE*qb3^!!;f#L}f9_)JV~>TBN!L zkD}DwqB|j7xc1-fiotz4ukdct@}cnTXZFsA=;p5}_qkpmj@r4dq8t8)b!7ZDfM&ar zAX=X?_(i-c9S+Uwaj{O5x5Ht{vd|3-!B)lPp4(xI>`f&`BQ$b7z{3UPX8_kceg6H- zoyfKgVwnjcc2Y8c@ZyhTRNqzBtqCggv*VQtjB;X_P2^9msL%A8(ln{+7HnTN-P$&7HlCC?`V4ZWe!jP1&9zF^#k&JA#IEi$l6vKLeCa)tC2X zNotp#vQlUZ35Kry-%tFwqe1*I#5|bP(I`~kqN8_3!#x*kio`Pu z4p!1*rlq$ZfUm!Rn998kf-)Blr2hZs+{GpSKaF$0t>y4!U1aX|aRYmiOJgNlvr3yu zx_(-EZ)w90#Trpm)z~jeEfRd&-v03g=v%yaf$L)7m35=!q%nME_D+!NQ!Ry}oLGjO z)!EnH5&yM$r(K1g16f;92g}(%IZb#hFm11&nT`Ojn|q3OJSBFr3FhGEN4E zNg~5u^{KjvIIwDE&bEmi_02owXp-F5vZhHwm`&=a1A#38*n}j;&(`o*XD{3tDHg~Q zuvq_;9nYm9Pk=3EgIf#nNtOZEZiS9u*`D)mbY!&*;S0Y8ZnUGA>SkyWYq}?3Th3~| zIHyT~lN+!lAr*!wgaW57&|(1Vqubz35{rrlFxF$Tdp~BiF_bNoL~}5=URwa3KncX~ z{if!_5Os@2hDp(lgf0M_@mKf+-7x8((IBYQ(6gEW4jWtBYpGrYP`J@uqOPP@O-mn~ z-L*HV9E59Ieh(`^KsK96H_q z&~2s1=w_pNQJ!qDq_yUYc7V~O=#;HUduek3 z!z1>w*sN~QhJ;3gMhHmQ8Eh#VfDT$g_ECxyk|Js#EnxI88z~wZivo^*iBXA=(+b!l zELNu7Hg*y(4^yDf<_A#fAvb4Ss1lc7!&)F++Zq7yn17TFMbJ&rFZ01qkRD(2s#n3-A%={C7)bfM~ z#%>aT8hy?_?)B8h&?9WMXACF;AR<=S&G^XShFF9Tl?yE32jm9`vgN-uide8jSouR9 zbvddUxP~Bcr@Zzu^XE8n)m>x6B;&{8E~^@I1PVBxVIxCM3vGrC0}>k1p<@}Tu{;_n zDu5e1sHDeDPakSuv)UFd98zdb4VULFr=LjTi0r=@mWfv$cTt|IBl_Ux?qkR>GFIDB zj5(U^5Kp;731&e%$Skl?Fgx?~HdL$~cY zK~>bw4%&t@II6?_VWww5Bu2)Vs|tf7{(W!hVZU}1>`!Z)j87Q zU7)ve>$KE;vTB&++=2v1BxyNZOm2_9I}mYXibbap&$aU03MX?FE)oih6ng=EXG|ra zBzQVYJEZJ`;bs6rvVaG3gY$O4MI00ST*+mn z7-ZNJbL})nf6xsZ+*10G9aLB*Tn#?!oSqOB5wti&JPv4*CrnQtX<4&zU|18a^>?GQ zspF{x$!edJb$ZHNO7Oq-zPLYjP=Z>ys!1cY#ovg)fENf0xlIDy1inq}?Q=yC({$ER z$-LM)mgfI#UA7)BP*?vrag{_zm=-RXvyvI~d)49@vsiwJ-FkQ~!ys-<&xfuH)7a#E z;thH`!&>e$RBu_ZYWxy*j@(X`pA|(u8#-Hgv38+WGS!f#4Ot z$D&YCC6+HarM&Ppnb6qzk8~-)<2*yp^(3ND4 z-wZI7uf(*Y3>cEc{Y2DHgij(w7H<_!gJ-u0X>>Vq7UnS)XuhVPg@@tOp>!9z-g_Hg za!WeNAhCxG)fVP`lMC0=b6D3gLQm(i z1QDk~r&YP`3*^A8k1MwN?~UIdcgWv&Mi9c#i)Nk5w@G^H^z`v0J$=^Pqnl1( zcox{}K=#0T`-~JhDk84!h`+>uO;Ig5xXK|Q9I^099qo+2rLz&@4+`%>z8f?j*1L0( zlVsP*;+14LLcDg#!6tFm6q6`c0E39~U$Dw;$xCylI7CjO90^^#S=SIN3q<+6W zi?No(jXoW|zHz>&1%&G9X2)hxFhO88mu^K!s5M;tOOed*Tj68KVS6S{Dky_D_&hu#W|m&la+p zBqAhX9udw|?+KM(#>l9cq>I*)!^R{ok#>)qEUYdegY4L_rR@mz*12!RUr@6PDr<5xyZe*j=CQvj-xR51rx z!P5|72~&kda7;-|h;!$1MQL`qh91otJR_|Zn)}2yry;RTB<(0A^g=^rS~UbnZJNg7 z#Kb2Cn3l-ydtbH6k~Mg-BHMQNl0tjDZW3tg1IQrOS}-{xgzE+ItM+L?Bvw6u_%RCd zvVRs%pxh*oQNk+1BuPNTo5+Jos$N+Un>XS$C*~kYPLT7imt!JV?U37^;7pZ5Eb+kU3dCFJ?80vDWj9$3&6C4`81h$9+e8$vJ2VEO|863t3%D7g`PT zEiIwtFkWk_bGQ?N_CVeISJT17u6jWq3l_0~UhUZIgR(xsA`pUbJ=M9Y57dZy$|jJV z;G&E$cAew(N=HT>bO!1YWLfGV zlOZxVIA30`l};eu&bh)nSPotdrt88fAGzvfcI>NFwoKk4?Ys0=?bowKbH~fuQI1#* z!Hi7T1Ks9U8{n>Q5SgpnvZE9bnT?X-))7RC@VL=|C7fb&*jWMse(aaH07vD)LYZ&7 znZdJNkqpHK6JJ6|w&oOe!~nZ=gi4cH-ZV*}f$R^tZ#(;g7tzSV>{8TFPA*(aAghU) z$EAj5ab=*#%>Fb1n95H4YQuYz;FLtjkO-^$*uGKJ2xGmYqyuHeIe&TDemKckpJ6-h z!Vm${%IL;Q2s%bjc%k!TP(m|(8ve6yM6^o&(TSWJzg)o=Spml_dp~QD)u%?% zLIzcBF>as^X`igLY9+a&yxLJyJ3zKx54#9s5*HSR=&{kOmGrFX>8y0k;_cyTwu`^L z{rAO+?Jvhr*0{Fu0xvr!(CO$EzTuOkw72P-aJKx5?p3JQYGeLgcjP=hA%BZ;G)T2E z+ka-}gVMpvnKnkKVpnxspu#G8-E3iDwtT(yz2)O6SIL;Tz_>4v4<4p)fddq$UjV6m z^UUPG2BiH>AjRPWP)nj0J^^uXgwREo~koT7sbjuv3%93PL7pQ8*)Op{wSAIEcY4BKUZiIj8-}yHl$$n$f7qRjwlzpGL4J-!93|2b(Um!ps%vb7lR$l z>=f0juNgl#J?cZF%Mbs%4~>3t_PewF4JHckNEe53opB6f{)sBe^S2pZt~P_X^VO~= z7As}s#f7l|?xfyurzSc+6r4xgvBh?2j5s!CF0Q>Wz|y4=jvj~6M`Xfo4)Y`_<=$PK z+WL4`Ve{bfZ6YkdR-{QYrkBC$$+gyU=^p)as0AFyv~?$$AYThMR+CjM980U)9oHkJY0*cj05KJmyvrL=M z5vZ=6q*($UE{mkDPVJ2l4PyER#@{UosvZCh<$f9FeyET{*JZl`y_E9J$Z?e^u}3p zl6m&x2K?UA{GYA!)DT11W+d;I@V#GLK9mraRuN~JAE|kW?&#fBNoHtC6xilc1Tr+X zIIz&NA4>hDw9)2`>QvtRsf-JvJ>Zri+ZhsDEVEtYeOwo`l+;|MG$T@0rG?eC$*2`3L=d_xj3dAZ&8t`<7m( zztivftDo!ds=Hq@jPWjc$(a-XtiMa%u>JBG{5|8_)wxQ0a@CT-uj%jS|9StrbP)gj zw|+204$|cDm%Mn#EdJhp%+nVi&foS^-*uB}eE;>AN1jp)>dM(eyPwD3fBb`Q%@TI} z)#F!w>q!1~-14RG9mU@-j9&M$7xMQVE3Ud}4u9W#_^gXw!r#*_T6e`u`FsA~Ui8dy z{M~=q`yM=jzhBU@C429C`WJ8H?~ePA{KvQP_pCo3 zs@=ff(mOu!;am9IeZ~!ccNc%J{mR{^{SAL#)H5gjC;oo%=ucl(N|R*usqg&P&_F|h!<|GE!fH5 z&t8Ajt)JlU!gsvoh@bKI=Kp>}=VmtKqc3b}`y_uKc>k-ubPOAE)5BL>e+_?E{p0r^ zp3TNgyZZ0iKE~hYPaOV}*RwJI^!CaH)7Y55{OXOvU*qqmet7X^pJanR{>pc}>=SIz z=k6&l|4TOL6%Q_d-Y?jo(J!4h|LnFT`5(7^>*`0?pnrYO-+%nAY|vjnx#p7E3zFnz zuc%)9#@VdXN00ooud+eM{^IeIs>gsoOP5t&ixb7~{`*z;Ui>ol^P7ENN?r~g-Ll}Z z|Md#+V(g#q>v<*n_vHr$)^#Pxw|;Q)+CM)vNe){uKKjtBljO4ZocxU&S0%|6ADXxO z<*!SUb6)(=dB3w2{CH~Gj_;nIByD$GGJVa?B>Ce~`rU6_j3Vv>pJ}=Cx02+grPp23 z{`MqUdhC<^Gv7~i)8w!N`lC$?cdD8WNktEmu<;QP%?;}a_`irW+Xqp`nruj zx$LmyrysxOC66zenOyy67ykV#4sS`Oz31vjkNTIElW%*=jE=h(C8u3B^jlZ;zA72MZvNjM{?X;h)prdZ zb^J|hK#+e~a6$iu57V&KME+mrpD{lsHiZh1p;)7Ng<_xC*m$%emp(}pi?m`EPH z^?84~_`0_w>t56P*UNw7+GO{Cd&l^|*KSTaUOMuTS04M>b{)+K8-Jd-9-toST zUEfRgf9>C1|MszGl51vH7rytJ+3Ay?J?filzjI1je$T1Df6r&nPPcsf7k_-)<(H@5 zKk|k<&;0nu(ylN4^9#Rl=OcL7t$XWxPJiCCn|}WKW5>R=*2ORS z{3E3m&;Q=}$CYa{lJ)njUo)H@mb~MxkN$A*lZPeeo&DA;=UzN>|L%`3{_vlyYuSJE zKYU>8ol9mVU;M=5`yX37I9f<%;&xlULj}`??3Nd~NdJ*XHd!>GNkK?|byUbHDZZP06_r{6%ZeAD)wx z51-iki>rE*t}lGy8;@N#m{h;|N8kRyclIWCy!!4{=l|YYlRMt}^4|XYu1}tMs^{C+ z-SN?+e9^Ucf8+P>Odk2kKfLqq_xx3|d;TB%wDPkb26^f~Zhg?C!a=Sz7t(`R$ZcCg zzHn2H_`gefk+@K`aMhvOS+7tRt~HcZ;XU{qGlC;xc|t?IXzmxG@SMrr+|4F%D~J=0 zNVoLBP8pmTqE{^OfrhtXmGEhxA3>2PNuq+wbY}psCK*lqX4NnDrj2%oUY=S2QT&SM zNz2BzS~=&49VcqerWkagxP1keAD@L4tH5%9qv1Yc;(iY+WFrNAU#s*h0p-&3?PJeJY z)W(b!B{WO);XR|>af6mE9e#BJ1O-~B0s!2aRY_Kwo=X$tcc4SKQcQqvQwYn#2VC5n&&dZ+Gqe{Z*Sh5EUoqZgK8$NitgN_p6+4Y92P?@E zHez*N^jL;M*Dc7W7Qbavih~wz@Iyq>tb*<|Luhk?!$Y(N?r3LtK?YM)w#t($bY#W( z5I}&Cler2e4Z{s_B zi4|LCR-$Ef4{CQ#M>i9|YXNk~eD|s+VJIA|pR^NK?b=Cksta|r9xLjD+!Um8ffq>uN%fr0 z*+K)4aLA0Vx0lO-97HonehQjS7_{ynAea-67WK5nzz{Hr9mpDkm>qQi)5dxn)ab=L>qN#17R_Xl9te-AE9GH%&DF)y4RY{s+Ay)`4@NY~Ev4a_Z8hp6CrHwVjUzxEfhJU(3*6 z)rt}H>~Lp8t9qke&#wyPjh<$#dLalH&8AupT~1XE+@p)3f2{XXtQ<;6q)I;yK`gat z=f(>ja2M{e^ptkg`1(XeA5{Ijp5Q50HLOxf%%bv_qp58eUkFYq$QIhSJ!UEtpw$!W zl};2duftrq3OJ@(N3v@0hM9qa5>M!<&@KL|=BloI`tsVva>=P3sH?d*WnEbZ!N1wL z4f`_oHMxdh9NAGgQ_pdD3^_$Ai4tIe;Q9b|TydzrZon7U4J_9!|2E#R5~9Y1>?G)z zoKLjbd%K{s$GbgIXu<#Vwcqx3fDDsE&R@I2;+Gmu8w}QyP(7NVv@*6@a1~*z_Pbfp zt)TRtRp1umXsIYsbZK|oPorhPVh|^VAcmyYnu3N9n87??K$*I|YQfC$X2F?;t#{jY zrc7KDzSg1j59R8l!2=GPt4IqxIL(tlh{^OCN6wbR5@9#Pq2*LS@c12BHom}^xj`0d zFh~#*a9s+A0wE#;8|KOexKI!ZN(T>~;#t7+fPldfahO=T`SKu;v3DQKfCB?$b+wgq z*dSxpLjY{UnS;bl4FbSw*d#C9og^q$TG_a6W;+yCPF$4#oNtzFqr2sEW2)P5kW{YE z0+j!EduJbGS6<%tbDcY8uC!QBGcV^d^_s)2;yKL1&#bTM6d(Zj3Jiq7t?N@oj+rM(mqCF1r&YG{Gd?Zjn zz$bEAPotCt;f=VMizQQ7<_ z<*+sO0vCFzLbO&ox*1iUNf zuDts4=1yJD)7;N7_b?e6{&`I3@(8r^v=T9h6x#3}Qx<{O;>1w4$kKr0MxQAXA)~`( zv*Dz=LR#*&ArBYL8ND_5I~T&wU%Osoo*%C=q>Tuu>6v;&a` zn@SYR`uKCf=C&GLeAY<<6gzcMDHiJ|(>hCEGy0bE{Vrc4ct!3;F&*S(WfR!eB(b{z zqlOX+-X4uHDJgMUyy?alON1C$_siORD`m&2cBA=yVI!?#QgWQoQ7f@iIbY749(Y+( zj$R;HO8{5%R}Zk%zuZ!48_ZjYhh{|=GNM$Myl5BrP^h}p*~l+kk`meL`dDSDS=J6o`-)1bUYdJOp~L~){d=kjL0S%Q0)eHM^= zDHlASwyO(}T_Fg(>Zn6jWW6RC79est5VV|@EfBE{6r6R-J+!9z?#uA}#M*Sdc1Nud zWyRBrKYVrT`u5#x>(^I$Q6M#-G;jj09t!N|O}?Tha;aAogAdpDjo;oc!wk5d+;)_V zrNm6!Y&S&!MWU_jdgZ`z5K=6xzjih87&i+JAq@7UEPy8bk&LG-qJO7H)rp*XdF47cr&5x;! zdI*=~=2d(exHNPvfQ3+dxJZOb5~OREDJ?!!(v7dx5l|VyJMT2$NbTyZW0-o%c<@vQ zEMfzt=5-TbaLfd^P?KyCs_Mq9J4SS#TtI09@%9`_$Ce0$)je$=TlNhOCs%np^A?CF z7m(Jmh8w*R|z)!HB<<6 z*1Ga5mx3f(!w+b%Qt(`k=CvQa`u1$>9Q=~JC!uAn`bV>Qo_K1O4edkMp)n6rCk5#> z7HN$gSVib-kVq0DKkUP=!?s`qV;h% za%kOiz%tz>IWt{q=!;Q)A@7S-2CJ24(eD^zL{6?;%)PbNuXejCWwc9;c&$>sQ++F5 zF}Av_Okf;Bc#Ft~w?xlKbI4DX+|!o!viPN4+&H^Fse}=@rj-q)fm*v=j$^4M*5M^e zZtuYf!o3oa`y31)xSn}X6ZYffLC@FqYq`=AP3L$2CXg!faG$Ci1Ne8Adv6Ao$K_cv zUX_qyI=nErOn!-6kj@i?-_^uLsiOD{%t$|Za(!)XnVbLGkE<<=^LyA8_XFEiqb9d- zy+rzq;u^9Z0FBVf_*$giy9QHqmU$CKzu{a|=bk(nLuexR&n)+5JVn5=3f|NfUbB;0 zw_dxiRzDPpE;v~RQg4RYYJ6$y1+mS|>PW)6fH>gO$Ckw9NyoNxJ~xJMG_G8?4KX7b)i^i1F3WT>?mVm4RmcYoocFVq>%}!6QuRTFX0Lz%f5LQsz@yW3A zMEC{W3{%y%l>y%?rW7Vuz<{h(!}VsMW`B&9W<(w1~^AS5hqd3~|jeCAy+xu<-4;d(-e=M_@Zyr6mhr8iWoZLYk}7DgvZi+>BxkDSf;m~=aEY6f86jCm;2*!f$vo?vW|Qpo4&u<&H#1T(X##085j z$*Ucj< z#y-kX>8k-dU!7Li1YYQcwhff82eG6!qtFgX@C0w_sQb~9TTrfb(cn^pn2j7?NCc8% zixx&erNJrz)fsrHtLyEg2ndtJCVF>2iO~r&jg}Icr$?)+6`pfG>=_tlJrzT7uH0Oh zhyb{%v`8GS?{Hy?>faLKKQ6zzp8U6adyFfGoQ79tDNCE3!YD=5{xPcv<$@_5b?Me%^l5|1q@-@cQ4 z!z}y9kDU4k`g!KwyU9D`i=WQ^seWev@h^YQ7I*LbHX1~h?aPi!F=o4Soki${Y)0}z zzy3?xe|(F6vwvw5`l(s6FHVjh);hK3J&&(zb0n?i-?pFczWOf9ciNvFR^hUg-VGo1 zKYaL~yyvIv8U0^%)E5t$MmC1_(d)j_s~yQsFX8Rrw!*8+*I((ue>yuJO#Q`=d{a!> z^Vsix&yMb29=SFoK<3we%vaaW;P%_gsfV&h{_Om z`n}V)7U=%NKRn3iS$5aOWA^jfWB=LE{pYe#S_H?iMyr3Y_}p20#Q#sjX;@Kt>3=O7X6xROt7df z`I*oB_iq_6`^ObPY{|y{5=)sl^$8nq>+$1;R%gG`{a+fm{`H%wr;cVSaF5bLNj}Zj5qp4iiQa-W6P4GnEggUM1t9G$FFduWKF$vQvPn)uB0<%EjAC&ArvH`{JCEx`TrzDZKqtyQ=%4eN(mU?fo*` zCJ#-xbn*R|laJXUCr`lJAFO5d-%uHutp8Nq8V0#)jvRsV<{2)_;atB=okpDl;00Xl zn_>O*@IB#|BW-}fKt=w!!_2{>&*yoSE`-uPg|GUJ$?}0X(&k2QV>?y#g=({1jUeH( zl*?0EszuUFhvdY2ioD=dDV;FWQ|7!csLjoa#;swt1Vl?)z!4lZ*Vim#?a7XN48{3u z)tU_>Y75)!Vy$SvYihqzIn4`)8e4dLDw(-wM2t!dcQ-6~Fq?QtL==E3E^^DqXF3FE zHvJ$lT7G+PQR3+EN>#SbbXa0RmI+t^Ufnt6_P<5&M57~a{>NXez5Tb|-#3i314-xfA7x1V zCEdehHb1NXw7m3RR{w&TrgrH>;C4k0G}WBG(C zqa<_Albb;p{-;LKUU0GNvt*7ci^3e3_{x-pFT_XLx}n&FW3%i+YcC;W5n?Mz-pckt zO&_0`!spddaL+O%gPIq%Clx30Yvei>5;FI)R^9c>H#`>F4HxE_GPi!ZYIlmM>U3z`jhc+G=AIFUv4f)$ZOh*zM>YoC^y_51to z%EmL{Os~aot7R>cf#?ey7|}Fp^D|}cn!=Epbwlk+1BMh?&Y6A8+DyXLZom5&u^@w-Ql4~ z;|jw0g@NUeX2V+kNNWk#PdSCE@#UWoBGN3yfvT%1iRAa8QU7Kp80sf z2*8N90QDHCh3*d)8U9&2A4`Z8HN%qopy=lkjHJ2*nE;(VU(w8;QYds$_+1+A0zp=|;lS+ED0EF$Rv*(T>#vSqQjU^h) zpy>!EFZ;6F4_p^=o*F&k4KKRoCBU%T_B?qnA4UJS@3I{ zpFx2zb3})9Ws8O3dj#sh<=mx-i)T@_()$xL(@__v1PPYM|6(xsr{3qJ^rC*Xr4!~w zW~*TZ3d15;B4fJznoS!H<>L>mO{z1?!wR!y*>l2yvt(^7&_xKOf*?&p@!oY}z>0y1 zZGaZyYAed0QU(r@H24Xe6ZeRIO5xW-77XHk6LG$8?>p+0ks5DrIAs)nHcu7Q=vjcZ z?7OV!5P?T%(w1MKzUKkLhabSLYb%pjQ}vXx#RmA)AgvP+IBF3X0LI{ng(+(QD9)^} zTb#`&Mg!fV|*EuK86cM98c!STv|;R(JIf zj;7{mb_CgEHu=*y8a|kQJmEhdNnrFj zS5*0C+8_O_7B-LMkb&B98wChiP?e-Z`0=?Nr29oOj!l$BTm}&>=Tl8+5%17XD0SR_n5-IYl zGCY*9DL&(hRq6|cbaw7)poB@7Wy7iYaB5bj)niB*nMH_GxaU$Eh>-iILxXikuPI6V ziu!5-1}GGDndLT|Dcx6br<`w!AaDP|u%21;P6(9lXyHF0^FzZCyl$1oQTnO!R>k zqhOQkpLzCIWr{)RVNtSRnrV_5l>=&?A1E7sM@ce=ouAM{7nW%bxlLc-(7cZcI(~0K z00daaBchs)iLz^J^nz>YeQxt3uT+_UF~EIN-G9gAk#bg#s#Tm`RFeNTlwRCDC}8AM z7cu0yEecwnboT6qMUz2}B>msnHfawsn+z0v{OU-eW=n0R5S_tF4sV&WB$~R3JW1mw zwV3x=ZfC6xZ$lW;Oy=YQ&lCwAzU&p@vn@FL1^}<7vf9&fQ9!HIzM`Ut`I;i2WZcE> znQiN7|G2z^J$6|x;GX?jKog+?WhpDp`r{VUEB6|mRAG#y5oif2Tc{|_qTfF5jl@X~ znJE^vpxPCjk}}V5$Gif|SCWqMd^&sX-9MaVjcGi|@>tlyIcY62VL7B-`CEK(l@3ze znPgcN!Qv`NfoxYAt8a{-F9!~eP z-p8$G{=$xF;r{f01?63cmA*SN=2pn<^Lx)|9O31WUgn-7fM&z01gb@{pybmg-QJW- zNo2vD~$1n-0KLu-QQYK6#N=tZN{f{ zQsES)rwaKIoFXm*>)lpMdP+rCRvs0MH;j58D?Gtri@xDLn%u{Qz;m5V+WVET7+|(f z+u8$#y|UEzOu)m+7%T<4^W*TTnE?MA*C!-^)P%8P5$n#L>HYO=6qO@kuBk|2Y*h&q zjF#64!e4-Eif#C^T=tO4w|=yvv7OC_`VlBc=NQFR)###(l(?1$>?tIWbi(d2eNcqr zYEQh40#{h0ijjF!R$+*tzkaEl2B-{bX>(0M4*?IKe=%YT296Z;9pxj~T3-}<_)K>@&{ld06O;|JP zI2`yodOo}yQKRuJ_nWy5a}mo=M*Jey3JM@`<@4Yrtr|3 zKP2rvt;q~Ns{}DziVpYINJl-O;eCI5kmGb9$7FyJ)n7V7<3VT8$+jp?OY{Na>Bvd` zp#6lT8$`}d(QDG7B#1~8H9q8LlxOdL5kiP1xg{4%izPM9yAVM*Fubt$Ox(oG@C~b# zR!B|MCYHy#c-+-V?W1HjE@%I$Shg$`QI#o2I~ffc7egi?!ILj;KNjpIK;upZbk3%X ztNN`DVcD5{DKI58tT0T|AhdiUmfmYiji#!RMkIwpYevf48_6jrVCR;>2c?+*PAffN zBquh;prQ#2JJFG0%bXMgchN4^-AweXS|1`Q^pV86YS)_|X=m=xeL$GrmXQ>}+R_*a-*TC z^6XeJ*R&sCg=*q)Rq=5AvTthlYa6OpV>asimsRF$}cx0AAB@zUoMK)6rQ?lcdo;!x9GAYgA0wm4}0i2U- zQ&bo(N_NfN3+xwZuA~DMYbs;ts@=L?6vS0gEon6)K=5Dw303PE8}A>QOTSUBOAD{`B<&LHgp-!(jutIvk; zLXKyRsnzQ>{a<5t3ROi(lNVv)IM7WdSZ{>Rp2s-=QXgl5trQyT#7%j-9%B=WiwM<} zc81`hwc_XHU5dR!?!!rJb5v9q>blOUmoX8?E*zj@2jTWP@-6_*m=w=*1(&B}0FO zOSN5m-==@3FGU~Oftl$d{;CtOs!oo93eRp1+v43b9O3!tE| z@nZfb8c543$MP9HWS8D?QZL?`nxddXj>2=@u3rV{r||K;r^%oCSO50keSIVyMcvEG zA}9$nh+vwB&S(dv(m5Z@t_h&fN3R~sn&&q_Df|ENH|zHYSh7fYt-BJn&!z-y4|Tz+ zgYFBJkpllo*$w9}U7S&i2McxUMJR+w21Uqu=2i820l2HAlFSEt$CXaYdvN`%(D`=SOfn62Ij-!v> z_eE50SBRLx>oP7pndm(nGG?V`7#QZmJxd^fIlG?=4eOmh%0D3*7Kxefuhdj5CCup% zj2j{hGy3RQYfeJQ>7ab{Cezr)y#lxWXghza7BgW!D$?Kk5M?Kb-VzGSO9K&AT`>HZ z!V$$mgg1Mc5Oz4U<#l^Sq0}Co8*4oZXe65OCbT6nmp3SS0Mc%klO#&4a(B?Z08mQs z8IUJeNCfSNT@V@hHirP(gv~cdVheiB?Dr~-`Qgfrx&brD&=$DKO=zr-X`j35d1bH{)?U$tm4m7Np9Be#^b3 zNXqJ+JV`%WvmNI2?&wS)AGF*VBOM_uw0zvQ7OYQ;-X2{-}0H_S`v-DV4nJZ{W|&8@H;%$)XE%aP3QO=LHE(l5k{`e;N!#o zZZd(8Jdr`ca&odGN9T{Us!P4uK*dXu!O+Ly)pNFBTfLJH>L4_uAy@x8<&gI@AR(1M zAb&)Ax(J~g$P#j))0jhbdF=+s=TiFsf3mC&cX?$rfQr*6cNKPws_*9pqPifVgH7M9@&yCOtRRAP7dzMm{3pIrh*jA%5p^}UFqq9%#Hxh=< zeKyj@Z}w=w(aZ%)=`vLY7lo(FBJKTM!kBC0Z9oiT$Kb9QB_niJ%vLsj z^~JolHB|d93A69m{|lLIDNJ2;ey9z8aA0Nv0efXlW~Xws@u86ZSIgeX!8JZiU?6?z z8QKZUQeHt~^=$M0B3H{S9x_>kAas6K5nsxA#kElsu3_(T;;$uu$W2^FF3pi zjU(xjW@F~RCqIle?p<8pnkS22&g^#Vij+>9%Drm&?Agu+MGL)6(FIpsy84h3*wlPa z2Z__f9x7(jzQRSCEUdH;^{3EI?1YKvrg`NDYrf0D6rX`h3=~~OBn`Pt*_%O=w1rWd z-$RP6E5GI>BrxENi)Tp##sqKgy8Jx9FMMG!(X>QPJ4YN&rHct-KpIFzJTxwJ5Gj>g zspN-yJSlx8Cc*r$1n$mQaHD1n-B2Y{!VBB&$7`7A2ta|*QO-07C=N}h; z9+hDAqANkh5yaCxz!!HC&LZ@!N>|Nt z;$6J-X(3r{cxcZD_J0sGQm(wl!u4YsF_1-*j~w+P)jAQNEvY9*55b*c+^I7dbLbZj ztPM=?Ato4pnr3B{?Ci8)4QWz3Cdt)LJrG`Xh5TylSrfAx)4Cek3tE;GX<0&jNJ82=0 zmuf=N@fi1F`ppH!jT_FAEdfL}uG%r$Ez8CLlg-PT9T$n(I2J{#d~+L$Te(vnH}69@ z<=4oiUnJ|+C<+n1+|%{a>Qa>kR4UWxg!SkVS;GC)5Yl@WRrVYPXWVNhtmVbv&BrSJkn%yOEJcp9shF8Ewo$0d1W@RGUPi>^Ouo#$K`0m_s{#fULkQGM!< zXapaitVh-S{i{z>GO4KsLa5g3-Or^o`cK4yWRj&mPr34dzq=l6XAFEMu9gaR6z@zYcGc!KrpL7?GNXF1`TR%*? zL=QzkB3*zOi}F7)zNh8#Du-4x1(B=`+`0?Oy~_)i&^d}+B#6boH!-U=0lE~x;?O#5 zwwGd3E8V3{Y8w|-IAXSjVpA;E!fh@#SfA3;k#L@;A|JkQnvWzQbc}(W1iumuBq*EB zdBaL}5m0tVc$}4rm#pS0UYALrycFv>oKD`Co@ZZ+G%50ch;Dg@E__+{v)*$51RNawd)aSCI^!kk`Jn|32>#(7U{~xc&$Qc}&C&xDs$*+5d)&M0U@a zfD6QL%@gsP$xVXWso8tAb8a+Ek|BdOBTd$OyN|`YG7q^MlM)cLhKe1d@R8-Y2$CRl zqNy0q6k$Gxgg9{ppfdEpSsvU;u$x@eR?v6f#!XXq{Lvi#s`C;kb87>XhX6L0uWTt= zS$);?%UFw60ET&0Mlc{g(ujR}W=h=yG1Hrd`meD|orKxQ{nxNFd~x=+ugAxTRh>1> zAb3i|wbN)hEiS!+$A!OXGGE3kcPih|)zA>x zi54kZ^GA=E@z~1`J>nlr0ck$B9}7NsRyF* zRL~mS?{sLpo}*Fh+)f@3588qJ#{vCu8pz9S@5fwZxLo#m)ZyCB3}>Z7Iu;NMbR|ss zo_eD&oX^*ouyh`>g5qYgLIiyem=EnzQ;UG(|pYk6cM_>f2bJ{R!s3VU;hq z-MTw%%_nKM?rYhFSls@_;68uvgtUcAvfhpQo6W;gKrR?R@_}^8wjOFWN%e<|d~^RV zXNM;@)}LHlS?{dX%3qrY&Z%{b>#yGef4DD2tN^k$e|DUQ^_L;Fz5C>)4)+gwwM;7S z_vSMu{>&wDl@wbf3F$GErc$8;6>luV;Q13{t;~%zd&Vd%5X$N`Sp7dZBRHK?ju-XPcl!o<>?AMzrhRofRwbi3AR)X}(K_tSeia5I`se zBvXZY-4-`pg*@ekxKK@mV|XDtq`(wY56P655-w|s*;(Bs$R$WOjW#YXUl8f z-G4ee?nWXWAJew`|2#xL794qN9KL<+B!O@g|41)tXnzJP7LC2E9R^1{b+Ia`@O^O7 zpuBt6&iBpGkC&gTG*|1G3l@-~YC=lJgpLeOou8OR3sqh8c4fWacM>kvi|*{t_&Qpb1L;HT{6{Set@63F9ko}>iT?vo5co}E>uYBo_wi!|Q9;SkJBFD((a z*LTXKiv4i^M0WVmg;nQqwer{TagxL~whcL@*^afC*8bIh!=Q+Eio3s342JPW{Lxg6 z{E%KI902|98T*mQVb)$sPF6k3*ZC+k(%pnpU$-3EaYwP{ReRX1CYdxK5IzyiiR+ky zTe?T1&~WBgknOK;z5bqGw5(UjXUw~0niY>(9V_Ba?ANN6Y_47#A|^RIR}O7y^%i;w zd`9+lVF$uels;zJrdom8bc}9s-^&U-)EZM9lRp&kXUhePfXT|rk^IDE0y;qUVKhiq z;f`&X`BbuF{d3oP<=kjJI(ZT4O2j2Vi|wN~wWmcuO&PqTw-m9hHLD`U8%*zUv%1Fa zGriC?$I8>HI#3>n#!lmv16WWL@u3*FWUV@7%T20`&C{2;q}k%7X$NvG-qMg`(Dkhg zjsY=j$ZpCLv^K0j&v3-AVavw;@$vH0G2ZP= z7z<5X!RRgGCTQ5CZ00l7;kRc=52r0+OmS-iQ{XMGd|-|7&EQlPC8o>B0?HEeAkMIY zis=9i`W^xYjHr6kE7i0AT*p;;M-M_2XbxlsNqttYk$g55Nw~lY`?jH%Ei}5@SfEnH zrpoh9Cm2XkJxE6O!o!ti6kOIS$P?s9_i}q%53o_KlS~Y)Kq?AetSb-Ng_*lJzw%irC4Qkpck$fT+7+B_;xmn*J$sHe?$J=+X{FDd za|nXV6x1Zt)ESrVHr429#P9^3xn~|ob0fLKZx$}#(KE>R@|Lwz zRD0E@8T3;vzZnwh(C0?)s4y%ilzyEzX)YF&BgDM7cI&Iis&6c0;}?ms0vX4gzP}pd zXSffJ=*edHoL^S*p}h|^HWLHi^=JKAI{>#7V{SJJrT&*U?sq0x%W68km8CWSru0Jh{ovwgjG{n zH3I^kI~M3@L1i@jqdHG+n@tbIH@Dyc1|Xv8-iiuXkWwOl<#wQr86Y4_oT<8KT0y8c zwNW@OIxe9sJ+Q>JM7nbO+kyw2Af0tF{c2ZU@GnSTb z0BQFm7yW8Nnel~7wV@qAT+U=IX3yqVXi?)|%mtwD^KsLkcd3ELE=xLj^3?1bPM%ar zjICpi)@X}I+O?1Et=$Rtd`qL7ja}kOg;|rbS8CNivf3y2){fBScPTqPjiY^&o`Ei_ zbdk;P@2wr>yB}or57Zv4E$`ie2TiK;B}&*o;*O`wa0j&D#2px zJ!H;ln&>K{=mU*sKiIg?R1clTp#V_!*sF*LU+NNkP~9Kc5?>@qLl{q*Z+_gxO?S?` zLiGdo<3o*SiNCrO^TZue@hf%r2uTT=ifHDNpOVpbr&m z;Ay{b70}~;g3L*lB2J3bG{SW@Q62lN^TdL+x!?@dqP+Q$@!&1=r*e!^Q;LO6$^naL zR%OhKsGnERgw%N`P|u7GKfT~o<>qB7rXCl@X0;(fC5aAu^sSBQQkFy{Vkm$P zkI3und6s3jcgKe+!bu;ua!L{ig-V62s>~d{@TZ788v#ACzCi-u#P#L+DWc5w(Hz(P z@>#ti3crw2+5|wJi%v|No!&LWUWdFv(@Gq*?nPU68We+HgNkA1$7fPf+j%;HT^|jM zCfiGmpRdCqoJ`X(l;7v4i{Iz09b_;2W;oH*kc=bbU}7EBedk&(DYPWi6Ji{bn!wc4PRSTI(_E4Q;zi3B?hF ztG*(7Koo%DMCrRvL_ZIWZ@Z0IVA9fKcn(`8x{zA#l@?d@S5>lBjOV6Mv`f?QURNL9 zm(_d`8nOEQ#neF*hr*l~^zb41lDXWrvqvf~*XzkuI5hI=kps)crnJ6dgmk>}D4Ki_ z*6WF&e&Nk!{p66%wW;1BRfj z_i43N>U~fG*$IS;ws*0@a)WxNEdVaI-*4zyyxdvAlgUMpgHylRUgp-b!0ufD_;j-B z)thy9aJxvjWklD%rj7i#(AE1Tn}zS7_mzv}D?G&FxkV=nBPgqTGbO1;E2=il~ZCc-FA{F4~lWNUkgg>bST~JtmJLi9?HSz(4Oc~ z-K*f`q4?;Ip{Lb^#8ipUrV`SX?@RmA`(P3RObhpXUTcqoZx*-ZawmUtq@kj=kYGOt z2G1G&Wlb^ys^=2VLDovdFLr1OyHjj13uh16m*Kgf)__VYdFd@oSWc^bneq)Fj|r;Q zxP(i~<-<}IyOq87(d0ctO;o9KUA2YkKN3G=BP3=185!yLth2Ws4cdGln1{H_L~-uz z|Ce-i16X-7I8hL)i#r zJ(^I9ZJD@-W%TYuuc3J2s*lkGA|DZJW3)=X~;v1fooM*SysuwIJBS*r{QpN*^alGO$ zrmK*otu2>s0%-K%VQ9TRzeo^A&IZD+TvtTS~dm5)E^2CJyc$X}q&44on`0I2uIk zA44>}QhQ4j)64D~soyA0Lf#%&pk)+CiAk@N&nbXqb?d9W`tg!t5XjB5BlSNhM)GH+ zmI|-&0HK5xG!yUTQ{0v7T|4KjG>Qn)^vLjIC1#YjGF6V;*fISG6xOuPvxzQKQHwOKOv=G4P0D`p zP>Ne8ghCU@zvsFO9GrkUR~Sf70JU)y-9ag-Y0}WP@;!m=VkE(av$J={c~L^KFk{2@ z`W$+~2+4Sf7fJxzR{~Ng64DBNZLUD-+ni=@+iMHOs77o!4(fGm^)zO&0mASV1$;%> zfaZpB%CwQLZmh26OV*cM72KEggJQyxY{gL0<5fHf*JH&~ zk{@3ak6r4T80%%XHII`+w6r}JHBPF497>S3VcazmxJ4ciI?7S3(^9Kh2h^p@^CfH#xmLj%* zd&9E9LQ^PLxg=*Yfp3LRamQ4l#cmwp!dzx3=u3;ODDWN!i-5kl=VC3(>Ip^6aZy^0 zNlCZHVri`W0o63Z%DC848Wty8crMM3xUrdEe<8RJ9|R{6gk$3lG@_vV_0`%3MpT%a zVjg0ne)4Re(`%K--oKS%kWlxY4-;DIo^rOiLB>ihwv5omor>?A-ojMnX`-= zz^ti%6|dbR?~VE0?tr{*wCFvIpWb8xMu|~;VYub>w;PQ6k1Mz{ArdZ8ICybY;e-RN z)zytT&U`cb;7Ad@Ht?s-v@Tw}gkK)MBGVy1p%;iOVe%=zFZ;-VNGO#Ty=OwFFosNR z$xjpnYBV-{+#Z_q7kd-6H_wwdF=rX59?y)gCh8v>8D1`_)E4GsDyjsVE$LU7Ta|Tc zx=tGFO$Md*Mz@WPuF<3MY)!1CRiQj>!No7AQqc*Bo>*L{z1F5RGksLOc}Wt7#cTPv z$IM)A4Icz<+=TGSkps5uPmlc3$bs**9`>-BUh>@}Z)x8N_!j5oYt;^YB&#BipchD3 znDQn{T;q!vkVY>K(Ikr*ypg*U6IVUCcG#;>F!*BWP%&l2B_F+Rted#mK7Ib>^t`B2 z_##ZVG&}RtKtu0@*{REoHOi8q0Yjh1LuT05_6<_*>8>!1BD&M(OLE9+sN!4kewV#r zcE4#xeC+W@tKfI)gV$~O;^qk@dHH;4JhDB9+pf2<&r^TyMP94yBTculb#W($fexW+39=tn} z=bW7uZ&k)44@&z9HAPtB&sxGH9ShYolG=nfk{Gafy(8WI0yj74_hJ#MZTQr|@X`wJ z6Ki?nrHT8eW+p=CBkxH<6x#3vLCeelZ$fL7G6>IA2cYf^UHWo6m6$BYRXqEGw?W3T zh9l8gKPl6$m5NDNg8Uj(@8#J&)?0-VADxd$Qs=pJyd}%V_)q9=TD@Qm(@Mb7qK#n` z$}>9!T&A_8Toz@6>n3VKB9UXj#(a{|Gp{>FbKTdyeyo+}xvSFg)fr_3lF0OogmN0H z$dafoz&x?B=%dH-AKy^9eb1nw^4XslDnBt)UP(jcGoSy7og$y)-$py-`5oH6n<;QQ zSkXDbNk`XOv$pcX=xE4S_YF#8KzMp53nWdF zkIwq(-*Tlx4}3L~MZHKK&-@wpmloouJUV2MokyAcYYkj8jK5i(qmFWe?0CDV*hH2D z>RR^-m14e%BxAOZYP~LgeXU4B4%ru!7b|5D*})blv!8%a;Bm%Sq6>%)l3K0XWTVnc=x=avHMQTj)%yHfTeYveGI9g-?celIoLso4 zUW}8AL-{-4;`&a-!{ulx?j|a7!_#O97PzaoYZphI*#R%b+x6v0Kpk**y|B0I$5-8# zcf=UJ`V-atC#w5RRd@0UWa0PwSKXF$S#7}>lf)*eW+yB}L$qNkRb(Uf>SIZ;%iMqO z{yK>O$P79cAY;>4`1H+f&sB>gDj?5Ajfn}%S~nR|K8=QuH#bc%mmd;|@j7rz?9Ltx zWu`+}4Ag9DOk~Bk-92%4@$S*$UCQ`8a3M`9Ewi$?r(fjisOq)Ef?uWa%kXUB435Bu zqGi2$vqzf5k;d^u=v^r)V;)}fBcvFK9(8?3w_&Lfkwu4+d=8$)NIAS|7P#396`hF) zOK42tH`D|A5G@6_B;V;4%TS0;6{?H5UGnS`Hl|j}A?Rk|aKn2%nJW0rr4wA%p&m6? za*{riK42$EHVc}Ow4=q=<;jT)X9>M}*z5Y%{0c2?v=lY}br$r}wd6U4M3>7v5Yi(fcn9j_rzX5{ zByqz9sd4q=geMggn4^+=p<6!`e`d}4GkvOkd`@11^2=CCp>~-?O6~WMfgA$hJ6jgkL|r0lXpY*mc!-zQhZ|crHb2s6(73Dl&5>-%zgg;b=b|R2`oOnF zvJ3uzyVB-1*NORe>j(YM!w1vXjCN)7YVo!I**utK)gqu+&?FeCMV<1IrEmMnn)>y@ zS}d(TU28oU?M)E4Qq3_!fD39ot*y=Hzd(&VaaUiB>+&qmA9C;|{Ap{}cK&E(&g!14 zQ-5oO4go&121}(vHuJ87zA%VXdFP`E#XZM*kSVkuvCzrv`nfJ8m_ec{gj-%CBRh`? zZUW>NHNgctpqovQoxgvbL>mL~3@L>@&ZluIB^7UUbwOFL-k^jeJ6OldStXm4CL2$g zfYeS`yQ}jAFH!HSPLD>3RfnxWO0A3a=WNPERUO&jA2wwLTNsnQVwpBXUEPDpN1-w{=$!?TuCA>Lz+W|bO^$(tQ-VpL5k-NKyWB0_IO z+m81q?Kw{)--zUNT~gY{{4|dtGddOim%onc+8z&fk-61X$1yNh8guM~mzDg;#w*XoOhsis$+JYa Wn2`Ma5y3vV4`S?twV5A|Wd8@;y{F*- literal 0 HcmV?d00001 diff --git a/chains/polkadot/config/src/lib.rs b/chains/polkadot/config/src/lib.rs index 6997d2f3..b93e6d0a 100644 --- a/chains/polkadot/config/src/lib.rs +++ b/chains/polkadot/config/src/lib.rs @@ -11,9 +11,19 @@ use std::sync::Arc; use subxt::ext::sp_core::crypto::Ss58AddressFormat; // Generate an interface that we can use from the node's metadata. + pub mod metadata { - #[subxt::subxt(runtime_metadata_path = "res/polkadot-v9430.scale")] - pub mod dev {} + #[cfg(feature = "polkadot-metadata")] + pub mod polkadot { + #[subxt::subxt(runtime_metadata_path = "res/polkadot-v1000001.scale")] + pub mod dev {} + } + + #[cfg(feature = "westend-metadata")] + pub mod westend { + #[subxt::subxt(runtime_metadata_path = "res/westend-dev-v1.5.0.scale")] + pub mod dev {} + } } #[derive(Debug, Clone, PartialEq, Eq)] @@ -31,15 +41,31 @@ impl TryFrom<&str> for PolkadotNetworkProperties { fn try_from(value: &str) -> std::result::Result { // To see all available blockchains and networks, see: - // https://github.com/paritytech/polkadot/blob/v1.0.0/cli/src/command.rs#L93-L145 + // https://github.com/paritytech/polkadot-sdk/blob/v1.5.0-rc4/polkadot/cli/src/command.rs#L87-L154 // All blockchains in polkadot have "dev", "local" and "staging" variants - // "dev" and "polkadot-dev" are the same - let chain = if value == "dev" { "polkadot-dev" } else { value }; + // "dev" and "rococo-dev" are the same + let chain = if value == "dev" { "rococo-dev" } else { value }; // Split blockchain and network let (blockchain, network) = chain.split_once('-').unwrap_or((chain, "")); + // Convert network to &'static str + let network = match network { + "" | "mainnet" => "mainnet", + "dev" => "dev", + "local" => "local", + "staging" => "staging", + _ => anyhow::bail!("unsupported network: {blockchain}-{network}"), + }; + + // Since polkadot v1.2.0 the native runtime is no longer part of the node. + // Reference: + // https://github.com/paritytech/polkadot-sdk/compare/v1.1.0-rc2...v1.2.0-rc1#diff-67483124e887614f5d8edc2a46dd5329354bc294ed58bc1748f41dfeb6ec2404R90-R93 + if matches!(blockchain, "polkadot" | "kusama") && network != "mainnet" { + anyhow::bail!("{blockchain}-{network} is not supported anymore as the polkadot native runtime no longer part of the node."); + } + // Convert blockchain to &'static str let blockchain = match blockchain { "polkadot" => "polkadot", @@ -51,15 +77,6 @@ impl TryFrom<&str> for PolkadotNetworkProperties { _ => anyhow::bail!("unsupported blockchain: {}", blockchain), }; - // Convert network to &'static str - let network = match network { - "" => "mainnet", - "dev" => "dev", - "local" => "local", - "staging" => "staging", - _ => anyhow::bail!("unsupported network: {blockchain}-{network}"), - }; - // Get blockchain parameters let (symbol, bip44_id, decimals, ss58_format) = match (blockchain, network) { // Polkadot mainnet and dev networks @@ -77,6 +94,7 @@ impl TryFrom<&str> for PolkadotNetworkProperties { ("westend", _) => ("WND", 1, 12, Ss58AddressFormatRegistry::SubstrateAccount), // Wococo + ("wococo", "staging") => anyhow::bail!("wococo doesn't have staging network"), ("wococo", _) => ("WOCO", 1, 12, Ss58AddressFormatRegistry::SubstrateAccount), // Versi @@ -129,7 +147,7 @@ pub fn config(network: &str) -> Result { currency_symbol: properties.symbol, currency_decimals: properties.decimals, node_uri: NodeUri::parse("ws://127.0.0.1:9944")?, - node_image: "parity/polkadot:v1.0.0", + node_image: "parity/polkadot:v1.5.0", node_command: Arc::new(move |network, port| { let chain = if network == "mainnet" { blockchain.to_string() diff --git a/chains/polkadot/config/src/metadata.rs b/chains/polkadot/config/src/metadata.rs deleted file mode 100644 index 0f12795b..00000000 --- a/chains/polkadot/config/src/metadata.rs +++ /dev/null @@ -1,551159 +0,0 @@ -pub mod metadata { - #[allow(dead_code, unused_imports, non_camel_case_types)] - #[allow(clippy::all)] - #[allow(rustdoc::broken_intra_doc_links)] - pub mod dev { - #[allow(unused_imports)] - mod root_mod { - pub use super::*; - } - pub static PALLETS: [&str; 57usize] = [ - "System", - "Scheduler", - "Preimage", - "Babe", - "Timestamp", - "Indices", - "Balances", - "TransactionPayment", - "Authorship", - "Staking", - "Offences", - "Historical", - "Session", - "Grandpa", - "ImOnline", - "AuthorityDiscovery", - "Democracy", - "Council", - "TechnicalCommittee", - "PhragmenElection", - "TechnicalMembership", - "Treasury", - "ConvictionVoting", - "Referenda", - "Whitelist", - "Claims", - "Vesting", - "Utility", - "Identity", - "Proxy", - "Multisig", - "Bounties", - "ChildBounties", - "Tips", - "ElectionProviderMultiPhase", - "VoterList", - "NominationPools", - "FastUnstake", - "ParachainsOrigin", - "Configuration", - "ParasShared", - "ParaInclusion", - "ParaInherent", - "ParaScheduler", - "Paras", - "Initializer", - "Dmp", - "Hrmp", - "ParaSessionInfo", - "ParasDisputes", - "ParasSlashing", - "Registrar", - "Slots", - "Auctions", - "Crowdloan", - "XcmPallet", - "MessageQueue", - ]; - pub static RUNTIME_APIS: [&str; 0usize] = []; - /// The error type returned when there is a runtime issue. - pub type DispatchError = runtime_types::sp_runtime::DispatchError; - /// The outer event enum. - pub type Event = runtime_types::polkadot_runtime::RuntimeEvent; - /// The outer extrinsic enum. - pub type Call = runtime_types::polkadot_runtime::RuntimeCall; - /// The outer error enum representing the DispatchError's Module variant. - pub type Error = runtime_types::polkadot_runtime::RuntimeError; - pub fn constants() -> ConstantsApi { - ConstantsApi - } - pub fn storage() -> StorageApi { - StorageApi - } - pub fn tx() -> TransactionApi { - TransactionApi - } - pub fn apis() -> runtime_apis::RuntimeApi { - runtime_apis::RuntimeApi - } - pub mod runtime_apis { - use super::root_mod; - use super::runtime_types; - use ::subxt::ext::codec::Encode; - pub struct RuntimeApi; - impl RuntimeApi {} - } - pub fn custom() -> CustomValuesApi { - CustomValuesApi - } - pub struct CustomValuesApi; - impl CustomValuesApi {} - pub struct ConstantsApi; - impl ConstantsApi { - pub fn system(&self) -> system::constants::ConstantsApi { - system::constants::ConstantsApi - } - pub fn scheduler(&self) -> scheduler::constants::ConstantsApi { - scheduler::constants::ConstantsApi - } - pub fn babe(&self) -> babe::constants::ConstantsApi { - babe::constants::ConstantsApi - } - pub fn timestamp(&self) -> timestamp::constants::ConstantsApi { - timestamp::constants::ConstantsApi - } - pub fn indices(&self) -> indices::constants::ConstantsApi { - indices::constants::ConstantsApi - } - pub fn balances(&self) -> balances::constants::ConstantsApi { - balances::constants::ConstantsApi - } - pub fn transaction_payment( - &self, - ) -> transaction_payment::constants::ConstantsApi { - transaction_payment::constants::ConstantsApi - } - pub fn staking(&self) -> staking::constants::ConstantsApi { - staking::constants::ConstantsApi - } - pub fn grandpa(&self) -> grandpa::constants::ConstantsApi { - grandpa::constants::ConstantsApi - } - pub fn im_online(&self) -> im_online::constants::ConstantsApi { - im_online::constants::ConstantsApi - } - pub fn democracy(&self) -> democracy::constants::ConstantsApi { - democracy::constants::ConstantsApi - } - pub fn council(&self) -> council::constants::ConstantsApi { - council::constants::ConstantsApi - } - pub fn technical_committee( - &self, - ) -> technical_committee::constants::ConstantsApi { - technical_committee::constants::ConstantsApi - } - pub fn phragmen_election( - &self, - ) -> phragmen_election::constants::ConstantsApi { - phragmen_election::constants::ConstantsApi - } - pub fn treasury(&self) -> treasury::constants::ConstantsApi { - treasury::constants::ConstantsApi - } - pub fn conviction_voting( - &self, - ) -> conviction_voting::constants::ConstantsApi { - conviction_voting::constants::ConstantsApi - } - pub fn referenda(&self) -> referenda::constants::ConstantsApi { - referenda::constants::ConstantsApi - } - pub fn claims(&self) -> claims::constants::ConstantsApi { - claims::constants::ConstantsApi - } - pub fn vesting(&self) -> vesting::constants::ConstantsApi { - vesting::constants::ConstantsApi - } - pub fn utility(&self) -> utility::constants::ConstantsApi { - utility::constants::ConstantsApi - } - pub fn identity(&self) -> identity::constants::ConstantsApi { - identity::constants::ConstantsApi - } - pub fn proxy(&self) -> proxy::constants::ConstantsApi { - proxy::constants::ConstantsApi - } - pub fn multisig(&self) -> multisig::constants::ConstantsApi { - multisig::constants::ConstantsApi - } - pub fn bounties(&self) -> bounties::constants::ConstantsApi { - bounties::constants::ConstantsApi - } - pub fn child_bounties(&self) -> child_bounties::constants::ConstantsApi { - child_bounties::constants::ConstantsApi - } - pub fn tips(&self) -> tips::constants::ConstantsApi { - tips::constants::ConstantsApi - } - pub fn election_provider_multi_phase( - &self, - ) -> election_provider_multi_phase::constants::ConstantsApi { - election_provider_multi_phase::constants::ConstantsApi - } - pub fn voter_list(&self) -> voter_list::constants::ConstantsApi { - voter_list::constants::ConstantsApi - } - pub fn nomination_pools(&self) -> nomination_pools::constants::ConstantsApi { - nomination_pools::constants::ConstantsApi - } - pub fn fast_unstake(&self) -> fast_unstake::constants::ConstantsApi { - fast_unstake::constants::ConstantsApi - } - pub fn paras(&self) -> paras::constants::ConstantsApi { - paras::constants::ConstantsApi - } - pub fn registrar(&self) -> registrar::constants::ConstantsApi { - registrar::constants::ConstantsApi - } - pub fn slots(&self) -> slots::constants::ConstantsApi { - slots::constants::ConstantsApi - } - pub fn auctions(&self) -> auctions::constants::ConstantsApi { - auctions::constants::ConstantsApi - } - pub fn crowdloan(&self) -> crowdloan::constants::ConstantsApi { - crowdloan::constants::ConstantsApi - } - pub fn message_queue(&self) -> message_queue::constants::ConstantsApi { - message_queue::constants::ConstantsApi - } - } - pub struct StorageApi; - impl StorageApi { - pub fn system(&self) -> system::storage::StorageApi { - system::storage::StorageApi - } - pub fn scheduler(&self) -> scheduler::storage::StorageApi { - scheduler::storage::StorageApi - } - pub fn preimage(&self) -> preimage::storage::StorageApi { - preimage::storage::StorageApi - } - pub fn babe(&self) -> babe::storage::StorageApi { - babe::storage::StorageApi - } - pub fn timestamp(&self) -> timestamp::storage::StorageApi { - timestamp::storage::StorageApi - } - pub fn indices(&self) -> indices::storage::StorageApi { - indices::storage::StorageApi - } - pub fn balances(&self) -> balances::storage::StorageApi { - balances::storage::StorageApi - } - pub fn transaction_payment( - &self, - ) -> transaction_payment::storage::StorageApi { - transaction_payment::storage::StorageApi - } - pub fn authorship(&self) -> authorship::storage::StorageApi { - authorship::storage::StorageApi - } - pub fn staking(&self) -> staking::storage::StorageApi { - staking::storage::StorageApi - } - pub fn offences(&self) -> offences::storage::StorageApi { - offences::storage::StorageApi - } - pub fn session(&self) -> session::storage::StorageApi { - session::storage::StorageApi - } - pub fn grandpa(&self) -> grandpa::storage::StorageApi { - grandpa::storage::StorageApi - } - pub fn im_online(&self) -> im_online::storage::StorageApi { - im_online::storage::StorageApi - } - pub fn democracy(&self) -> democracy::storage::StorageApi { - democracy::storage::StorageApi - } - pub fn council(&self) -> council::storage::StorageApi { - council::storage::StorageApi - } - pub fn technical_committee( - &self, - ) -> technical_committee::storage::StorageApi { - technical_committee::storage::StorageApi - } - pub fn phragmen_election(&self) -> phragmen_election::storage::StorageApi { - phragmen_election::storage::StorageApi - } - pub fn technical_membership( - &self, - ) -> technical_membership::storage::StorageApi { - technical_membership::storage::StorageApi - } - pub fn treasury(&self) -> treasury::storage::StorageApi { - treasury::storage::StorageApi - } - pub fn conviction_voting(&self) -> conviction_voting::storage::StorageApi { - conviction_voting::storage::StorageApi - } - pub fn referenda(&self) -> referenda::storage::StorageApi { - referenda::storage::StorageApi - } - pub fn whitelist(&self) -> whitelist::storage::StorageApi { - whitelist::storage::StorageApi - } - pub fn claims(&self) -> claims::storage::StorageApi { - claims::storage::StorageApi - } - pub fn vesting(&self) -> vesting::storage::StorageApi { - vesting::storage::StorageApi - } - pub fn identity(&self) -> identity::storage::StorageApi { - identity::storage::StorageApi - } - pub fn proxy(&self) -> proxy::storage::StorageApi { - proxy::storage::StorageApi - } - pub fn multisig(&self) -> multisig::storage::StorageApi { - multisig::storage::StorageApi - } - pub fn bounties(&self) -> bounties::storage::StorageApi { - bounties::storage::StorageApi - } - pub fn child_bounties(&self) -> child_bounties::storage::StorageApi { - child_bounties::storage::StorageApi - } - pub fn tips(&self) -> tips::storage::StorageApi { - tips::storage::StorageApi - } - pub fn election_provider_multi_phase( - &self, - ) -> election_provider_multi_phase::storage::StorageApi { - election_provider_multi_phase::storage::StorageApi - } - pub fn voter_list(&self) -> voter_list::storage::StorageApi { - voter_list::storage::StorageApi - } - pub fn nomination_pools(&self) -> nomination_pools::storage::StorageApi { - nomination_pools::storage::StorageApi - } - pub fn fast_unstake(&self) -> fast_unstake::storage::StorageApi { - fast_unstake::storage::StorageApi - } - pub fn configuration(&self) -> configuration::storage::StorageApi { - configuration::storage::StorageApi - } - pub fn paras_shared(&self) -> paras_shared::storage::StorageApi { - paras_shared::storage::StorageApi - } - pub fn para_inclusion(&self) -> para_inclusion::storage::StorageApi { - para_inclusion::storage::StorageApi - } - pub fn para_inherent(&self) -> para_inherent::storage::StorageApi { - para_inherent::storage::StorageApi - } - pub fn para_scheduler(&self) -> para_scheduler::storage::StorageApi { - para_scheduler::storage::StorageApi - } - pub fn paras(&self) -> paras::storage::StorageApi { - paras::storage::StorageApi - } - pub fn initializer(&self) -> initializer::storage::StorageApi { - initializer::storage::StorageApi - } - pub fn dmp(&self) -> dmp::storage::StorageApi { - dmp::storage::StorageApi - } - pub fn 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 paras_slashing(&self) -> paras_slashing::storage::StorageApi { - paras_slashing::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 fn message_queue(&self) -> message_queue::storage::StorageApi { - message_queue::storage::StorageApi - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn system(&self) -> system::calls::TransactionApi { - system::calls::TransactionApi - } - pub fn scheduler(&self) -> scheduler::calls::TransactionApi { - scheduler::calls::TransactionApi - } - pub fn preimage(&self) -> preimage::calls::TransactionApi { - preimage::calls::TransactionApi - } - pub fn babe(&self) -> babe::calls::TransactionApi { - babe::calls::TransactionApi - } - pub fn timestamp(&self) -> timestamp::calls::TransactionApi { - timestamp::calls::TransactionApi - } - pub fn indices(&self) -> indices::calls::TransactionApi { - indices::calls::TransactionApi - } - pub fn balances(&self) -> balances::calls::TransactionApi { - balances::calls::TransactionApi - } - pub fn staking(&self) -> staking::calls::TransactionApi { - staking::calls::TransactionApi - } - pub fn session(&self) -> session::calls::TransactionApi { - session::calls::TransactionApi - } - pub fn grandpa(&self) -> grandpa::calls::TransactionApi { - grandpa::calls::TransactionApi - } - pub fn im_online(&self) -> im_online::calls::TransactionApi { - im_online::calls::TransactionApi - } - pub fn democracy(&self) -> democracy::calls::TransactionApi { - democracy::calls::TransactionApi - } - pub fn council(&self) -> council::calls::TransactionApi { - council::calls::TransactionApi - } - pub fn technical_committee( - &self, - ) -> technical_committee::calls::TransactionApi { - technical_committee::calls::TransactionApi - } - pub fn phragmen_election(&self) -> phragmen_election::calls::TransactionApi { - phragmen_election::calls::TransactionApi - } - pub fn technical_membership( - &self, - ) -> technical_membership::calls::TransactionApi { - technical_membership::calls::TransactionApi - } - pub fn treasury(&self) -> treasury::calls::TransactionApi { - treasury::calls::TransactionApi - } - pub fn conviction_voting(&self) -> conviction_voting::calls::TransactionApi { - conviction_voting::calls::TransactionApi - } - pub fn referenda(&self) -> referenda::calls::TransactionApi { - referenda::calls::TransactionApi - } - pub fn whitelist(&self) -> whitelist::calls::TransactionApi { - whitelist::calls::TransactionApi - } - pub fn claims(&self) -> claims::calls::TransactionApi { - claims::calls::TransactionApi - } - pub fn vesting(&self) -> vesting::calls::TransactionApi { - vesting::calls::TransactionApi - } - pub fn utility(&self) -> utility::calls::TransactionApi { - utility::calls::TransactionApi - } - pub fn identity(&self) -> identity::calls::TransactionApi { - identity::calls::TransactionApi - } - pub fn proxy(&self) -> proxy::calls::TransactionApi { - proxy::calls::TransactionApi - } - pub fn multisig(&self) -> multisig::calls::TransactionApi { - multisig::calls::TransactionApi - } - pub fn bounties(&self) -> bounties::calls::TransactionApi { - bounties::calls::TransactionApi - } - pub fn child_bounties(&self) -> child_bounties::calls::TransactionApi { - child_bounties::calls::TransactionApi - } - pub fn tips(&self) -> tips::calls::TransactionApi { - tips::calls::TransactionApi - } - pub fn election_provider_multi_phase( - &self, - ) -> election_provider_multi_phase::calls::TransactionApi { - election_provider_multi_phase::calls::TransactionApi - } - pub fn voter_list(&self) -> voter_list::calls::TransactionApi { - voter_list::calls::TransactionApi - } - pub fn nomination_pools(&self) -> nomination_pools::calls::TransactionApi { - nomination_pools::calls::TransactionApi - } - pub fn fast_unstake(&self) -> fast_unstake::calls::TransactionApi { - fast_unstake::calls::TransactionApi - } - pub fn configuration(&self) -> configuration::calls::TransactionApi { - configuration::calls::TransactionApi - } - pub fn paras_shared(&self) -> paras_shared::calls::TransactionApi { - paras_shared::calls::TransactionApi - } - pub fn para_inclusion(&self) -> para_inclusion::calls::TransactionApi { - para_inclusion::calls::TransactionApi - } - pub fn para_inherent(&self) -> para_inherent::calls::TransactionApi { - para_inherent::calls::TransactionApi - } - pub fn paras(&self) -> paras::calls::TransactionApi { - paras::calls::TransactionApi - } - pub fn initializer(&self) -> initializer::calls::TransactionApi { - initializer::calls::TransactionApi - } - pub fn hrmp(&self) -> hrmp::calls::TransactionApi { - hrmp::calls::TransactionApi - } - pub fn paras_disputes(&self) -> paras_disputes::calls::TransactionApi { - paras_disputes::calls::TransactionApi - } - pub fn paras_slashing(&self) -> paras_slashing::calls::TransactionApi { - paras_slashing::calls::TransactionApi - } - pub fn registrar(&self) -> registrar::calls::TransactionApi { - registrar::calls::TransactionApi - } - 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 - } - pub fn message_queue(&self) -> message_queue::calls::TransactionApi { - message_queue::calls::TransactionApi - } - } - /// check whether the metadata provided is aligned with this statically generated code. - pub fn is_codegen_valid_for(metadata: &::subxt::Metadata) -> bool { - let runtime_metadata_hash = metadata - .hasher() - .only_these_pallets(&PALLETS) - .only_these_runtime_apis(&RUNTIME_APIS) - .hash(); - runtime_metadata_hash - == [ - 122u8, - 143u8, - 24u8, - 152u8, - 106u8, - 117u8, - 224u8, - 112u8, - 128u8, - 38u8, - 66u8, - 111u8, - 164u8, - 252u8, - 90u8, - 48u8, - 132u8, - 231u8, - 162u8, - 255u8, - 140u8, - 21u8, - 32u8, - 0u8, - 130u8, - 84u8, - 186u8, - 197u8, - 33u8, - 81u8, - 192u8, - 253u8, - ] - } - pub mod system { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::frame_system::pallet::Error; - pub type Call = runtime_types::frame_system::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Remark { - pub remark: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Remark { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Remark { - remark: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Remark::remark`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Remark { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.remark) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.remark, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.remark) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.remark, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Remark {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Remark { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Remark; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Remark { - remark: { - let val = *vals - .get(&Some("remark")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "remark".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("remark"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Remark { - remark: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("remark"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Remark { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Remark { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Remark { remark } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("remark"), - remark as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Remark { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Remark { remark } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("remark"), - remark as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Remark { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Remark", - "remark", - &&self.remark, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Remark { - const PALLET: &'static str = "System"; - const CALL: &'static str = "remark"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHeapPages { - pub pages: ::core::primitive::u64, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetHeapPages { - type As = ::core::primitive::u64; - fn encode_as(&self) -> &::core::primitive::u64 { - &self.pages - } - fn decode_from( - x: ::core::primitive::u64, - ) -> ::core::result::Result< - SetHeapPages, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHeapPages { pages: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetHeapPages { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetHeapPages { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetHeapPages { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHeapPages { - pages: { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetHeapPages::pages`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetHeapPages { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.pages) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.pages, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.pages) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.pages, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetHeapPages {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetHeapPages { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetHeapPages; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetHeapPages { - pages: { - let val = *vals - .get(&Some("pages")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pages".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pages"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetHeapPages { - pages: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pages"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetHeapPages { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetHeapPages { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHeapPages { pages } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pages"), - pages as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetHeapPages { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHeapPages { pages } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pages"), - pages as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetHeapPages { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetHeapPages", - "pages", - &&self.pages, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetHeapPages { - const PALLET: &'static str = "System"; - const CALL: &'static str = "set_heap_pages"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCode { - pub code: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetCode { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetCode { - code: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetCode::code`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetCode { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.code) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.code, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.code) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.code, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetCode {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetCode { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetCode; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetCode { - code: { - let val = *vals - .get(&Some("code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "code".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("code"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetCode { - code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("code"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SetCode { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetCode { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetCode { code } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("code"), - code as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetCode { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetCode { code } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("code"), - code as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetCode { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetCode", - "code", - &&self.code, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetCode { - const PALLET: &'static str = "System"; - const CALL: &'static str = "set_code"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCodeWithoutChecks { - pub code: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetCodeWithoutChecks { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetCodeWithoutChecks { - code: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetCodeWithoutChecks::code`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetCodeWithoutChecks { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.code) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.code, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.code) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.code, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetCodeWithoutChecks {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetCodeWithoutChecks { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetCodeWithoutChecks; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetCodeWithoutChecks { - code: { - let val = *vals - .get(&Some("code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "code".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("code"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetCodeWithoutChecks { - code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("code"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetCodeWithoutChecks { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetCodeWithoutChecks { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetCodeWithoutChecks { code } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("code"), - code as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetCodeWithoutChecks { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetCodeWithoutChecks { code } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("code"), - code as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetCodeWithoutChecks { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetCodeWithoutChecks", - "code", - &&self.code, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetCodeWithoutChecks { - const PALLET: &'static str = "System"; - const CALL: &'static str = "set_code_without_checks"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetStorage { - pub items: ::std::vec::Vec< - ( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, - ), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetStorage { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetStorage { - items: { - let __codec_res_edqy = <::std::vec::Vec< - ( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetStorage::items`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetStorage { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.items) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.items, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.items) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.items, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetStorage {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetStorage { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetStorage; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetStorage { - items: { - let val = *vals - .get(&Some("items")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "items".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("items"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetStorage { - items: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("items"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SetStorage { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetStorage { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetStorage { items } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("items"), - items as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetStorage { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetStorage { items } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("items"), - items as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetStorage { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetStorage", - "items", - &&self.items, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetStorage { - const PALLET: &'static str = "System"; - const CALL: &'static str = "set_storage"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct KillStorage { - pub keys: ::std::vec::Vec< - ::std::vec::Vec<::core::primitive::u8>, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for KillStorage { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(KillStorage { - keys: { - let __codec_res_edqy = <::std::vec::Vec< - ::std::vec::Vec<::core::primitive::u8>, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `KillStorage::keys`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for KillStorage { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.keys) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.keys, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.keys) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.keys, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for KillStorage {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for KillStorage { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = KillStorage; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(KillStorage { - keys: { - let val = *vals - .get(&Some("keys")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "keys".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("keys"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(KillStorage { - keys: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("keys"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for KillStorage { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for KillStorage { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let KillStorage { keys } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("keys"), - keys as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for KillStorage { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let KillStorage { keys } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("keys"), - keys as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for KillStorage { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "KillStorage", - "keys", - &&self.keys, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for KillStorage { - const PALLET: &'static str = "System"; - const CALL: &'static str = "kill_storage"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct KillPrefix { - pub prefix: ::std::vec::Vec<::core::primitive::u8>, - pub subkeys: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for KillPrefix { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(KillPrefix { - prefix: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `KillPrefix::prefix`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - subkeys: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `KillPrefix::subkeys`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for KillPrefix { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.prefix), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.subkeys), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.prefix, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.subkeys, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for KillPrefix {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for KillPrefix { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = KillPrefix; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(KillPrefix { - prefix: { - let val = *vals - .get(&Some("prefix")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prefix".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prefix"))? - }, - subkeys: { - let val = *vals - .get(&Some("subkeys")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "subkeys".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("subkeys"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(KillPrefix { - prefix: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prefix"))? - }, - subkeys: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("subkeys"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for KillPrefix { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for KillPrefix { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let KillPrefix { prefix, subkeys } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("prefix"), - prefix as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("subkeys"), - subkeys as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for KillPrefix { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let KillPrefix { prefix, subkeys } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("prefix"), - prefix as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("subkeys"), - subkeys as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for KillPrefix { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "KillPrefix", - "prefix", - &self.prefix, - "subkeys", - &&self.subkeys, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for KillPrefix { - const PALLET: &'static str = "System"; - const CALL: &'static str = "kill_prefix"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemarkWithEvent { - pub remark: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RemarkWithEvent { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RemarkWithEvent { - remark: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemarkWithEvent::remark`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RemarkWithEvent { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.remark) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.remark, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.remark) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.remark, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RemarkWithEvent {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for RemarkWithEvent { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RemarkWithEvent; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RemarkWithEvent { - remark: { - let val = *vals - .get(&Some("remark")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "remark".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("remark"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(RemarkWithEvent { - remark: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("remark"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for RemarkWithEvent { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RemarkWithEvent { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemarkWithEvent { remark } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("remark"), - remark as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RemarkWithEvent { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemarkWithEvent { remark } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("remark"), - remark as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RemarkWithEvent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "RemarkWithEvent", - "remark", - &&self.remark, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RemarkWithEvent { - const PALLET: &'static str = "System"; - const CALL: &'static str = "remark_with_event"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn remark( - &self, - remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "System", - "remark", - types::Remark { remark }, - [ - 43u8, - 126u8, - 180u8, - 174u8, - 141u8, - 48u8, - 52u8, - 125u8, - 166u8, - 212u8, - 216u8, - 98u8, - 100u8, - 24u8, - 132u8, - 71u8, - 101u8, - 64u8, - 246u8, - 169u8, - 33u8, - 250u8, - 147u8, - 208u8, - 2u8, - 40u8, - 129u8, - 209u8, - 232u8, - 207u8, - 207u8, - 13u8, - ], - ) - } - pub fn set_heap_pages( - &self, - pages: ::core::primitive::u64, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "System", - "set_heap_pages", - types::SetHeapPages { pages }, - [ - 188u8, - 191u8, - 99u8, - 216u8, - 219u8, - 109u8, - 141u8, - 50u8, - 78u8, - 235u8, - 215u8, - 242u8, - 195u8, - 24u8, - 111u8, - 76u8, - 229u8, - 64u8, - 99u8, - 225u8, - 134u8, - 121u8, - 81u8, - 209u8, - 127u8, - 223u8, - 98u8, - 215u8, - 150u8, - 70u8, - 57u8, - 147u8, - ], - ) - } - pub fn set_code( - &self, - code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "System", - "set_code", - types::SetCode { code }, - [ - 233u8, - 248u8, - 88u8, - 245u8, - 28u8, - 65u8, - 25u8, - 169u8, - 35u8, - 237u8, - 19u8, - 203u8, - 136u8, - 160u8, - 18u8, - 3u8, - 20u8, - 197u8, - 81u8, - 169u8, - 244u8, - 188u8, - 27u8, - 147u8, - 147u8, - 236u8, - 65u8, - 25u8, - 3u8, - 143u8, - 182u8, - 22u8, - ], - ) - } - pub fn set_code_without_checks( - &self, - code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "System", - "set_code_without_checks", - types::SetCodeWithoutChecks { - code, - }, - [ - 82u8, - 212u8, - 157u8, - 44u8, - 70u8, - 0u8, - 143u8, - 15u8, - 109u8, - 109u8, - 107u8, - 157u8, - 141u8, - 42u8, - 169u8, - 11u8, - 15u8, - 186u8, - 252u8, - 138u8, - 10u8, - 147u8, - 15u8, - 178u8, - 247u8, - 229u8, - 213u8, - 98u8, - 207u8, - 231u8, - 119u8, - 115u8, - ], - ) - } - pub fn set_storage( - &self, - items: ::std::vec::Vec< - ( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, - ), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "System", - "set_storage", - types::SetStorage { items }, - [ - 141u8, - 216u8, - 52u8, - 222u8, - 223u8, - 136u8, - 123u8, - 181u8, - 19u8, - 75u8, - 163u8, - 102u8, - 229u8, - 189u8, - 158u8, - 142u8, - 95u8, - 235u8, - 240u8, - 49u8, - 150u8, - 76u8, - 78u8, - 137u8, - 126u8, - 88u8, - 183u8, - 88u8, - 231u8, - 146u8, - 234u8, - 43u8, - ], - ) - } - pub fn kill_storage( - &self, - keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "System", - "kill_storage", - types::KillStorage { keys }, - [ - 73u8, - 63u8, - 196u8, - 36u8, - 144u8, - 114u8, - 34u8, - 213u8, - 108u8, - 93u8, - 209u8, - 234u8, - 153u8, - 185u8, - 33u8, - 91u8, - 187u8, - 195u8, - 223u8, - 130u8, - 58u8, - 156u8, - 63u8, - 47u8, - 228u8, - 249u8, - 216u8, - 139u8, - 143u8, - 177u8, - 41u8, - 35u8, - ], - ) - } - pub fn kill_prefix( - &self, - prefix: ::std::vec::Vec<::core::primitive::u8>, - subkeys: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "System", - "kill_prefix", - types::KillPrefix { - prefix, - subkeys, - }, - [ - 184u8, - 57u8, - 139u8, - 24u8, - 208u8, - 87u8, - 108u8, - 215u8, - 198u8, - 189u8, - 175u8, - 242u8, - 167u8, - 215u8, - 97u8, - 63u8, - 110u8, - 166u8, - 238u8, - 98u8, - 67u8, - 236u8, - 111u8, - 110u8, - 234u8, - 81u8, - 102u8, - 5u8, - 182u8, - 5u8, - 214u8, - 85u8, - ], - ) - } - pub fn remark_with_event( - &self, - remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "System", - "remark_with_event", - types::RemarkWithEvent { remark }, - [ - 120u8, - 120u8, - 153u8, - 92u8, - 184u8, - 85u8, - 34u8, - 2u8, - 174u8, - 206u8, - 105u8, - 228u8, - 233u8, - 130u8, - 80u8, - 246u8, - 228u8, - 59u8, - 234u8, - 240u8, - 4u8, - 49u8, - 147u8, - 170u8, - 115u8, - 91u8, - 149u8, - 200u8, - 228u8, - 181u8, - 8u8, - 154u8, - ], - ) - } - } - } - pub type Event = runtime_types::frame_system::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ExtrinsicSuccess { - pub dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ExtrinsicSuccess { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ExtrinsicSuccess { - dispatch_info: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `ExtrinsicSuccess::dispatch_info`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ExtrinsicSuccess { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.dispatch_info) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.dispatch_info, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.dispatch_info) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.dispatch_info, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ExtrinsicSuccess {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ExtrinsicSuccess { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ExtrinsicSuccess; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ExtrinsicSuccess { - dispatch_info: { - let val = *vals - .get(&Some("dispatch_info")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dispatch_info".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("dispatch_info"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ExtrinsicSuccess { - dispatch_info: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("dispatch_info"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ExtrinsicSuccess { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ExtrinsicSuccess { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExtrinsicSuccess { dispatch_info } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dispatch_info"), - dispatch_info - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ExtrinsicSuccess { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExtrinsicSuccess { dispatch_info } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dispatch_info"), - dispatch_info - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ExtrinsicSuccess { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ExtrinsicSuccess", - "dispatch_info", - &&self.dispatch_info, - ) - } - } - impl ::subxt::events::StaticEvent for ExtrinsicSuccess { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "ExtrinsicSuccess"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ExtrinsicFailed { - pub dispatch_error: runtime_types::sp_runtime::DispatchError, - pub dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ExtrinsicFailed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ExtrinsicFailed { - dispatch_error: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `ExtrinsicFailed::dispatch_error`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - dispatch_info: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ExtrinsicFailed::dispatch_info`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ExtrinsicFailed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.dispatch_error), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.dispatch_info), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.dispatch_error, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.dispatch_info, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ExtrinsicFailed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ExtrinsicFailed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ExtrinsicFailed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ExtrinsicFailed { - dispatch_error: { - let val = *vals - .get(&Some("dispatch_error")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dispatch_error".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("dispatch_error"))? - }, - dispatch_info: { - let val = *vals - .get(&Some("dispatch_info")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dispatch_info".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("dispatch_info"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ExtrinsicFailed { - dispatch_error: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("dispatch_error"))? - }, - dispatch_info: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("dispatch_info"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ExtrinsicFailed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ExtrinsicFailed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExtrinsicFailed { dispatch_error, dispatch_info } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dispatch_error"), - dispatch_error - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dispatch_info"), - dispatch_info - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ExtrinsicFailed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExtrinsicFailed { dispatch_error, dispatch_info } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dispatch_error"), - dispatch_error - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dispatch_info"), - dispatch_info - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ExtrinsicFailed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ExtrinsicFailed", - "dispatch_error", - &self.dispatch_error, - "dispatch_info", - &&self.dispatch_info, - ) - } - } - impl ::subxt::events::StaticEvent for ExtrinsicFailed { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "ExtrinsicFailed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CodeUpdated; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CodeUpdated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(CodeUpdated) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CodeUpdated { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CodeUpdated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CodeUpdated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CodeUpdated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(CodeUpdated) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for CodeUpdated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CodeUpdated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CodeUpdated = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CodeUpdated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CodeUpdated = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CodeUpdated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "CodeUpdated") - } - } - impl ::subxt::events::StaticEvent for CodeUpdated { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "CodeUpdated"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NewAccount { - pub account: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NewAccount { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(NewAccount { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NewAccount::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NewAccount { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.account) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.account, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.account) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.account, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NewAccount {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for NewAccount { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NewAccount; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(NewAccount { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(NewAccount { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for NewAccount { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NewAccount { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewAccount { account } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for NewAccount { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewAccount { account } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NewAccount { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "NewAccount", - "account", - &&self.account, - ) - } - } - impl ::subxt::events::StaticEvent for NewAccount { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "NewAccount"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct KilledAccount { - pub account: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for KilledAccount { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(KilledAccount { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `KilledAccount::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for KilledAccount { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.account) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.account, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.account) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.account, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for KilledAccount {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for KilledAccount { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = KilledAccount; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(KilledAccount { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(KilledAccount { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for KilledAccount { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for KilledAccount { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let KilledAccount { account } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for KilledAccount { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let KilledAccount { account } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for KilledAccount { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "KilledAccount", - "account", - &&self.account, - ) - } - } - impl ::subxt::events::StaticEvent for KilledAccount { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "KilledAccount"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Remarked { - pub sender: ::subxt::utils::AccountId32, - pub hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Remarked { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Remarked { - sender: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Remarked::sender`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Remarked::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Remarked { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.sender), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.hash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.sender, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Remarked {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Remarked { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Remarked; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Remarked { - sender: { - let val = *vals - .get(&Some("sender")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sender".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Remarked { - sender: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Remarked { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Remarked { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Remarked { sender, hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Remarked { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Remarked { sender, hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Remarked { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Remarked", - "sender", - &self.sender, - "hash", - &&self.hash, - ) - } - } - impl ::subxt::events::StaticEvent for Remarked { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "Remarked"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn account_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::frame_system::AccountInfo< - ::core::primitive::u32, - runtime_types::pallet_balances::types::AccountData< - ::core::primitive::u128, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "System", - "Account", - ::alloc::vec::Vec::new(), - [ - 14u8, - 233u8, - 115u8, - 214u8, - 0u8, - 109u8, - 222u8, - 121u8, - 162u8, - 65u8, - 60u8, - 175u8, - 209u8, - 79u8, - 222u8, - 124u8, - 22u8, - 235u8, - 138u8, - 176u8, - 133u8, - 124u8, - 90u8, - 158u8, - 85u8, - 45u8, - 37u8, - 174u8, - 47u8, - 79u8, - 47u8, - 166u8, - ], - ) - } - pub fn account( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::frame_system::AccountInfo< - ::core::primitive::u32, - runtime_types::pallet_balances::types::AccountData< - ::core::primitive::u128, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "Account", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 14u8, - 233u8, - 115u8, - 214u8, - 0u8, - 109u8, - 222u8, - 121u8, - 162u8, - 65u8, - 60u8, - 175u8, - 209u8, - 79u8, - 222u8, - 124u8, - 22u8, - 235u8, - 138u8, - 176u8, - 133u8, - 124u8, - 90u8, - 158u8, - 85u8, - 45u8, - 37u8, - 174u8, - 47u8, - 79u8, - 47u8, - 166u8, - ], - ) - } - pub fn extrinsic_count( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "ExtrinsicCount", - ::alloc::vec::Vec::new(), - [ - 102u8, - 76u8, - 236u8, - 42u8, - 40u8, - 231u8, - 33u8, - 222u8, - 123u8, - 147u8, - 153u8, - 148u8, - 234u8, - 203u8, - 181u8, - 119u8, - 6u8, - 187u8, - 177u8, - 199u8, - 120u8, - 47u8, - 137u8, - 254u8, - 96u8, - 100u8, - 165u8, - 182u8, - 249u8, - 230u8, - 159u8, - 79u8, - ], - ) - } - pub fn block_weight( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::frame_support::dispatch::PerDispatchClass< - runtime_types::sp_weights::weight_v2::Weight, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "BlockWeight", - ::alloc::vec::Vec::new(), - [ - 158u8, - 46u8, - 228u8, - 89u8, - 210u8, - 214u8, - 84u8, - 154u8, - 50u8, - 68u8, - 63u8, - 62u8, - 43u8, - 42u8, - 99u8, - 27u8, - 54u8, - 42u8, - 146u8, - 44u8, - 241u8, - 216u8, - 229u8, - 30u8, - 216u8, - 255u8, - 165u8, - 238u8, - 181u8, - 130u8, - 36u8, - 102u8, - ], - ) - } - pub fn all_extrinsics_len( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "AllExtrinsicsLen", - ::alloc::vec::Vec::new(), - [ - 117u8, - 86u8, - 61u8, - 243u8, - 41u8, - 51u8, - 102u8, - 214u8, - 137u8, - 100u8, - 243u8, - 185u8, - 122u8, - 174u8, - 187u8, - 117u8, - 86u8, - 189u8, - 63u8, - 135u8, - 101u8, - 218u8, - 203u8, - 201u8, - 237u8, - 254u8, - 128u8, - 183u8, - 169u8, - 221u8, - 242u8, - 65u8, - ], - ) - } - pub fn block_hash_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::H256, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "System", - "BlockHash", - ::alloc::vec::Vec::new(), - [ - 217u8, - 32u8, - 215u8, - 253u8, - 24u8, - 182u8, - 207u8, - 178u8, - 157u8, - 24u8, - 103u8, - 100u8, - 195u8, - 165u8, - 69u8, - 152u8, - 112u8, - 181u8, - 56u8, - 192u8, - 164u8, - 16u8, - 20u8, - 222u8, - 28u8, - 214u8, - 144u8, - 142u8, - 146u8, - 69u8, - 202u8, - 118u8, - ], - ) - } - pub fn block_hash( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::H256, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "BlockHash", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 217u8, - 32u8, - 215u8, - 253u8, - 24u8, - 182u8, - 207u8, - 178u8, - 157u8, - 24u8, - 103u8, - 100u8, - 195u8, - 165u8, - 69u8, - 152u8, - 112u8, - 181u8, - 56u8, - 192u8, - 164u8, - 16u8, - 20u8, - 222u8, - 28u8, - 214u8, - 144u8, - 142u8, - 146u8, - 69u8, - 202u8, - 118u8, - ], - ) - } - pub fn extrinsic_data_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::core::primitive::u8>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "System", - "ExtrinsicData", - ::alloc::vec::Vec::new(), - [ - 160u8, - 180u8, - 122u8, - 18u8, - 196u8, - 26u8, - 2u8, - 37u8, - 115u8, - 232u8, - 133u8, - 220u8, - 106u8, - 245u8, - 4u8, - 129u8, - 42u8, - 84u8, - 241u8, - 45u8, - 199u8, - 179u8, - 128u8, - 61u8, - 170u8, - 137u8, - 231u8, - 156u8, - 247u8, - 57u8, - 47u8, - 38u8, - ], - ) - } - pub fn extrinsic_data( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::core::primitive::u8>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "ExtrinsicData", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 160u8, - 180u8, - 122u8, - 18u8, - 196u8, - 26u8, - 2u8, - 37u8, - 115u8, - 232u8, - 133u8, - 220u8, - 106u8, - 245u8, - 4u8, - 129u8, - 42u8, - 84u8, - 241u8, - 45u8, - 199u8, - 179u8, - 128u8, - 61u8, - 170u8, - 137u8, - 231u8, - 156u8, - 247u8, - 57u8, - 47u8, - 38u8, - ], - ) - } - pub fn number( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "Number", - ::alloc::vec::Vec::new(), - [ - 30u8, - 194u8, - 177u8, - 90u8, - 194u8, - 232u8, - 46u8, - 180u8, - 85u8, - 129u8, - 14u8, - 9u8, - 8u8, - 8u8, - 23u8, - 95u8, - 230u8, - 5u8, - 13u8, - 105u8, - 125u8, - 2u8, - 22u8, - 200u8, - 78u8, - 93u8, - 115u8, - 28u8, - 150u8, - 113u8, - 48u8, - 53u8, - ], - ) - } - pub fn parent_hash( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::H256, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "ParentHash", - ::alloc::vec::Vec::new(), - [ - 26u8, - 130u8, - 11u8, - 216u8, - 155u8, - 71u8, - 128u8, - 170u8, - 30u8, - 153u8, - 21u8, - 192u8, - 62u8, - 93u8, - 137u8, - 80u8, - 120u8, - 81u8, - 202u8, - 94u8, - 248u8, - 125u8, - 71u8, - 82u8, - 141u8, - 229u8, - 32u8, - 56u8, - 73u8, - 50u8, - 101u8, - 78u8, - ], - ) - } - pub fn digest( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_runtime::generic::digest::Digest, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "Digest", - ::alloc::vec::Vec::new(), - [ - 61u8, - 64u8, - 237u8, - 91u8, - 145u8, - 232u8, - 17u8, - 254u8, - 181u8, - 16u8, - 234u8, - 91u8, - 51u8, - 140u8, - 254u8, - 131u8, - 98u8, - 135u8, - 21u8, - 37u8, - 251u8, - 20u8, - 58u8, - 92u8, - 123u8, - 141u8, - 14u8, - 227u8, - 146u8, - 46u8, - 222u8, - 117u8, - ], - ) - } - pub fn events( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::frame_system::EventRecord< - runtime_types::polkadot_runtime::RuntimeEvent, - ::subxt::utils::H256, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "Events", - ::alloc::vec::Vec::new(), - [ - 127u8, - 30u8, - 79u8, - 35u8, - 160u8, - 104u8, - 72u8, - 247u8, - 142u8, - 184u8, - 119u8, - 16u8, - 221u8, - 133u8, - 114u8, - 243u8, - 137u8, - 50u8, - 68u8, - 88u8, - 161u8, - 169u8, - 36u8, - 168u8, - 54u8, - 162u8, - 197u8, - 73u8, - 194u8, - 217u8, - 111u8, - 152u8, - ], - ) - } - pub fn event_count( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "EventCount", - ::alloc::vec::Vec::new(), - [ - 175u8, - 24u8, - 252u8, - 184u8, - 210u8, - 167u8, - 146u8, - 143u8, - 164u8, - 80u8, - 151u8, - 205u8, - 189u8, - 189u8, - 55u8, - 220u8, - 47u8, - 101u8, - 181u8, - 33u8, - 254u8, - 131u8, - 13u8, - 143u8, - 3u8, - 244u8, - 245u8, - 45u8, - 2u8, - 210u8, - 79u8, - 133u8, - ], - ) - } - pub fn event_topics_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - (::core::primitive::u32, ::core::primitive::u32), - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "System", - "EventTopics", - ::alloc::vec::Vec::new(), - [ - 40u8, - 225u8, - 14u8, - 75u8, - 44u8, - 176u8, - 76u8, - 34u8, - 143u8, - 107u8, - 69u8, - 133u8, - 114u8, - 13u8, - 172u8, - 250u8, - 141u8, - 73u8, - 12u8, - 65u8, - 217u8, - 63u8, - 120u8, - 241u8, - 48u8, - 106u8, - 143u8, - 161u8, - 128u8, - 100u8, - 166u8, - 59u8, - ], - ) - } - pub fn event_topics( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - (::core::primitive::u32, ::core::primitive::u32), - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "EventTopics", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 40u8, - 225u8, - 14u8, - 75u8, - 44u8, - 176u8, - 76u8, - 34u8, - 143u8, - 107u8, - 69u8, - 133u8, - 114u8, - 13u8, - 172u8, - 250u8, - 141u8, - 73u8, - 12u8, - 65u8, - 217u8, - 63u8, - 120u8, - 241u8, - 48u8, - 106u8, - 143u8, - 161u8, - 128u8, - 100u8, - 166u8, - 59u8, - ], - ) - } - pub fn last_runtime_upgrade( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::frame_system::LastRuntimeUpgradeInfo, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "LastRuntimeUpgrade", - ::alloc::vec::Vec::new(), - [ - 137u8, - 29u8, - 175u8, - 75u8, - 197u8, - 208u8, - 91u8, - 207u8, - 156u8, - 87u8, - 148u8, - 68u8, - 91u8, - 140u8, - 22u8, - 233u8, - 1u8, - 229u8, - 56u8, - 34u8, - 40u8, - 194u8, - 253u8, - 30u8, - 163u8, - 39u8, - 54u8, - 209u8, - 13u8, - 27u8, - 139u8, - 184u8, - ], - ) - } - pub fn upgraded_to_u32_ref_count( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::bool, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "UpgradedToU32RefCount", - ::alloc::vec::Vec::new(), - [ - 229u8, - 73u8, - 9u8, - 132u8, - 186u8, - 116u8, - 151u8, - 171u8, - 145u8, - 29u8, - 34u8, - 130u8, - 52u8, - 146u8, - 124u8, - 175u8, - 79u8, - 189u8, - 147u8, - 230u8, - 234u8, - 107u8, - 124u8, - 31u8, - 2u8, - 22u8, - 86u8, - 190u8, - 4u8, - 147u8, - 50u8, - 245u8, - ], - ) - } - pub fn upgraded_to_triple_ref_count( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::bool, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "UpgradedToTripleRefCount", - ::alloc::vec::Vec::new(), - [ - 97u8, - 66u8, - 124u8, - 243u8, - 27u8, - 167u8, - 147u8, - 81u8, - 254u8, - 201u8, - 101u8, - 24u8, - 40u8, - 231u8, - 14u8, - 179u8, - 154u8, - 163u8, - 71u8, - 81u8, - 185u8, - 167u8, - 82u8, - 254u8, - 189u8, - 3u8, - 101u8, - 207u8, - 206u8, - 194u8, - 155u8, - 151u8, - ], - ) - } - pub fn execution_phase( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::frame_system::Phase, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "System", - "ExecutionPhase", - ::alloc::vec::Vec::new(), - [ - 191u8, - 129u8, - 100u8, - 134u8, - 126u8, - 116u8, - 154u8, - 203u8, - 220u8, - 200u8, - 0u8, - 26u8, - 161u8, - 250u8, - 133u8, - 205u8, - 146u8, - 24u8, - 5u8, - 156u8, - 158u8, - 35u8, - 36u8, - 253u8, - 52u8, - 235u8, - 86u8, - 167u8, - 35u8, - 100u8, - 119u8, - 27u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn block_weights( - &self, - ) -> ::subxt::constants::Address< - runtime_types::frame_system::limits::BlockWeights, - > { - ::subxt::constants::Address::new_static( - "System", - "BlockWeights", - [ - 176u8, - 124u8, - 225u8, - 136u8, - 25u8, - 73u8, - 247u8, - 33u8, - 82u8, - 206u8, - 85u8, - 190u8, - 127u8, - 102u8, - 71u8, - 11u8, - 185u8, - 8u8, - 58u8, - 0u8, - 94u8, - 55u8, - 163u8, - 177u8, - 104u8, - 59u8, - 60u8, - 136u8, - 246u8, - 116u8, - 0u8, - 239u8, - ], - ) - } - pub fn block_length( - &self, - ) -> ::subxt::constants::Address< - runtime_types::frame_system::limits::BlockLength, - > { - ::subxt::constants::Address::new_static( - "System", - "BlockLength", - [ - 23u8, - 242u8, - 225u8, - 39u8, - 225u8, - 67u8, - 152u8, - 41u8, - 155u8, - 104u8, - 68u8, - 229u8, - 185u8, - 133u8, - 10u8, - 143u8, - 184u8, - 152u8, - 234u8, - 44u8, - 140u8, - 96u8, - 166u8, - 235u8, - 162u8, - 160u8, - 72u8, - 7u8, - 35u8, - 194u8, - 3u8, - 37u8, - ], - ) - } - pub fn block_hash_count( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "System", - "BlockHashCount", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn db_weight( - &self, - ) -> ::subxt::constants::Address< - runtime_types::sp_weights::RuntimeDbWeight, - > { - ::subxt::constants::Address::new_static( - "System", - "DbWeight", - [ - 42u8, - 43u8, - 178u8, - 142u8, - 243u8, - 203u8, - 60u8, - 173u8, - 118u8, - 111u8, - 200u8, - 170u8, - 102u8, - 70u8, - 237u8, - 187u8, - 198u8, - 120u8, - 153u8, - 232u8, - 183u8, - 76u8, - 74u8, - 10u8, - 70u8, - 243u8, - 14u8, - 218u8, - 213u8, - 126u8, - 29u8, - 177u8, - ], - ) - } - pub fn version( - &self, - ) -> ::subxt::constants::Address< - runtime_types::sp_version::RuntimeVersion, - > { - ::subxt::constants::Address::new_static( - "System", - "Version", - [ - 219u8, - 45u8, - 162u8, - 245u8, - 177u8, - 246u8, - 48u8, - 126u8, - 191u8, - 157u8, - 228u8, - 83u8, - 111u8, - 133u8, - 183u8, - 13u8, - 148u8, - 108u8, - 92u8, - 102u8, - 72u8, - 205u8, - 74u8, - 242u8, - 233u8, - 79u8, - 20u8, - 170u8, - 72u8, - 202u8, - 158u8, - 165u8, - ], - ) - } - pub fn ss58_prefix( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u16> { - ::subxt::constants::Address::new_static( - "System", - "SS58Prefix", - [ - 116u8, - 33u8, - 2u8, - 170u8, - 181u8, - 147u8, - 171u8, - 169u8, - 167u8, - 227u8, - 41u8, - 144u8, - 11u8, - 236u8, - 82u8, - 100u8, - 74u8, - 60u8, - 184u8, - 72u8, - 169u8, - 90u8, - 208u8, - 135u8, - 15u8, - 117u8, - 10u8, - 123u8, - 128u8, - 193u8, - 29u8, - 70u8, - ], - ) - } - } - } - } - pub mod scheduler { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_scheduler::pallet::Error; - pub type Call = runtime_types::pallet_scheduler::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Schedule { - pub when: ::core::primitive::u32, - pub maybe_periodic: ::core::option::Option< - (::core::primitive::u32, ::core::primitive::u32), - >, - pub priority: ::core::primitive::u8, - pub call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Schedule { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Schedule { - when: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Schedule::when`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_periodic: { - let __codec_res_edqy = <::core::option::Option< - (::core::primitive::u32, ::core::primitive::u32), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Schedule::maybe_periodic`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - priority: { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Schedule::priority`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Schedule::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Schedule { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.when), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.maybe_periodic), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.priority), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.when, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.maybe_periodic, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.priority, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Schedule {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Schedule { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Schedule; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Schedule { - when: { - let val = *vals - .get(&Some("when")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "when".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - maybe_periodic: { - let val = *vals - .get(&Some("maybe_periodic")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_periodic".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - priority: { - let val = *vals - .get(&Some("priority")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "priority".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(Schedule { - when: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - maybe_periodic: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - priority: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Schedule { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Schedule { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Schedule { when, maybe_periodic, priority, call } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("when"), - when as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_periodic"), - maybe_periodic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("priority"), - priority as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Schedule { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Schedule { when, maybe_periodic, priority, call } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("when"), - when as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_periodic"), - maybe_periodic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("priority"), - priority as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Schedule { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Schedule", - "when", - &self.when, - "maybe_periodic", - &self.maybe_periodic, - "priority", - &self.priority, - "call", - &&self.call, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Schedule { - const PALLET: &'static str = "Scheduler"; - const CALL: &'static str = "schedule"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Cancel { - pub when: ::core::primitive::u32, - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Cancel { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Cancel { - when: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Cancel::when`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Cancel::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Cancel { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.when), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.when, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Cancel {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Cancel { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Cancel; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Cancel { - when: { - let val = *vals - .get(&Some("when")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "when".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Cancel { - when: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Cancel { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Cancel { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Cancel { when, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("when"), - when as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Cancel { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Cancel { when, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("when"), - when as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Cancel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Cancel", - "when", - &self.when, - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Cancel { - const PALLET: &'static str = "Scheduler"; - const CALL: &'static str = "cancel"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScheduleNamed { - pub id: [::core::primitive::u8; 32usize], - pub when: ::core::primitive::u32, - pub maybe_periodic: ::core::option::Option< - (::core::primitive::u32, ::core::primitive::u32), - >, - pub priority: ::core::primitive::u8, - pub call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ScheduleNamed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ScheduleNamed { - id: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScheduleNamed::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - when: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScheduleNamed::when`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_periodic: { - let __codec_res_edqy = <::core::option::Option< - (::core::primitive::u32, ::core::primitive::u32), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScheduleNamed::maybe_periodic`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - priority: { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScheduleNamed::priority`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScheduleNamed::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ScheduleNamed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.when), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.maybe_periodic), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.priority), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.when, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.maybe_periodic, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.priority, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ScheduleNamed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ScheduleNamed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ScheduleNamed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ScheduleNamed { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - when: { - let val = *vals - .get(&Some("when")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "when".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - maybe_periodic: { - let val = *vals - .get(&Some("maybe_periodic")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_periodic".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - priority: { - let val = *vals - .get(&Some("priority")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "priority".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(ScheduleNamed { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - when: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - maybe_periodic: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - priority: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ScheduleNamed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ScheduleNamed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ScheduleNamed { - id, - when, - maybe_periodic, - priority, - call, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("when"), - when as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_periodic"), - maybe_periodic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("priority"), - priority as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ScheduleNamed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ScheduleNamed { - id, - when, - maybe_periodic, - priority, - call, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("when"), - when as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_periodic"), - maybe_periodic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("priority"), - priority as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ScheduleNamed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "ScheduleNamed", - "id", - &self.id, - "when", - &self.when, - "maybe_periodic", - &self.maybe_periodic, - "priority", - &self.priority, - "call", - &&self.call, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ScheduleNamed { - const PALLET: &'static str = "Scheduler"; - const CALL: &'static str = "schedule_named"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelNamed { - pub id: [::core::primitive::u8; 32usize], - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CancelNamed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CancelNamed { - id: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CancelNamed::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CancelNamed { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.id) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.id, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.id) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.id, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CancelNamed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CancelNamed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CancelNamed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CancelNamed { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(CancelNamed { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for CancelNamed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CancelNamed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CancelNamed { id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CancelNamed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CancelNamed { id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CancelNamed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "CancelNamed", - "id", - &&self.id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for CancelNamed { - const PALLET: &'static str = "Scheduler"; - const CALL: &'static str = "cancel_named"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScheduleAfter { - pub after: ::core::primitive::u32, - pub maybe_periodic: ::core::option::Option< - (::core::primitive::u32, ::core::primitive::u32), - >, - pub priority: ::core::primitive::u8, - pub call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ScheduleAfter { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ScheduleAfter { - after: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScheduleAfter::after`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_periodic: { - let __codec_res_edqy = <::core::option::Option< - (::core::primitive::u32, ::core::primitive::u32), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScheduleAfter::maybe_periodic`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - priority: { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScheduleAfter::priority`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScheduleAfter::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ScheduleAfter { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.after), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.maybe_periodic), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.priority), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.after, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.maybe_periodic, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.priority, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ScheduleAfter {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ScheduleAfter { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ScheduleAfter; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ScheduleAfter { - after: { - let val = *vals - .get(&Some("after")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "after".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("after"))? - }, - maybe_periodic: { - let val = *vals - .get(&Some("maybe_periodic")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_periodic".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - priority: { - let val = *vals - .get(&Some("priority")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "priority".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(ScheduleAfter { - after: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("after"))? - }, - maybe_periodic: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - priority: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ScheduleAfter { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ScheduleAfter { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ScheduleAfter { - after, - maybe_periodic, - priority, - call, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("after"), - after as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_periodic"), - maybe_periodic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("priority"), - priority as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ScheduleAfter { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ScheduleAfter { - after, - maybe_periodic, - priority, - call, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("after"), - after as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_periodic"), - maybe_periodic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("priority"), - priority as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ScheduleAfter { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "ScheduleAfter", - "after", - &self.after, - "maybe_periodic", - &self.maybe_periodic, - "priority", - &self.priority, - "call", - &&self.call, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ScheduleAfter { - const PALLET: &'static str = "Scheduler"; - const CALL: &'static str = "schedule_after"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScheduleNamedAfter { - pub id: [::core::primitive::u8; 32usize], - pub after: ::core::primitive::u32, - pub maybe_periodic: ::core::option::Option< - (::core::primitive::u32, ::core::primitive::u32), - >, - pub priority: ::core::primitive::u8, - pub call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ScheduleNamedAfter { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ScheduleNamedAfter { - id: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScheduleNamedAfter::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - after: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScheduleNamedAfter::after`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_periodic: { - let __codec_res_edqy = <::core::option::Option< - (::core::primitive::u32, ::core::primitive::u32), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ScheduleNamedAfter::maybe_periodic`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - priority: { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScheduleNamedAfter::priority`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScheduleNamedAfter::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ScheduleNamedAfter { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.after), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.maybe_periodic), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.priority), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.after, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.maybe_periodic, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.priority, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ScheduleNamedAfter {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ScheduleNamedAfter { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ScheduleNamedAfter; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ScheduleNamedAfter { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - after: { - let val = *vals - .get(&Some("after")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "after".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("after"))? - }, - maybe_periodic: { - let val = *vals - .get(&Some("maybe_periodic")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_periodic".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - priority: { - let val = *vals - .get(&Some("priority")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "priority".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(ScheduleNamedAfter { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - after: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("after"))? - }, - maybe_periodic: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - priority: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ScheduleNamedAfter { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ScheduleNamedAfter { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ScheduleNamedAfter { - id, - after, - maybe_periodic, - priority, - call, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("after"), - after as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_periodic"), - maybe_periodic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("priority"), - priority as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ScheduleNamedAfter { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ScheduleNamedAfter { - id, - after, - maybe_periodic, - priority, - call, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("after"), - after as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_periodic"), - maybe_periodic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("priority"), - priority as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ScheduleNamedAfter { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "ScheduleNamedAfter", - "id", - &self.id, - "after", - &self.after, - "maybe_periodic", - &self.maybe_periodic, - "priority", - &self.priority, - "call", - &&self.call, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ScheduleNamedAfter { - const PALLET: &'static str = "Scheduler"; - const CALL: &'static str = "schedule_named_after"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn schedule( - &self, - when: ::core::primitive::u32, - maybe_periodic: ::core::option::Option< - (::core::primitive::u32, ::core::primitive::u32), - >, - priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "schedule", - types::Schedule { - when, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, - [ - 68u8, - 143u8, - 237u8, - 135u8, - 70u8, - 234u8, - 2u8, - 128u8, - 130u8, - 20u8, - 141u8, - 222u8, - 152u8, - 26u8, - 129u8, - 77u8, - 72u8, - 74u8, - 94u8, - 113u8, - 175u8, - 142u8, - 165u8, - 103u8, - 16u8, - 144u8, - 163u8, - 185u8, - 251u8, - 12u8, - 138u8, - 170u8, - ], - ) - } - pub fn cancel( - &self, - when: ::core::primitive::u32, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "cancel", - types::Cancel { when, index }, - [ - 183u8, - 204u8, - 143u8, - 86u8, - 17u8, - 130u8, - 132u8, - 91u8, - 133u8, - 168u8, - 103u8, - 129u8, - 114u8, - 56u8, - 123u8, - 42u8, - 123u8, - 120u8, - 221u8, - 211u8, - 26u8, - 85u8, - 82u8, - 246u8, - 192u8, - 39u8, - 254u8, - 45u8, - 147u8, - 56u8, - 178u8, - 133u8, - ], - ) - } - pub fn schedule_named( - &self, - id: [::core::primitive::u8; 32usize], - when: ::core::primitive::u32, - maybe_periodic: ::core::option::Option< - (::core::primitive::u32, ::core::primitive::u32), - >, - priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "schedule_named", - types::ScheduleNamed { - id, - when, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, - [ - 179u8, - 195u8, - 102u8, - 155u8, - 134u8, - 142u8, - 120u8, - 96u8, - 60u8, - 29u8, - 242u8, - 122u8, - 178u8, - 203u8, - 167u8, - 129u8, - 73u8, - 117u8, - 106u8, - 224u8, - 55u8, - 225u8, - 252u8, - 25u8, - 17u8, - 205u8, - 59u8, - 227u8, - 190u8, - 52u8, - 172u8, - 11u8, - ], - ) - } - pub fn cancel_named( - &self, - id: [::core::primitive::u8; 32usize], - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "cancel_named", - types::CancelNamed { id }, - [ - 205u8, - 35u8, - 28u8, - 57u8, - 224u8, - 7u8, - 49u8, - 233u8, - 236u8, - 163u8, - 93u8, - 236u8, - 103u8, - 69u8, - 65u8, - 51u8, - 121u8, - 84u8, - 9u8, - 196u8, - 147u8, - 122u8, - 227u8, - 200u8, - 181u8, - 233u8, - 62u8, - 240u8, - 174u8, - 83u8, - 129u8, - 193u8, - ], - ) - } - pub fn schedule_after( - &self, - after: ::core::primitive::u32, - maybe_periodic: ::core::option::Option< - (::core::primitive::u32, ::core::primitive::u32), - >, - priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "schedule_after", - types::ScheduleAfter { - after, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, - [ - 166u8, - 223u8, - 43u8, - 184u8, - 195u8, - 214u8, - 67u8, - 187u8, - 0u8, - 170u8, - 213u8, - 147u8, - 165u8, - 84u8, - 157u8, - 82u8, - 23u8, - 53u8, - 136u8, - 124u8, - 76u8, - 135u8, - 13u8, - 80u8, - 16u8, - 185u8, - 152u8, - 104u8, - 156u8, - 112u8, - 94u8, - 210u8, - ], - ) - } - pub fn schedule_named_after( - &self, - id: [::core::primitive::u8; 32usize], - after: ::core::primitive::u32, - maybe_periodic: ::core::option::Option< - (::core::primitive::u32, ::core::primitive::u32), - >, - priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "schedule_named_after", - types::ScheduleNamedAfter { - id, - after, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, - [ - 186u8, - 47u8, - 155u8, - 180u8, - 80u8, - 14u8, - 212u8, - 117u8, - 109u8, - 50u8, - 21u8, - 137u8, - 81u8, - 3u8, - 220u8, - 123u8, - 235u8, - 142u8, - 163u8, - 28u8, - 112u8, - 21u8, - 194u8, - 25u8, - 104u8, - 57u8, - 74u8, - 48u8, - 223u8, - 97u8, - 214u8, - 244u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_scheduler::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Scheduled { - pub when: ::core::primitive::u32, - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Scheduled { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Scheduled { - when: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Scheduled::when`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Scheduled::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Scheduled { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.when), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.when, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Scheduled {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Scheduled { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Scheduled; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Scheduled { - when: { - let val = *vals - .get(&Some("when")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "when".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Scheduled { - when: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Scheduled { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Scheduled { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Scheduled { when, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("when"), - when as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Scheduled { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Scheduled { when, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("when"), - when as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Scheduled { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Scheduled", - "when", - &self.when, - "index", - &&self.index, - ) - } - } - impl ::subxt::events::StaticEvent for Scheduled { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "Scheduled"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Canceled { - pub when: ::core::primitive::u32, - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Canceled { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Canceled { - when: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Canceled::when`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Canceled::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Canceled { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.when), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.when, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Canceled {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Canceled { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Canceled; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Canceled { - when: { - let val = *vals - .get(&Some("when")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "when".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Canceled { - when: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Canceled { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Canceled { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Canceled { when, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("when"), - when as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Canceled { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Canceled { when, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("when"), - when as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Canceled { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Canceled", - "when", - &self.when, - "index", - &&self.index, - ) - } - } - impl ::subxt::events::StaticEvent for Canceled { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "Canceled"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Dispatched { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Dispatched { - task: { - let __codec_res_edqy = <( - ::core::primitive::u32, - ::core::primitive::u32, - ) as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Dispatched::task`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - id: { - let __codec_res_edqy = <::core::option::Option< - [::core::primitive::u8; 32usize], - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Dispatched::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Dispatched::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Dispatched { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.task), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.result), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.task, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.result, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Dispatched {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Dispatched { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Dispatched; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Dispatched { - task: { - let val = *vals - .get(&Some("task")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "task".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("task"))? - }, - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Dispatched { - task: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("task"))? - }, - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Dispatched { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Dispatched { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Dispatched { task, id, result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("task"), - task as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Dispatched { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Dispatched { task, id, result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("task"), - task as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Dispatched { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Dispatched", - "task", - &self.task, - "id", - &self.id, - "result", - &&self.result, - ) - } - } - impl ::subxt::events::StaticEvent for Dispatched { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "Dispatched"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CallUnavailable { - pub task: (::core::primitive::u32, ::core::primitive::u32), - pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CallUnavailable { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(CallUnavailable { - task: { - let __codec_res_edqy = <( - ::core::primitive::u32, - ::core::primitive::u32, - ) as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CallUnavailable::task`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - id: { - let __codec_res_edqy = <::core::option::Option< - [::core::primitive::u8; 32usize], - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CallUnavailable::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CallUnavailable { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.task), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.task, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CallUnavailable {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CallUnavailable { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CallUnavailable; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CallUnavailable { - task: { - let val = *vals - .get(&Some("task")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "task".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("task"))? - }, - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(CallUnavailable { - task: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("task"))? - }, - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for CallUnavailable { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CallUnavailable { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CallUnavailable { task, id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("task"), - task as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CallUnavailable { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CallUnavailable { task, id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("task"), - task as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CallUnavailable { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "CallUnavailable", - "task", - &self.task, - "id", - &&self.id, - ) - } - } - impl ::subxt::events::StaticEvent for CallUnavailable { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "CallUnavailable"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PeriodicFailed { - pub task: (::core::primitive::u32, ::core::primitive::u32), - pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PeriodicFailed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(PeriodicFailed { - task: { - let __codec_res_edqy = <( - ::core::primitive::u32, - ::core::primitive::u32, - ) as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PeriodicFailed::task`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - id: { - let __codec_res_edqy = <::core::option::Option< - [::core::primitive::u8; 32usize], - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PeriodicFailed::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PeriodicFailed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.task), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.task, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PeriodicFailed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PeriodicFailed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PeriodicFailed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PeriodicFailed { - task: { - let val = *vals - .get(&Some("task")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "task".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("task"))? - }, - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(PeriodicFailed { - task: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("task"))? - }, - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for PeriodicFailed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PeriodicFailed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PeriodicFailed { task, id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("task"), - task as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PeriodicFailed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PeriodicFailed { task, id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("task"), - task as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PeriodicFailed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PeriodicFailed", - "task", - &self.task, - "id", - &&self.id, - ) - } - } - impl ::subxt::events::StaticEvent for PeriodicFailed { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "PeriodicFailed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PermanentlyOverweight { - pub task: (::core::primitive::u32, ::core::primitive::u32), - pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PermanentlyOverweight { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(PermanentlyOverweight { - task: { - let __codec_res_edqy = <( - ::core::primitive::u32, - ::core::primitive::u32, - ) as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PermanentlyOverweight::task`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - id: { - let __codec_res_edqy = <::core::option::Option< - [::core::primitive::u8; 32usize], - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PermanentlyOverweight::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PermanentlyOverweight { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.task), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.task, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PermanentlyOverweight {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for PermanentlyOverweight { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PermanentlyOverweight; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PermanentlyOverweight { - task: { - let val = *vals - .get(&Some("task")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "task".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("task"))? - }, - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(PermanentlyOverweight { - task: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("task"))? - }, - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PermanentlyOverweight { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PermanentlyOverweight { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PermanentlyOverweight { task, id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("task"), - task as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for PermanentlyOverweight { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PermanentlyOverweight { task, id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("task"), - task as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PermanentlyOverweight { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PermanentlyOverweight", - "task", - &self.task, - "id", - &&self.id, - ) - } - } - impl ::subxt::events::StaticEvent for PermanentlyOverweight { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "PermanentlyOverweight"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn incomplete_since( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Scheduler", - "IncompleteSince", - ::alloc::vec::Vec::new(), - [ - 250u8, - 83u8, - 64u8, - 167u8, - 205u8, - 59u8, - 225u8, - 97u8, - 205u8, - 12u8, - 76u8, - 130u8, - 197u8, - 4u8, - 111u8, - 208u8, - 92u8, - 217u8, - 145u8, - 119u8, - 38u8, - 135u8, - 1u8, - 242u8, - 228u8, - 143u8, - 56u8, - 25u8, - 115u8, - 233u8, - 227u8, - 66u8, - ], - ) - } - pub fn agenda_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::option::Option< - runtime_types::pallet_scheduler::Scheduled< - [::core::primitive::u8; 32usize], - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - ::core::primitive::u32, - runtime_types::polkadot_runtime::OriginCaller, - ::subxt::utils::AccountId32, - >, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Scheduler", - "Agenda", - ::alloc::vec::Vec::new(), - [ - 251u8, - 39u8, - 160u8, - 19u8, - 63u8, - 135u8, - 130u8, - 64u8, - 254u8, - 182u8, - 210u8, - 143u8, - 162u8, - 252u8, - 114u8, - 186u8, - 94u8, - 180u8, - 155u8, - 251u8, - 4u8, - 194u8, - 207u8, - 194u8, - 165u8, - 164u8, - 164u8, - 162u8, - 223u8, - 50u8, - 221u8, - 69u8, - ], - ) - } - pub fn agenda( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::option::Option< - runtime_types::pallet_scheduler::Scheduled< - [::core::primitive::u8; 32usize], - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - ::core::primitive::u32, - runtime_types::polkadot_runtime::OriginCaller, - ::subxt::utils::AccountId32, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Scheduler", - "Agenda", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 251u8, - 39u8, - 160u8, - 19u8, - 63u8, - 135u8, - 130u8, - 64u8, - 254u8, - 182u8, - 210u8, - 143u8, - 162u8, - 252u8, - 114u8, - 186u8, - 94u8, - 180u8, - 155u8, - 251u8, - 4u8, - 194u8, - 207u8, - 194u8, - 165u8, - 164u8, - 164u8, - 162u8, - 223u8, - 50u8, - 221u8, - 69u8, - ], - ) - } - pub fn lookup_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 24u8, - 87u8, - 96u8, - 127u8, - 136u8, - 205u8, - 238u8, - 174u8, - 71u8, - 110u8, - 65u8, - 98u8, - 228u8, - 167u8, - 99u8, - 71u8, - 171u8, - 186u8, - 12u8, - 218u8, - 137u8, - 70u8, - 70u8, - 228u8, - 153u8, - 111u8, - 165u8, - 114u8, - 229u8, - 136u8, - 118u8, - 131u8, - ], - ) - } - 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::Address::new_static( - "Scheduler", - "Lookup", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 24u8, - 87u8, - 96u8, - 127u8, - 136u8, - 205u8, - 238u8, - 174u8, - 71u8, - 110u8, - 65u8, - 98u8, - 228u8, - 167u8, - 99u8, - 71u8, - 171u8, - 186u8, - 12u8, - 218u8, - 137u8, - 70u8, - 70u8, - 228u8, - 153u8, - 111u8, - 165u8, - 114u8, - 229u8, - 136u8, - 118u8, - 131u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn maximum_weight( - &self, - ) -> ::subxt::constants::Address< - runtime_types::sp_weights::weight_v2::Weight, - > { - ::subxt::constants::Address::new_static( - "Scheduler", - "MaximumWeight", - [ - 149u8, - 252u8, - 129u8, - 80u8, - 169u8, - 36u8, - 79u8, - 127u8, - 240u8, - 156u8, - 56u8, - 202u8, - 219u8, - 86u8, - 5u8, - 65u8, - 245u8, - 148u8, - 138u8, - 243u8, - 210u8, - 128u8, - 234u8, - 216u8, - 240u8, - 219u8, - 123u8, - 235u8, - 21u8, - 158u8, - 237u8, - 112u8, - ], - ) - } - pub fn max_scheduled_per_block( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Scheduler", - "MaxScheduledPerBlock", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod preimage { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_preimage::pallet::Error; - pub type Call = runtime_types::pallet_preimage::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NotePreimage { - pub bytes: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NotePreimage { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(NotePreimage { - bytes: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotePreimage::bytes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NotePreimage { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.bytes) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.bytes, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.bytes) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.bytes, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NotePreimage {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for NotePreimage { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NotePreimage; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(NotePreimage { - bytes: { - let val = *vals - .get(&Some("bytes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bytes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bytes"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(NotePreimage { - bytes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bytes"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for NotePreimage { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NotePreimage { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NotePreimage { bytes } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bytes"), - bytes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for NotePreimage { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NotePreimage { bytes } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bytes"), - bytes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NotePreimage { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "NotePreimage", - "bytes", - &&self.bytes, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for NotePreimage { - const PALLET: &'static str = "Preimage"; - const CALL: &'static str = "note_preimage"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnnotePreimage { - pub hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for UnnotePreimage { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(UnnotePreimage { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnnotePreimage::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for UnnotePreimage { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.hash, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for UnnotePreimage {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for UnnotePreimage { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UnnotePreimage; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(UnnotePreimage { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(UnnotePreimage { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for UnnotePreimage { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for UnnotePreimage { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnnotePreimage { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for UnnotePreimage { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnnotePreimage { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for UnnotePreimage { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "UnnotePreimage", - "hash", - &&self.hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for UnnotePreimage { - const PALLET: &'static str = "Preimage"; - const CALL: &'static str = "unnote_preimage"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RequestPreimage { - pub hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RequestPreimage { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RequestPreimage { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RequestPreimage::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RequestPreimage { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.hash, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RequestPreimage {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for RequestPreimage { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RequestPreimage; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RequestPreimage { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(RequestPreimage { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for RequestPreimage { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RequestPreimage { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RequestPreimage { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RequestPreimage { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RequestPreimage { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RequestPreimage { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "RequestPreimage", - "hash", - &&self.hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RequestPreimage { - const PALLET: &'static str = "Preimage"; - const CALL: &'static str = "request_preimage"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnrequestPreimage { - pub hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for UnrequestPreimage { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(UnrequestPreimage { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnrequestPreimage::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for UnrequestPreimage { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.hash, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for UnrequestPreimage {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for UnrequestPreimage { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UnrequestPreimage; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(UnrequestPreimage { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(UnrequestPreimage { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for UnrequestPreimage { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for UnrequestPreimage { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnrequestPreimage { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for UnrequestPreimage { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnrequestPreimage { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for UnrequestPreimage { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "UnrequestPreimage", - "hash", - &&self.hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for UnrequestPreimage { - const PALLET: &'static str = "Preimage"; - const CALL: &'static str = "unrequest_preimage"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn note_preimage( - &self, - bytes: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Preimage", - "note_preimage", - types::NotePreimage { bytes }, - [ - 121u8, - 88u8, - 18u8, - 92u8, - 176u8, - 15u8, - 192u8, - 198u8, - 146u8, - 198u8, - 38u8, - 242u8, - 213u8, - 83u8, - 7u8, - 230u8, - 14u8, - 110u8, - 235u8, - 32u8, - 215u8, - 26u8, - 192u8, - 217u8, - 113u8, - 224u8, - 206u8, - 96u8, - 177u8, - 198u8, - 246u8, - 33u8, - ], - ) - } - pub fn unnote_preimage( - &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Preimage", - "unnote_preimage", - types::UnnotePreimage { hash }, - [ - 188u8, - 116u8, - 222u8, - 22u8, - 127u8, - 215u8, - 2u8, - 133u8, - 96u8, - 202u8, - 190u8, - 123u8, - 203u8, - 43u8, - 200u8, - 161u8, - 226u8, - 24u8, - 49u8, - 36u8, - 221u8, - 160u8, - 130u8, - 119u8, - 30u8, - 138u8, - 144u8, - 85u8, - 5u8, - 164u8, - 252u8, - 222u8, - ], - ) - } - pub fn request_preimage( - &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Preimage", - "request_preimage", - types::RequestPreimage { hash }, - [ - 87u8, - 0u8, - 204u8, - 111u8, - 43u8, - 115u8, - 64u8, - 209u8, - 133u8, - 13u8, - 83u8, - 45u8, - 164u8, - 166u8, - 233u8, - 105u8, - 242u8, - 238u8, - 235u8, - 208u8, - 113u8, - 134u8, - 93u8, - 242u8, - 86u8, - 32u8, - 7u8, - 152u8, - 107u8, - 208u8, - 79u8, - 59u8, - ], - ) - } - pub fn unrequest_preimage( - &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Preimage", - "unrequest_preimage", - types::UnrequestPreimage { hash }, - [ - 55u8, - 37u8, - 224u8, - 149u8, - 142u8, - 120u8, - 8u8, - 68u8, - 183u8, - 225u8, - 255u8, - 240u8, - 254u8, - 111u8, - 58u8, - 200u8, - 113u8, - 217u8, - 177u8, - 203u8, - 107u8, - 104u8, - 233u8, - 87u8, - 252u8, - 53u8, - 33u8, - 112u8, - 116u8, - 254u8, - 117u8, - 134u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_preimage::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Noted { - pub hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Noted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Noted { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Noted::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Noted { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.hash, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Noted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Noted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Noted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Noted { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Noted { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Noted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Noted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Noted { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Noted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Noted { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Noted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Noted", - "hash", - &&self.hash, - ) - } - } - impl ::subxt::events::StaticEvent for Noted { - const PALLET: &'static str = "Preimage"; - const EVENT: &'static str = "Noted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Requested { - pub hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Requested { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Requested { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Requested::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Requested { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.hash, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Requested {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Requested { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Requested; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Requested { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Requested { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Requested { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Requested { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Requested { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Requested { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Requested { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Requested { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Requested", - "hash", - &&self.hash, - ) - } - } - impl ::subxt::events::StaticEvent for Requested { - const PALLET: &'static str = "Preimage"; - const EVENT: &'static str = "Requested"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Cleared { - pub hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Cleared { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Cleared { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Cleared::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Cleared { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.hash, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Cleared {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Cleared { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Cleared; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Cleared { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Cleared { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Cleared { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Cleared { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Cleared { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Cleared { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Cleared { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Cleared { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Cleared", - "hash", - &&self.hash, - ) - } - } - 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 { - pub fn status_for_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 187u8, - 100u8, - 54u8, - 112u8, - 96u8, - 129u8, - 36u8, - 149u8, - 127u8, - 226u8, - 126u8, - 171u8, - 72u8, - 189u8, - 59u8, - 126u8, - 204u8, - 125u8, - 67u8, - 204u8, - 231u8, - 6u8, - 212u8, - 135u8, - 166u8, - 252u8, - 5u8, - 46u8, - 111u8, - 120u8, - 54u8, - 209u8, - ], - ) - } - 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::Address::new_static( - "Preimage", - "StatusFor", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 187u8, - 100u8, - 54u8, - 112u8, - 96u8, - 129u8, - 36u8, - 149u8, - 127u8, - 226u8, - 126u8, - 171u8, - 72u8, - 189u8, - 59u8, - 126u8, - 204u8, - 125u8, - 67u8, - 204u8, - 231u8, - 6u8, - 212u8, - 135u8, - 166u8, - 252u8, - 5u8, - 46u8, - 111u8, - 120u8, - 54u8, - 209u8, - ], - ) - } - pub fn preimage_for_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Preimage", - "PreimageFor", - ::alloc::vec::Vec::new(), - [ - 106u8, - 5u8, - 17u8, - 46u8, - 6u8, - 184u8, - 177u8, - 113u8, - 169u8, - 34u8, - 119u8, - 141u8, - 117u8, - 40u8, - 30u8, - 94u8, - 187u8, - 35u8, - 206u8, - 216u8, - 143u8, - 208u8, - 49u8, - 156u8, - 200u8, - 255u8, - 109u8, - 200u8, - 210u8, - 134u8, - 24u8, - 139u8, - ], - ) - } - pub fn preimage_for_iter1( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Preimage", - "PreimageFor", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 106u8, - 5u8, - 17u8, - 46u8, - 6u8, - 184u8, - 177u8, - 113u8, - 169u8, - 34u8, - 119u8, - 141u8, - 117u8, - 40u8, - 30u8, - 94u8, - 187u8, - 35u8, - 206u8, - 216u8, - 143u8, - 208u8, - 49u8, - 156u8, - 200u8, - 255u8, - 109u8, - 200u8, - 210u8, - 134u8, - 24u8, - 139u8, - ], - ) - } - pub fn preimage_for( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Preimage", - "PreimageFor", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 106u8, - 5u8, - 17u8, - 46u8, - 6u8, - 184u8, - 177u8, - 113u8, - 169u8, - 34u8, - 119u8, - 141u8, - 117u8, - 40u8, - 30u8, - 94u8, - 187u8, - 35u8, - 206u8, - 216u8, - 143u8, - 208u8, - 49u8, - 156u8, - 200u8, - 255u8, - 109u8, - 200u8, - 210u8, - 134u8, - 24u8, - 139u8, - ], - ) - } - } - } - } - pub mod babe { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_babe::pallet::Error; - pub type Call = runtime_types::pallet_babe::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReportEquivocation { - pub equivocation_proof: ::std::boxed::Box< - runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, - >, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ReportEquivocation { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ReportEquivocation { - equivocation_proof: { - let __codec_res_edqy = <::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, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ReportEquivocation::equivocation_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - key_owner_proof: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ReportEquivocation::key_owner_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ReportEquivocation { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.equivocation_proof, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.key_owner_proof, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.equivocation_proof, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.key_owner_proof, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ReportEquivocation {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ReportEquivocation { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReportEquivocation; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ReportEquivocation { - equivocation_proof: { - let val = *vals - .get(&Some("equivocation_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "equivocation_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation_proof"))? - }, - key_owner_proof: { - let val = *vals - .get(&Some("key_owner_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "key_owner_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ReportEquivocation { - equivocation_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation_proof"))? - }, - key_owner_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ReportEquivocation { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ReportEquivocation { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReportEquivocation { - equivocation_proof, - key_owner_proof, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("equivocation_proof"), - equivocation_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("key_owner_proof"), - key_owner_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ReportEquivocation { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReportEquivocation { - equivocation_proof, - key_owner_proof, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("equivocation_proof"), - equivocation_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("key_owner_proof"), - key_owner_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ReportEquivocation { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ReportEquivocation", - "equivocation_proof", - &self.equivocation_proof, - "key_owner_proof", - &&self.key_owner_proof, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ReportEquivocation { - const PALLET: &'static str = "Babe"; - const CALL: &'static str = "report_equivocation"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReportEquivocationUnsigned { - pub equivocation_proof: ::std::boxed::Box< - runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, - >, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ReportEquivocationUnsigned { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ReportEquivocationUnsigned { - equivocation_proof: { - let __codec_res_edqy = <::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, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ReportEquivocationUnsigned::equivocation_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - key_owner_proof: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ReportEquivocationUnsigned::key_owner_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ReportEquivocationUnsigned { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.equivocation_proof, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.key_owner_proof, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.equivocation_proof, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.key_owner_proof, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for ReportEquivocationUnsigned {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ReportEquivocationUnsigned { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReportEquivocationUnsigned; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ReportEquivocationUnsigned { - equivocation_proof: { - let val = *vals - .get(&Some("equivocation_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "equivocation_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation_proof"))? - }, - key_owner_proof: { - let val = *vals - .get(&Some("key_owner_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "key_owner_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ReportEquivocationUnsigned { - equivocation_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation_proof"))? - }, - key_owner_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ReportEquivocationUnsigned { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ReportEquivocationUnsigned { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReportEquivocationUnsigned { - equivocation_proof, - key_owner_proof, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("equivocation_proof"), - equivocation_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("key_owner_proof"), - key_owner_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ReportEquivocationUnsigned { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReportEquivocationUnsigned { - equivocation_proof, - key_owner_proof, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("equivocation_proof"), - equivocation_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("key_owner_proof"), - key_owner_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ReportEquivocationUnsigned { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ReportEquivocationUnsigned", - "equivocation_proof", - &self.equivocation_proof, - "key_owner_proof", - &&self.key_owner_proof, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for ReportEquivocationUnsigned { - const PALLET: &'static str = "Babe"; - const CALL: &'static str = "report_equivocation_unsigned"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PlanConfigChange { - pub config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PlanConfigChange { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(PlanConfigChange { - config: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PlanConfigChange::config`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PlanConfigChange { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.config) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.config, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.config) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.config, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PlanConfigChange {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for PlanConfigChange { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PlanConfigChange; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PlanConfigChange { - config: { - let val = *vals - .get(&Some("config")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "config".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("config"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(PlanConfigChange { - config: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("config"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PlanConfigChange { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PlanConfigChange { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PlanConfigChange { config } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("config"), - config as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for PlanConfigChange { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PlanConfigChange { config } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("config"), - config as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PlanConfigChange { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "PlanConfigChange", - "config", - &&self.config, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for PlanConfigChange { - const PALLET: &'static str = "Babe"; - const CALL: &'static str = "plan_config_change"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn report_equivocation( - &self, - equivocation_proof: runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Babe", - "report_equivocation", - types::ReportEquivocation { - equivocation_proof: ::std::boxed::Box::new( - equivocation_proof, - ), - key_owner_proof, - }, - [ - 37u8, - 70u8, - 151u8, - 149u8, - 231u8, - 197u8, - 226u8, - 88u8, - 38u8, - 138u8, - 147u8, - 164u8, - 250u8, - 117u8, - 156u8, - 178u8, - 44u8, - 20u8, - 123u8, - 33u8, - 11u8, - 106u8, - 56u8, - 122u8, - 90u8, - 11u8, - 15u8, - 219u8, - 245u8, - 18u8, - 171u8, - 90u8, - ], - ) - } - pub fn report_equivocation_unsigned( - &self, - equivocation_proof: runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Babe", - "report_equivocation_unsigned", - types::ReportEquivocationUnsigned { - equivocation_proof: ::std::boxed::Box::new( - equivocation_proof, - ), - key_owner_proof, - }, - [ - 179u8, - 248u8, - 80u8, - 171u8, - 220u8, - 8u8, - 75u8, - 215u8, - 121u8, - 151u8, - 255u8, - 4u8, - 6u8, - 54u8, - 141u8, - 244u8, - 111u8, - 156u8, - 183u8, - 19u8, - 192u8, - 195u8, - 79u8, - 53u8, - 0u8, - 170u8, - 120u8, - 227u8, - 186u8, - 45u8, - 48u8, - 57u8, - ], - ) - } - pub fn plan_config_change( - &self, - config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Babe", - "plan_config_change", - types::PlanConfigChange { config }, - [ - 227u8, - 155u8, - 182u8, - 231u8, - 240u8, - 107u8, - 30u8, - 22u8, - 15u8, - 52u8, - 172u8, - 203u8, - 115u8, - 47u8, - 6u8, - 66u8, - 170u8, - 231u8, - 186u8, - 77u8, - 19u8, - 235u8, - 91u8, - 136u8, - 95u8, - 149u8, - 188u8, - 163u8, - 161u8, - 109u8, - 164u8, - 179u8, - ], - ) - } - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn epoch_index( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u64, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "EpochIndex", - ::alloc::vec::Vec::new(), - [ - 32u8, - 82u8, - 130u8, - 31u8, - 190u8, - 162u8, - 237u8, - 189u8, - 104u8, - 244u8, - 30u8, - 199u8, - 179u8, - 0u8, - 161u8, - 107u8, - 72u8, - 240u8, - 201u8, - 222u8, - 177u8, - 222u8, - 35u8, - 156u8, - 81u8, - 132u8, - 162u8, - 118u8, - 238u8, - 84u8, - 112u8, - 89u8, - ], - ) - } - pub fn authorities( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - ( - runtime_types::sp_consensus_babe::app::Public, - ::core::primitive::u64, - ), - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "Authorities", - ::alloc::vec::Vec::new(), - [ - 67u8, - 196u8, - 244u8, - 13u8, - 246u8, - 245u8, - 198u8, - 98u8, - 81u8, - 55u8, - 182u8, - 187u8, - 214u8, - 5u8, - 181u8, - 76u8, - 251u8, - 213u8, - 144u8, - 166u8, - 36u8, - 153u8, - 234u8, - 181u8, - 252u8, - 55u8, - 198u8, - 175u8, - 55u8, - 211u8, - 105u8, - 85u8, - ], - ) - } - pub fn genesis_slot( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_consensus_slots::Slot, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "GenesisSlot", - ::alloc::vec::Vec::new(), - [ - 218u8, - 174u8, - 152u8, - 76u8, - 188u8, - 214u8, - 7u8, - 88u8, - 253u8, - 187u8, - 139u8, - 234u8, - 51u8, - 28u8, - 220u8, - 57u8, - 73u8, - 1u8, - 18u8, - 205u8, - 80u8, - 160u8, - 120u8, - 216u8, - 139u8, - 191u8, - 100u8, - 108u8, - 162u8, - 106u8, - 175u8, - 107u8, - ], - ) - } - pub fn current_slot( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_consensus_slots::Slot, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "CurrentSlot", - ::alloc::vec::Vec::new(), - [ - 112u8, - 199u8, - 115u8, - 248u8, - 217u8, - 242u8, - 45u8, - 231u8, - 178u8, - 53u8, - 236u8, - 167u8, - 219u8, - 238u8, - 81u8, - 243u8, - 39u8, - 140u8, - 68u8, - 19u8, - 201u8, - 169u8, - 211u8, - 133u8, - 135u8, - 213u8, - 150u8, - 105u8, - 60u8, - 252u8, - 43u8, - 57u8, - ], - ) - } - pub fn randomness( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - [::core::primitive::u8; 32usize], - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "Randomness", - ::alloc::vec::Vec::new(), - [ - 36u8, - 15u8, - 52u8, - 73u8, - 195u8, - 177u8, - 186u8, - 125u8, - 134u8, - 11u8, - 103u8, - 248u8, - 170u8, - 237u8, - 105u8, - 239u8, - 168u8, - 204u8, - 147u8, - 52u8, - 15u8, - 226u8, - 126u8, - 176u8, - 133u8, - 186u8, - 169u8, - 241u8, - 156u8, - 118u8, - 67u8, - 58u8, - ], - ) - } - pub fn pending_epoch_config_change( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "PendingEpochConfigChange", - ::alloc::vec::Vec::new(), - [ - 79u8, - 216u8, - 84u8, - 210u8, - 83u8, - 149u8, - 122u8, - 160u8, - 159u8, - 164u8, - 16u8, - 134u8, - 154u8, - 104u8, - 77u8, - 254u8, - 139u8, - 18u8, - 163u8, - 59u8, - 92u8, - 9u8, - 135u8, - 141u8, - 147u8, - 86u8, - 44u8, - 95u8, - 183u8, - 101u8, - 11u8, - 58u8, - ], - ) - } - pub fn next_randomness( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - [::core::primitive::u8; 32usize], - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "NextRandomness", - ::alloc::vec::Vec::new(), - [ - 96u8, - 191u8, - 139u8, - 171u8, - 144u8, - 92u8, - 33u8, - 58u8, - 23u8, - 219u8, - 164u8, - 121u8, - 59u8, - 209u8, - 112u8, - 244u8, - 50u8, - 8u8, - 14u8, - 244u8, - 103u8, - 125u8, - 120u8, - 210u8, - 16u8, - 250u8, - 54u8, - 192u8, - 72u8, - 8u8, - 219u8, - 152u8, - ], - ) - } - pub fn next_authorities( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - ( - runtime_types::sp_consensus_babe::app::Public, - ::core::primitive::u64, - ), - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "NextAuthorities", - ::alloc::vec::Vec::new(), - [ - 116u8, - 95u8, - 126u8, - 199u8, - 237u8, - 90u8, - 202u8, - 227u8, - 247u8, - 56u8, - 201u8, - 113u8, - 239u8, - 191u8, - 151u8, - 56u8, - 156u8, - 133u8, - 61u8, - 64u8, - 141u8, - 26u8, - 8u8, - 95u8, - 177u8, - 255u8, - 54u8, - 223u8, - 132u8, - 74u8, - 210u8, - 128u8, - ], - ) - } - pub fn segment_index( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "SegmentIndex", - ::alloc::vec::Vec::new(), - [ - 145u8, - 91u8, - 142u8, - 240u8, - 184u8, - 94u8, - 68u8, - 52u8, - 130u8, - 3u8, - 75u8, - 175u8, - 155u8, - 130u8, - 66u8, - 9u8, - 150u8, - 242u8, - 123u8, - 111u8, - 124u8, - 241u8, - 100u8, - 128u8, - 220u8, - 133u8, - 96u8, - 227u8, - 164u8, - 241u8, - 170u8, - 34u8, - ], - ) - } - pub fn under_construction_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - [::core::primitive::u8; 32usize], - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "UnderConstruction", - ::alloc::vec::Vec::new(), - [ - 120u8, - 120u8, - 59u8, - 247u8, - 50u8, - 6u8, - 220u8, - 14u8, - 2u8, - 76u8, - 203u8, - 244u8, - 232u8, - 144u8, - 253u8, - 191u8, - 101u8, - 35u8, - 99u8, - 85u8, - 111u8, - 168u8, - 31u8, - 110u8, - 187u8, - 124u8, - 72u8, - 32u8, - 43u8, - 66u8, - 8u8, - 215u8, - ], - ) - } - pub fn under_construction( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - [::core::primitive::u8; 32usize], - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "UnderConstruction", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 120u8, - 120u8, - 59u8, - 247u8, - 50u8, - 6u8, - 220u8, - 14u8, - 2u8, - 76u8, - 203u8, - 244u8, - 232u8, - 144u8, - 253u8, - 191u8, - 101u8, - 35u8, - 99u8, - 85u8, - 111u8, - 168u8, - 31u8, - 110u8, - 187u8, - 124u8, - 72u8, - 32u8, - 43u8, - 66u8, - 8u8, - 215u8, - ], - ) - } - pub fn initialized( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::option::Option< - runtime_types::sp_consensus_babe::digests::PreDigest, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "Initialized", - ::alloc::vec::Vec::new(), - [ - 137u8, - 31u8, - 4u8, - 130u8, - 35u8, - 232u8, - 67u8, - 108u8, - 17u8, - 123u8, - 26u8, - 96u8, - 238u8, - 95u8, - 138u8, - 208u8, - 163u8, - 83u8, - 218u8, - 143u8, - 8u8, - 119u8, - 138u8, - 130u8, - 9u8, - 194u8, - 92u8, - 40u8, - 7u8, - 89u8, - 53u8, - 237u8, - ], - ) - } - pub fn author_vrf_randomness( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::option::Option<[::core::primitive::u8; 32usize]>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "AuthorVrfRandomness", - ::alloc::vec::Vec::new(), - [ - 160u8, - 157u8, - 62u8, - 48u8, - 196u8, - 136u8, - 63u8, - 132u8, - 155u8, - 183u8, - 91u8, - 201u8, - 146u8, - 29u8, - 192u8, - 142u8, - 168u8, - 152u8, - 197u8, - 233u8, - 5u8, - 25u8, - 0u8, - 154u8, - 234u8, - 180u8, - 146u8, - 132u8, - 106u8, - 164u8, - 149u8, - 63u8, - ], - ) - } - pub fn epoch_start( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - (::core::primitive::u32, ::core::primitive::u32), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "EpochStart", - ::alloc::vec::Vec::new(), - [ - 144u8, - 133u8, - 140u8, - 56u8, - 241u8, - 203u8, - 199u8, - 123u8, - 244u8, - 126u8, - 196u8, - 151u8, - 214u8, - 204u8, - 243u8, - 244u8, - 210u8, - 198u8, - 174u8, - 126u8, - 200u8, - 236u8, - 248u8, - 190u8, - 181u8, - 152u8, - 113u8, - 224u8, - 95u8, - 234u8, - 169u8, - 14u8, - ], - ) - } - pub fn lateness( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "Lateness", - ::alloc::vec::Vec::new(), - [ - 229u8, - 214u8, - 133u8, - 149u8, - 32u8, - 159u8, - 26u8, - 22u8, - 252u8, - 131u8, - 200u8, - 191u8, - 231u8, - 176u8, - 178u8, - 127u8, - 33u8, - 212u8, - 139u8, - 220u8, - 157u8, - 38u8, - 4u8, - 226u8, - 204u8, - 32u8, - 55u8, - 20u8, - 205u8, - 141u8, - 29u8, - 87u8, - ], - ) - } - pub fn epoch_config( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_consensus_babe::BabeEpochConfiguration, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "EpochConfig", - ::alloc::vec::Vec::new(), - [ - 151u8, - 58u8, - 93u8, - 2u8, - 19u8, - 98u8, - 41u8, - 144u8, - 241u8, - 70u8, - 195u8, - 37u8, - 126u8, - 241u8, - 111u8, - 65u8, - 16u8, - 228u8, - 111u8, - 220u8, - 241u8, - 215u8, - 179u8, - 235u8, - 122u8, - 88u8, - 92u8, - 95u8, - 131u8, - 252u8, - 236u8, - 46u8, - ], - ) - } - pub fn next_epoch_config( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_consensus_babe::BabeEpochConfiguration, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "NextEpochConfig", - ::alloc::vec::Vec::new(), - [ - 65u8, - 54u8, - 74u8, - 141u8, - 193u8, - 124u8, - 130u8, - 238u8, - 106u8, - 27u8, - 221u8, - 189u8, - 103u8, - 53u8, - 39u8, - 243u8, - 212u8, - 216u8, - 75u8, - 185u8, - 104u8, - 220u8, - 70u8, - 108u8, - 87u8, - 172u8, - 201u8, - 185u8, - 39u8, - 55u8, - 145u8, - 6u8, - ], - ) - } - pub fn skipped_epochs( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - (::core::primitive::u64, ::core::primitive::u32), - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Babe", - "SkippedEpochs", - ::alloc::vec::Vec::new(), - [ - 120u8, - 167u8, - 144u8, - 97u8, - 41u8, - 216u8, - 103u8, - 90u8, - 3u8, - 86u8, - 196u8, - 35u8, - 160u8, - 150u8, - 144u8, - 233u8, - 128u8, - 35u8, - 119u8, - 66u8, - 6u8, - 63u8, - 114u8, - 140u8, - 182u8, - 228u8, - 192u8, - 30u8, - 50u8, - 145u8, - 217u8, - 108u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn epoch_duration( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u64> { - ::subxt::constants::Address::new_static( - "Babe", - "EpochDuration", - [ - 128u8, - 214u8, - 205u8, - 242u8, - 181u8, - 142u8, - 124u8, - 231u8, - 190u8, - 146u8, - 59u8, - 226u8, - 157u8, - 101u8, - 103u8, - 117u8, - 249u8, - 65u8, - 18u8, - 191u8, - 103u8, - 119u8, - 53u8, - 85u8, - 81u8, - 96u8, - 220u8, - 42u8, - 184u8, - 239u8, - 42u8, - 246u8, - ], - ) - } - pub fn expected_block_time( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u64> { - ::subxt::constants::Address::new_static( - "Babe", - "ExpectedBlockTime", - [ - 128u8, - 214u8, - 205u8, - 242u8, - 181u8, - 142u8, - 124u8, - 231u8, - 190u8, - 146u8, - 59u8, - 226u8, - 157u8, - 101u8, - 103u8, - 117u8, - 249u8, - 65u8, - 18u8, - 191u8, - 103u8, - 119u8, - 53u8, - 85u8, - 81u8, - 96u8, - 220u8, - 42u8, - 184u8, - 239u8, - 42u8, - 246u8, - ], - ) - } - pub fn max_authorities( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Babe", - "MaxAuthorities", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod timestamp { - use super::root_mod; - use super::runtime_types; - pub type Call = runtime_types::pallet_timestamp::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Set { - #[codec(compact)] - pub now: ::core::primitive::u64, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Set { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Set { - now: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Set::now`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Set { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(&self.now) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(&self.now) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(&self.now) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(&self.now) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Set {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Set { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Set; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Set { - now: { - let val = *vals - .get(&Some("now")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "now".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("now"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Set { - now: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("now"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Set { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Set { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Set { now } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("now"), - now as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Set { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Set { now } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("now"), - now as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Set { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Set", - "now", - &&self.now, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Set { - const PALLET: &'static str = "Timestamp"; - const CALL: &'static str = "set"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn set( - &self, - now: ::core::primitive::u64, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Timestamp", - "set", - types::Set { now }, - [ - 37u8, - 95u8, - 49u8, - 218u8, - 24u8, - 22u8, - 0u8, - 95u8, - 72u8, - 35u8, - 155u8, - 199u8, - 213u8, - 54u8, - 207u8, - 22u8, - 185u8, - 193u8, - 221u8, - 70u8, - 18u8, - 200u8, - 4u8, - 231u8, - 195u8, - 173u8, - 6u8, - 122u8, - 11u8, - 203u8, - 231u8, - 227u8, - ], - ) - } - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn now( - &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( - "Timestamp", - "Now", - ::alloc::vec::Vec::new(), - [ - 44u8, - 50u8, - 80u8, - 30u8, - 195u8, - 146u8, - 123u8, - 238u8, - 8u8, - 163u8, - 187u8, - 92u8, - 61u8, - 39u8, - 51u8, - 29u8, - 173u8, - 169u8, - 217u8, - 158u8, - 85u8, - 187u8, - 141u8, - 26u8, - 12u8, - 115u8, - 51u8, - 11u8, - 200u8, - 244u8, - 138u8, - 152u8, - ], - ) - } - pub fn did_update( - &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( - "Timestamp", - "DidUpdate", - ::alloc::vec::Vec::new(), - [ - 229u8, - 175u8, - 246u8, - 102u8, - 237u8, - 158u8, - 212u8, - 229u8, - 238u8, - 214u8, - 205u8, - 160u8, - 164u8, - 252u8, - 195u8, - 75u8, - 139u8, - 110u8, - 22u8, - 34u8, - 248u8, - 204u8, - 107u8, - 46u8, - 20u8, - 200u8, - 238u8, - 167u8, - 71u8, - 41u8, - 214u8, - 140u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn minimum_period( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u64> { - ::subxt::constants::Address::new_static( - "Timestamp", - "MinimumPeriod", - [ - 128u8, - 214u8, - 205u8, - 242u8, - 181u8, - 142u8, - 124u8, - 231u8, - 190u8, - 146u8, - 59u8, - 226u8, - 157u8, - 101u8, - 103u8, - 117u8, - 249u8, - 65u8, - 18u8, - 191u8, - 103u8, - 119u8, - 53u8, - 85u8, - 81u8, - 96u8, - 220u8, - 42u8, - 184u8, - 239u8, - 42u8, - 246u8, - ], - ) - } - } - } - } - pub mod indices { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_indices::pallet::Error; - pub type Call = runtime_types::pallet_indices::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Claim { - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Claim { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - Claim, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Claim { index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Claim { - fn from(x: ::subxt::ext::codec::Compact) -> Claim { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Claim { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Claim { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Claim::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Claim { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Claim {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Claim { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Claim; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Claim { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Claim { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Claim { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Claim { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Claim { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Claim { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Claim { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Claim { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Claim", - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Claim { - const PALLET: &'static str = "Indices"; - const CALL: &'static str = "claim"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Transfer { - pub new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Transfer { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Transfer { - new: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Transfer::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Transfer::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Transfer { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.new, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Transfer {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Transfer { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Transfer; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Transfer { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Transfer { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Transfer { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Transfer { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Transfer { new, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Transfer { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Transfer { new, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Transfer { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Transfer", - "new", - &self.new, - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Transfer { - const PALLET: &'static str = "Indices"; - const CALL: &'static str = "transfer"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Free { - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Free { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - Free, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Free { index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Free { - fn from(x: ::subxt::ext::codec::Compact) -> Free { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Free { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Free { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Free::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Free { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Free {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Free { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Free; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Free { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Free { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Free { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Free { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Free { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Free { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Free { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Free { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Free", - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Free { - const PALLET: &'static str = "Indices"; - const CALL: &'static str = "free"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceTransfer { - pub new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub index: ::core::primitive::u32, - pub freeze: ::core::primitive::bool, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceTransfer { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceTransfer { - new: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceTransfer::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceTransfer::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - freeze: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceTransfer::freeze`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceTransfer { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.freeze), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.new, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.freeze, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceTransfer {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ForceTransfer { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceTransfer; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceTransfer { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - freeze: { - let val = *vals - .get(&Some("freeze")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "freeze".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("freeze"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(ForceTransfer { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - freeze: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("freeze"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceTransfer { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceTransfer { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceTransfer { new, index, freeze } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("freeze"), - freeze as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ForceTransfer { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceTransfer { new, index, freeze } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("freeze"), - freeze as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceTransfer { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ForceTransfer", - "new", - &self.new, - "index", - &self.index, - "freeze", - &&self.freeze, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceTransfer { - const PALLET: &'static str = "Indices"; - const CALL: &'static str = "force_transfer"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Freeze { - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Freeze { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - Freeze, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Freeze { index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Freeze { - fn from(x: ::subxt::ext::codec::Compact) -> Freeze { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Freeze { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Freeze { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Freeze::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Freeze { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Freeze {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Freeze { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Freeze; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Freeze { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Freeze { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Freeze { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Freeze { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Freeze { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Freeze { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Freeze { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Freeze { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Freeze", - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Freeze { - const PALLET: &'static str = "Indices"; - const CALL: &'static str = "freeze"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn claim( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Indices", - "claim", - types::Claim { index }, - [ - 146u8, - 58u8, - 246u8, - 135u8, - 59u8, - 90u8, - 3u8, - 5u8, - 140u8, - 169u8, - 232u8, - 195u8, - 11u8, - 107u8, - 36u8, - 141u8, - 118u8, - 174u8, - 160u8, - 160u8, - 19u8, - 205u8, - 177u8, - 193u8, - 18u8, - 102u8, - 115u8, - 31u8, - 72u8, - 29u8, - 91u8, - 235u8, - ], - ) - } - pub fn transfer( - &self, - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Indices", - "transfer", - types::Transfer { new, index }, - [ - 121u8, - 156u8, - 174u8, - 248u8, - 72u8, - 126u8, - 99u8, - 188u8, - 71u8, - 134u8, - 107u8, - 147u8, - 139u8, - 139u8, - 57u8, - 198u8, - 17u8, - 241u8, - 142u8, - 64u8, - 16u8, - 121u8, - 249u8, - 146u8, - 24u8, - 86u8, - 78u8, - 187u8, - 38u8, - 146u8, - 96u8, - 218u8, - ], - ) - } - pub fn free( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Indices", - "free", - types::Free { index }, - [ - 241u8, - 211u8, - 234u8, - 102u8, - 189u8, - 22u8, - 209u8, - 27u8, - 8u8, - 229u8, - 80u8, - 227u8, - 138u8, - 252u8, - 222u8, - 111u8, - 77u8, - 201u8, - 235u8, - 51u8, - 163u8, - 247u8, - 13u8, - 126u8, - 216u8, - 136u8, - 57u8, - 222u8, - 56u8, - 66u8, - 215u8, - 244u8, - ], - ) - } - pub fn force_transfer( - &self, - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - index: ::core::primitive::u32, - freeze: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Indices", - "force_transfer", - types::ForceTransfer { - new, - index, - freeze, - }, - [ - 137u8, - 128u8, - 43u8, - 135u8, - 129u8, - 169u8, - 162u8, - 136u8, - 175u8, - 31u8, - 161u8, - 120u8, - 15u8, - 176u8, - 203u8, - 23u8, - 107u8, - 31u8, - 135u8, - 200u8, - 221u8, - 186u8, - 162u8, - 229u8, - 238u8, - 82u8, - 192u8, - 122u8, - 136u8, - 6u8, - 176u8, - 42u8, - ], - ) - } - pub fn freeze( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Indices", - "freeze", - types::Freeze { index }, - [ - 238u8, - 215u8, - 108u8, - 156u8, - 84u8, - 240u8, - 130u8, - 229u8, - 27u8, - 132u8, - 93u8, - 78u8, - 2u8, - 251u8, - 43u8, - 203u8, - 2u8, - 142u8, - 147u8, - 48u8, - 92u8, - 101u8, - 207u8, - 24u8, - 51u8, - 16u8, - 36u8, - 229u8, - 188u8, - 129u8, - 160u8, - 117u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_indices::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IndexAssigned { - pub who: ::subxt::utils::AccountId32, - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for IndexAssigned { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(IndexAssigned { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IndexAssigned::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IndexAssigned::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for IndexAssigned { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for IndexAssigned {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for IndexAssigned { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = IndexAssigned; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(IndexAssigned { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(IndexAssigned { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for IndexAssigned { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for IndexAssigned { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IndexAssigned { who, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for IndexAssigned { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IndexAssigned { who, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for IndexAssigned { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "IndexAssigned", - "who", - &self.who, - "index", - &&self.index, - ) - } - } - impl ::subxt::events::StaticEvent for IndexAssigned { - const PALLET: &'static str = "Indices"; - const EVENT: &'static str = "IndexAssigned"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IndexFreed { - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for IndexFreed { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - IndexFreed, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(IndexFreed { index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for IndexFreed { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> IndexFreed { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for IndexFreed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(IndexFreed { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IndexFreed::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for IndexFreed { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for IndexFreed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for IndexFreed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = IndexFreed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(IndexFreed { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(IndexFreed { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for IndexFreed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for IndexFreed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IndexFreed { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for IndexFreed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IndexFreed { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for IndexFreed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "IndexFreed", - "index", - &&self.index, - ) - } - } - impl ::subxt::events::StaticEvent for IndexFreed { - const PALLET: &'static str = "Indices"; - const EVENT: &'static str = "IndexFreed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IndexFrozen { - pub index: ::core::primitive::u32, - pub who: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for IndexFrozen { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(IndexFrozen { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IndexFrozen::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IndexFrozen::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for IndexFrozen { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for IndexFrozen {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for IndexFrozen { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = IndexFrozen; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(IndexFrozen { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(IndexFrozen { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for IndexFrozen { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for IndexFrozen { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IndexFrozen { index, who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for IndexFrozen { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IndexFrozen { index, who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for IndexFrozen { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "IndexFrozen", - "index", - &self.index, - "who", - &&self.who, - ) - } - } - impl ::subxt::events::StaticEvent for IndexFrozen { - const PALLET: &'static str = "Indices"; - const EVENT: &'static str = "IndexFrozen"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn accounts_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::bool, - ), - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Indices", - "Accounts", - ::alloc::vec::Vec::new(), - [ - 48u8, - 189u8, - 43u8, - 119u8, - 32u8, - 168u8, - 28u8, - 12u8, - 245u8, - 81u8, - 119u8, - 182u8, - 23u8, - 201u8, - 33u8, - 147u8, - 128u8, - 171u8, - 155u8, - 134u8, - 71u8, - 87u8, - 100u8, - 248u8, - 107u8, - 129u8, - 36u8, - 197u8, - 220u8, - 90u8, - 11u8, - 238u8, - ], - ) - } - pub fn accounts( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::bool, - ), - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Indices", - "Accounts", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 48u8, - 189u8, - 43u8, - 119u8, - 32u8, - 168u8, - 28u8, - 12u8, - 245u8, - 81u8, - 119u8, - 182u8, - 23u8, - 201u8, - 33u8, - 147u8, - 128u8, - 171u8, - 155u8, - 134u8, - 71u8, - 87u8, - 100u8, - 248u8, - 107u8, - 129u8, - 36u8, - 197u8, - 220u8, - 90u8, - 11u8, - 238u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn deposit( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Indices", - "Deposit", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - } - } - } - pub mod balances { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_balances::pallet::Error; - pub type Call = runtime_types::pallet_balances::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TransferAllowDeath { - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for TransferAllowDeath { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(TransferAllowDeath { - dest: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TransferAllowDeath::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TransferAllowDeath::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for TransferAllowDeath { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.dest, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for TransferAllowDeath {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for TransferAllowDeath { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = TransferAllowDeath; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(TransferAllowDeath { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(TransferAllowDeath { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for TransferAllowDeath { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for TransferAllowDeath { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TransferAllowDeath { dest, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for TransferAllowDeath { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TransferAllowDeath { dest, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for TransferAllowDeath { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "TransferAllowDeath", - "dest", - &self.dest, - "value", - &&self.value, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for TransferAllowDeath { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "transfer_allow_death"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetBalanceDeprecated { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - #[codec(compact)] - pub new_free: ::core::primitive::u128, - #[codec(compact)] - pub old_reserved: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetBalanceDeprecated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetBalanceDeprecated { - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetBalanceDeprecated::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_free: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetBalanceDeprecated::new_free`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - old_reserved: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetBalanceDeprecated::old_reserved`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetBalanceDeprecated { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.new_free), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.old_reserved), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.new_free), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.old_reserved), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetBalanceDeprecated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetBalanceDeprecated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetBalanceDeprecated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetBalanceDeprecated { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - new_free: { - let val = *vals - .get(&Some("new_free")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_free".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_free"))? - }, - old_reserved: { - let val = *vals - .get(&Some("old_reserved")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "old_reserved".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("old_reserved"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(SetBalanceDeprecated { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - new_free: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_free"))? - }, - old_reserved: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("old_reserved"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetBalanceDeprecated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetBalanceDeprecated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetBalanceDeprecated { who, new_free, old_reserved } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_free"), - new_free as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("old_reserved"), - old_reserved - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetBalanceDeprecated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetBalanceDeprecated { who, new_free, old_reserved } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_free"), - new_free as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("old_reserved"), - old_reserved - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetBalanceDeprecated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SetBalanceDeprecated", - "who", - &self.who, - "new_free", - &self.new_free, - "old_reserved", - &&self.old_reserved, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetBalanceDeprecated { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "set_balance_deprecated"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceTransfer { - pub source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceTransfer { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceTransfer { - source: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceTransfer::source`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - dest: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceTransfer::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceTransfer::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceTransfer { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.source), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.source, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.dest, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceTransfer {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ForceTransfer { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceTransfer; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceTransfer { - source: { - let val = *vals - .get(&Some("source")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "source".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("source"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(ForceTransfer { - source: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("source"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceTransfer { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceTransfer { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceTransfer { source, dest, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("source"), - source as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ForceTransfer { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceTransfer { source, dest, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("source"), - source as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceTransfer { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ForceTransfer", - "source", - &self.source, - "dest", - &self.dest, - "value", - &&self.value, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceTransfer { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "force_transfer"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TransferKeepAlive { - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for TransferKeepAlive { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(TransferKeepAlive { - dest: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TransferKeepAlive::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TransferKeepAlive::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for TransferKeepAlive { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.dest, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for TransferKeepAlive {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for TransferKeepAlive { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = TransferKeepAlive; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(TransferKeepAlive { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(TransferKeepAlive { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for TransferKeepAlive { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for TransferKeepAlive { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TransferKeepAlive { dest, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for TransferKeepAlive { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TransferKeepAlive { dest, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for TransferKeepAlive { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "TransferKeepAlive", - "dest", - &self.dest, - "value", - &&self.value, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for TransferKeepAlive { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "transfer_keep_alive"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TransferAll { - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub keep_alive: ::core::primitive::bool, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for TransferAll { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(TransferAll { - dest: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TransferAll::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - keep_alive: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TransferAll::keep_alive`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for TransferAll { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.keep_alive), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.keep_alive, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for TransferAll {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for TransferAll { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = TransferAll; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(TransferAll { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - keep_alive: { - let val = *vals - .get(&Some("keep_alive")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "keep_alive".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("keep_alive"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(TransferAll { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - keep_alive: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("keep_alive"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for TransferAll { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for TransferAll { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TransferAll { dest, keep_alive } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("keep_alive"), - keep_alive as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for TransferAll { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TransferAll { dest, keep_alive } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("keep_alive"), - keep_alive as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for TransferAll { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "TransferAll", - "dest", - &self.dest, - "keep_alive", - &&self.keep_alive, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for TransferAll { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "transfer_all"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceUnreserve { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceUnreserve { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceUnreserve { - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceUnreserve::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceUnreserve::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceUnreserve { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceUnreserve {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ForceUnreserve { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceUnreserve; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceUnreserve { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ForceUnreserve { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceUnreserve { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceUnreserve { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceUnreserve { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ForceUnreserve { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceUnreserve { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceUnreserve { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ForceUnreserve", - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceUnreserve { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "force_unreserve"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UpgradeAccounts { - pub who: ::std::vec::Vec<::subxt::utils::AccountId32>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for UpgradeAccounts { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(UpgradeAccounts { - who: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UpgradeAccounts::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for UpgradeAccounts { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.who) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.who, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.who) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.who, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for UpgradeAccounts {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for UpgradeAccounts { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UpgradeAccounts; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(UpgradeAccounts { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(UpgradeAccounts { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for UpgradeAccounts { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for UpgradeAccounts { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UpgradeAccounts { who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for UpgradeAccounts { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UpgradeAccounts { who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for UpgradeAccounts { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "UpgradeAccounts", - "who", - &&self.who, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for UpgradeAccounts { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "upgrade_accounts"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Transfer { - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Transfer { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Transfer { - dest: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Transfer::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Transfer::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Transfer { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.dest, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Transfer {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Transfer { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Transfer; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Transfer { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Transfer { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Transfer { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Transfer { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Transfer { dest, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Transfer { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Transfer { dest, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Transfer { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Transfer", - "dest", - &self.dest, - "value", - &&self.value, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Transfer { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "transfer"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceSetBalance { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - #[codec(compact)] - pub new_free: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceSetBalance { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceSetBalance { - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceSetBalance::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_free: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceSetBalance::new_free`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceSetBalance { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.new_free), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.new_free), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceSetBalance {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ForceSetBalance { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceSetBalance; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceSetBalance { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - new_free: { - let val = *vals - .get(&Some("new_free")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_free".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_free"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ForceSetBalance { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - new_free: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_free"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceSetBalance { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceSetBalance { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceSetBalance { who, new_free } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_free"), - new_free as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ForceSetBalance { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceSetBalance { who, new_free } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_free"), - new_free as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceSetBalance { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ForceSetBalance", - "who", - &self.who, - "new_free", - &&self.new_free, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceSetBalance { - const PALLET: &'static str = "Balances"; - const CALL: &'static str = "force_set_balance"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn transfer_allow_death( - &self, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Balances", - "transfer_allow_death", - types::TransferAllowDeath { - dest, - value, - }, - [ - 51u8, - 166u8, - 195u8, - 10u8, - 139u8, - 218u8, - 55u8, - 130u8, - 6u8, - 194u8, - 35u8, - 140u8, - 27u8, - 205u8, - 214u8, - 222u8, - 102u8, - 43u8, - 143u8, - 145u8, - 86u8, - 219u8, - 210u8, - 147u8, - 13u8, - 39u8, - 51u8, - 21u8, - 237u8, - 179u8, - 132u8, - 130u8, - ], - ) - } - pub fn set_balance_deprecated( - &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - new_free: ::core::primitive::u128, - old_reserved: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Balances", - "set_balance_deprecated", - types::SetBalanceDeprecated { - who, - new_free, - old_reserved, - }, - [ - 125u8, - 171u8, - 21u8, - 186u8, - 108u8, - 185u8, - 241u8, - 145u8, - 125u8, - 8u8, - 12u8, - 42u8, - 96u8, - 114u8, - 80u8, - 80u8, - 227u8, - 76u8, - 20u8, - 208u8, - 93u8, - 219u8, - 36u8, - 50u8, - 209u8, - 155u8, - 70u8, - 45u8, - 6u8, - 57u8, - 156u8, - 77u8, - ], - ) - } - pub fn force_transfer( - &self, - 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( - "Balances", - "force_transfer", - types::ForceTransfer { - source, - dest, - value, - }, - [ - 154u8, - 93u8, - 222u8, - 27u8, - 12u8, - 248u8, - 63u8, - 213u8, - 224u8, - 86u8, - 250u8, - 153u8, - 249u8, - 102u8, - 83u8, - 160u8, - 79u8, - 125u8, - 105u8, - 222u8, - 77u8, - 180u8, - 90u8, - 105u8, - 81u8, - 217u8, - 60u8, - 25u8, - 213u8, - 51u8, - 185u8, - 96u8, - ], - ) - } - pub fn transfer_keep_alive( - &self, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Balances", - "transfer_keep_alive", - types::TransferKeepAlive { - dest, - value, - }, - [ - 245u8, - 14u8, - 190u8, - 193u8, - 32u8, - 210u8, - 74u8, - 92u8, - 25u8, - 182u8, - 76u8, - 55u8, - 247u8, - 83u8, - 114u8, - 75u8, - 143u8, - 236u8, - 117u8, - 25u8, - 54u8, - 157u8, - 208u8, - 207u8, - 233u8, - 89u8, - 70u8, - 161u8, - 235u8, - 242u8, - 222u8, - 59u8, - ], - ) - } - pub fn transfer_all( - &self, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - keep_alive: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Balances", - "transfer_all", - types::TransferAll { - dest, - keep_alive, - }, - [ - 105u8, - 132u8, - 49u8, - 144u8, - 195u8, - 250u8, - 34u8, - 46u8, - 213u8, - 248u8, - 112u8, - 188u8, - 81u8, - 228u8, - 136u8, - 18u8, - 67u8, - 172u8, - 37u8, - 38u8, - 238u8, - 9u8, - 34u8, - 15u8, - 67u8, - 34u8, - 148u8, - 195u8, - 223u8, - 29u8, - 154u8, - 6u8, - ], - ) - } - pub fn force_unreserve( - &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - amount: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Balances", - "force_unreserve", - types::ForceUnreserve { - who, - amount, - }, - [ - 142u8, - 151u8, - 64u8, - 205u8, - 46u8, - 64u8, - 62u8, - 122u8, - 108u8, - 49u8, - 223u8, - 140u8, - 120u8, - 153u8, - 35u8, - 165u8, - 187u8, - 38u8, - 157u8, - 200u8, - 123u8, - 199u8, - 198u8, - 168u8, - 208u8, - 159u8, - 39u8, - 134u8, - 92u8, - 103u8, - 84u8, - 171u8, - ], - ) - } - pub fn upgrade_accounts( - &self, - who: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Balances", - "upgrade_accounts", - types::UpgradeAccounts { who }, - [ - 66u8, - 200u8, - 179u8, - 104u8, - 65u8, - 2u8, - 101u8, - 56u8, - 130u8, - 161u8, - 224u8, - 233u8, - 255u8, - 124u8, - 70u8, - 122u8, - 8u8, - 49u8, - 103u8, - 178u8, - 68u8, - 47u8, - 214u8, - 166u8, - 217u8, - 116u8, - 178u8, - 50u8, - 212u8, - 164u8, - 98u8, - 226u8, - ], - ) - } - pub fn transfer( - &self, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Balances", - "transfer", - types::Transfer { dest, value }, - [ - 154u8, - 145u8, - 140u8, - 54u8, - 50u8, - 123u8, - 225u8, - 249u8, - 200u8, - 217u8, - 172u8, - 110u8, - 233u8, - 198u8, - 77u8, - 198u8, - 211u8, - 89u8, - 8u8, - 13u8, - 240u8, - 94u8, - 28u8, - 13u8, - 242u8, - 217u8, - 168u8, - 23u8, - 106u8, - 254u8, - 249u8, - 120u8, - ], - ) - } - pub fn force_set_balance( - &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - new_free: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Balances", - "force_set_balance", - types::ForceSetBalance { - who, - new_free, - }, - [ - 114u8, - 229u8, - 59u8, - 204u8, - 180u8, - 83u8, - 17u8, - 4u8, - 59u8, - 4u8, - 55u8, - 39u8, - 151u8, - 196u8, - 124u8, - 60u8, - 209u8, - 65u8, - 193u8, - 11u8, - 44u8, - 164u8, - 116u8, - 93u8, - 169u8, - 30u8, - 199u8, - 165u8, - 55u8, - 231u8, - 223u8, - 43u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_balances::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Endowed { - pub account: ::subxt::utils::AccountId32, - pub free_balance: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Endowed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Endowed { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Endowed::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - free_balance: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Endowed::free_balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Endowed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.free_balance), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.free_balance, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Endowed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Endowed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Endowed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Endowed { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - free_balance: { - let val = *vals - .get(&Some("free_balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "free_balance".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("free_balance"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Endowed { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - free_balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("free_balance"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Endowed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Endowed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Endowed { account, free_balance } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("free_balance"), - free_balance - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Endowed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Endowed { account, free_balance } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("free_balance"), - free_balance - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Endowed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Endowed", - "account", - &self.account, - "free_balance", - &&self.free_balance, - ) - } - } - impl ::subxt::events::StaticEvent for Endowed { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Endowed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DustLost { - pub account: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DustLost { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(DustLost { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DustLost::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DustLost::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DustLost { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DustLost {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for DustLost { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DustLost; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DustLost { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(DustLost { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for DustLost { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DustLost { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DustLost { account, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for DustLost { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DustLost { account, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DustLost { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "DustLost", - "account", - &self.account, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for DustLost { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "DustLost"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Transfer { - pub from: ::subxt::utils::AccountId32, - pub to: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Transfer { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Transfer { - from: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Transfer::from`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - to: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Transfer::to`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Transfer::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Transfer { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.from), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.to), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.from, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.to, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Transfer {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Transfer { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Transfer; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Transfer { - from: { - let val = *vals - .get(&Some("from")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "from".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - to: { - let val = *vals - .get(&Some("to")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "to".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Transfer { - from: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - to: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Transfer { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Transfer { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Transfer { from, to, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("from"), - from as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Transfer { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Transfer { from, to, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("from"), - from as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Transfer { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Transfer", - "from", - &self.from, - "to", - &self.to, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Transfer { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Transfer"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BalanceSet { - pub who: ::subxt::utils::AccountId32, - pub free: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BalanceSet { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BalanceSet { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BalanceSet::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - free: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BalanceSet::free`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BalanceSet { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.free), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.free, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BalanceSet {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BalanceSet { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BalanceSet; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BalanceSet { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - free: { - let val = *vals - .get(&Some("free")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "free".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("free"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(BalanceSet { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - free: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("free"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for BalanceSet { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BalanceSet { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BalanceSet { who, free } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("free"), - free as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BalanceSet { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BalanceSet { who, free } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("free"), - free as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BalanceSet { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "BalanceSet", - "who", - &self.who, - "free", - &&self.free, - ) - } - } - impl ::subxt::events::StaticEvent for BalanceSet { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "BalanceSet"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Reserved { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Reserved { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Reserved { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Reserved::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Reserved::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Reserved { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Reserved {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Reserved { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Reserved; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Reserved { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Reserved { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Reserved { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Reserved { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Reserved { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Reserved { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Reserved { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Reserved { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Reserved", - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Reserved { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Reserved"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Unreserved { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Unreserved { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Unreserved { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unreserved::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unreserved::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Unreserved { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Unreserved {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Unreserved { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Unreserved; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Unreserved { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Unreserved { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Unreserved { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Unreserved { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unreserved { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Unreserved { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unreserved { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Unreserved { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Unreserved", - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Unreserved { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Unreserved"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReserveRepatriated { - pub from: ::subxt::utils::AccountId32, - pub to: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - pub destination_status: runtime_types::frame_support::traits::tokens::misc::BalanceStatus, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ReserveRepatriated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ReserveRepatriated { - from: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReserveRepatriated::from`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - to: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReserveRepatriated::to`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReserveRepatriated::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - destination_status: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ReserveRepatriated::destination_status`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ReserveRepatriated { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.from), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.to), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.destination_status, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.from, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.to, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.destination_status, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ReserveRepatriated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ReserveRepatriated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReserveRepatriated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ReserveRepatriated { - from: { - let val = *vals - .get(&Some("from")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "from".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - to: { - let val = *vals - .get(&Some("to")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "to".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - destination_status: { - let val = *vals - .get(&Some("destination_status")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "destination_status".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("destination_status"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(ReserveRepatriated { - from: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - to: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - destination_status: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("destination_status"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ReserveRepatriated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ReserveRepatriated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReserveRepatriated { - from, - to, - amount, - destination_status, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("from"), - from as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("destination_status"), - destination_status - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ReserveRepatriated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReserveRepatriated { - from, - to, - amount, - destination_status, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("from"), - from as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("destination_status"), - destination_status - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ReserveRepatriated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "ReserveRepatriated", - "from", - &self.from, - "to", - &self.to, - "amount", - &self.amount, - "destination_status", - &&self.destination_status, - ) - } - } - impl ::subxt::events::StaticEvent for ReserveRepatriated { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "ReserveRepatriated"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Deposit { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Deposit { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Deposit { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Deposit::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Deposit::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Deposit { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Deposit {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Deposit { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Deposit; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Deposit { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Deposit { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Deposit { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Deposit { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Deposit { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Deposit { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Deposit { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Deposit { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Deposit", - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Deposit { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Deposit"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Withdraw { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Withdraw { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Withdraw { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Withdraw::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Withdraw::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Withdraw { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Withdraw {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Withdraw { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Withdraw; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Withdraw { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Withdraw { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Withdraw { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Withdraw { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Withdraw { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Withdraw { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Withdraw { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Withdraw { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Withdraw", - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Withdraw { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Withdraw"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Slashed { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Slashed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Slashed { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Slashed::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Slashed::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Slashed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Slashed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Slashed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Slashed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Slashed { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Slashed { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Slashed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Slashed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Slashed { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Slashed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Slashed { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Slashed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Slashed", - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Slashed { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Slashed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Minted { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Minted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Minted { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Minted::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Minted::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Minted { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Minted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Minted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Minted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Minted { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Minted { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Minted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Minted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Minted { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Minted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Minted { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Minted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Minted", - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Minted { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Minted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Burned { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Burned { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Burned { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Burned::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Burned::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Burned { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Burned {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Burned { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Burned; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Burned { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Burned { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Burned { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Burned { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Burned { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Burned { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Burned { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Burned { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Burned", - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Burned { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Burned"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Suspended { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Suspended { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Suspended { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Suspended::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Suspended::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Suspended { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Suspended {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Suspended { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Suspended; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Suspended { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Suspended { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Suspended { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Suspended { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Suspended { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Suspended { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Suspended { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Suspended { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Suspended", - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Suspended { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Suspended"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Restored { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Restored { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Restored { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Restored::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Restored::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Restored { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Restored {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Restored { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Restored; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Restored { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Restored { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Restored { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Restored { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Restored { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Restored { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Restored { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Restored { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Restored", - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Restored { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Restored"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Upgraded { - pub who: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Upgraded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Upgraded { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Upgraded::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Upgraded { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.who) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.who, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.who) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.who, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Upgraded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Upgraded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Upgraded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Upgraded { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Upgraded { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Upgraded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Upgraded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Upgraded { who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Upgraded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Upgraded { who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Upgraded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Upgraded", - "who", - &&self.who, - ) - } - } - impl ::subxt::events::StaticEvent for Upgraded { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Upgraded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Issued { - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Issued { - type As = ::core::primitive::u128; - fn encode_as(&self) -> &::core::primitive::u128 { - &self.amount - } - fn decode_from( - x: ::core::primitive::u128, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Issued { amount: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Issued { - fn from(x: ::subxt::ext::codec::Compact) -> Issued { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Issued { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Issued { - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Issued::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Issued { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.amount) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.amount, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.amount) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.amount, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Issued {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Issued { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Issued; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Issued { - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Issued { - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Issued { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Issued { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Issued { amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Issued { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Issued { amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Issued { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Issued", - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Issued { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Issued"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Rescinded { - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Rescinded { - type As = ::core::primitive::u128; - fn encode_as(&self) -> &::core::primitive::u128 { - &self.amount - } - fn decode_from( - x: ::core::primitive::u128, - ) -> ::core::result::Result< - Rescinded, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Rescinded { amount: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Rescinded { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> Rescinded { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Rescinded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Rescinded { - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Rescinded::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Rescinded { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.amount) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.amount, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.amount) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.amount, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Rescinded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Rescinded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Rescinded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Rescinded { - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Rescinded { - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Rescinded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Rescinded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rescinded { amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Rescinded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rescinded { amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Rescinded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Rescinded", - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Rescinded { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Rescinded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Locked { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Locked { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Locked { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Locked::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Locked::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Locked { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Locked {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Locked { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Locked; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Locked { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Locked { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Locked { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Locked { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Locked { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Locked { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Locked { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Locked { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Locked", - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Locked { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Locked"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Unlocked { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Unlocked { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Unlocked { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unlocked::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unlocked::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Unlocked { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Unlocked {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Unlocked { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Unlocked; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Unlocked { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Unlocked { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Unlocked { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Unlocked { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unlocked { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Unlocked { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unlocked { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Unlocked { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Unlocked", - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Unlocked { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Unlocked"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Frozen { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Frozen { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Frozen { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Frozen::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Frozen::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Frozen { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Frozen {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Frozen { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Frozen; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Frozen { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Frozen { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Frozen { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Frozen { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Frozen { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Frozen { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Frozen { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Frozen { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Frozen", - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Frozen { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Frozen"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Thawed { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Thawed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Thawed { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Thawed::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Thawed::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Thawed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Thawed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Thawed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Thawed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Thawed { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Thawed { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Thawed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Thawed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Thawed { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Thawed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Thawed { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Thawed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Thawed", - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Thawed { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Thawed"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn total_issuance( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Balances", - "TotalIssuance", - ::alloc::vec::Vec::new(), - [ - 116u8, - 70u8, - 119u8, - 194u8, - 69u8, - 37u8, - 116u8, - 206u8, - 171u8, - 70u8, - 171u8, - 210u8, - 226u8, - 111u8, - 184u8, - 204u8, - 206u8, - 11u8, - 68u8, - 72u8, - 255u8, - 19u8, - 194u8, - 11u8, - 27u8, - 194u8, - 81u8, - 204u8, - 59u8, - 224u8, - 202u8, - 185u8, - ], - ) - } - pub fn inactive_issuance( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Balances", - "InactiveIssuance", - ::alloc::vec::Vec::new(), - [ - 212u8, - 185u8, - 19u8, - 50u8, - 250u8, - 72u8, - 173u8, - 50u8, - 4u8, - 104u8, - 161u8, - 249u8, - 77u8, - 247u8, - 204u8, - 248u8, - 11u8, - 18u8, - 57u8, - 4u8, - 82u8, - 110u8, - 30u8, - 216u8, - 16u8, - 37u8, - 87u8, - 67u8, - 189u8, - 235u8, - 214u8, - 155u8, - ], - ) - } - pub fn account_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_balances::types::AccountData< - ::core::primitive::u128, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Balances", - "Account", - ::alloc::vec::Vec::new(), - [ - 213u8, - 38u8, - 200u8, - 69u8, - 218u8, - 0u8, - 112u8, - 181u8, - 160u8, - 23u8, - 96u8, - 90u8, - 3u8, - 88u8, - 126u8, - 22u8, - 103u8, - 74u8, - 64u8, - 69u8, - 29u8, - 247u8, - 18u8, - 17u8, - 234u8, - 143u8, - 189u8, - 22u8, - 247u8, - 194u8, - 154u8, - 249u8, - ], - ) - } - pub fn account( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_balances::types::AccountData< - ::core::primitive::u128, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Balances", - "Account", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 213u8, - 38u8, - 200u8, - 69u8, - 218u8, - 0u8, - 112u8, - 181u8, - 160u8, - 23u8, - 96u8, - 90u8, - 3u8, - 88u8, - 126u8, - 22u8, - 103u8, - 74u8, - 64u8, - 69u8, - 29u8, - 247u8, - 18u8, - 17u8, - 234u8, - 143u8, - 189u8, - 22u8, - 247u8, - 194u8, - 154u8, - 249u8, - ], - ) - } - pub fn locks_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - runtime_types::pallet_balances::types::BalanceLock< - ::core::primitive::u128, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Balances", - "Locks", - ::alloc::vec::Vec::new(), - [ - 10u8, - 223u8, - 55u8, - 0u8, - 249u8, - 69u8, - 168u8, - 41u8, - 75u8, - 35u8, - 120u8, - 167u8, - 18u8, - 132u8, - 9u8, - 20u8, - 91u8, - 51u8, - 27u8, - 69u8, - 136u8, - 187u8, - 13u8, - 220u8, - 163u8, - 122u8, - 26u8, - 141u8, - 174u8, - 249u8, - 85u8, - 37u8, - ], - ) - } - pub fn locks( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - runtime_types::pallet_balances::types::BalanceLock< - ::core::primitive::u128, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Balances", - "Locks", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 10u8, - 223u8, - 55u8, - 0u8, - 249u8, - 69u8, - 168u8, - 41u8, - 75u8, - 35u8, - 120u8, - 167u8, - 18u8, - 132u8, - 9u8, - 20u8, - 91u8, - 51u8, - 27u8, - 69u8, - 136u8, - 187u8, - 13u8, - 220u8, - 163u8, - 122u8, - 26u8, - 141u8, - 174u8, - 249u8, - 85u8, - 37u8, - ], - ) - } - pub fn reserves_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_balances::types::ReserveData< - [::core::primitive::u8; 8usize], - ::core::primitive::u128, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Balances", - "Reserves", - ::alloc::vec::Vec::new(), - [ - 112u8, - 10u8, - 241u8, - 77u8, - 64u8, - 187u8, - 106u8, - 159u8, - 13u8, - 153u8, - 140u8, - 178u8, - 182u8, - 50u8, - 1u8, - 55u8, - 149u8, - 92u8, - 196u8, - 229u8, - 170u8, - 106u8, - 193u8, - 88u8, - 255u8, - 244u8, - 2u8, - 193u8, - 62u8, - 235u8, - 204u8, - 91u8, - ], - ) - } - pub fn reserves( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_balances::types::ReserveData< - [::core::primitive::u8; 8usize], - ::core::primitive::u128, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Balances", - "Reserves", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 112u8, - 10u8, - 241u8, - 77u8, - 64u8, - 187u8, - 106u8, - 159u8, - 13u8, - 153u8, - 140u8, - 178u8, - 182u8, - 50u8, - 1u8, - 55u8, - 149u8, - 92u8, - 196u8, - 229u8, - 170u8, - 106u8, - 193u8, - 88u8, - 255u8, - 244u8, - 2u8, - 193u8, - 62u8, - 235u8, - 204u8, - 91u8, - ], - ) - } - pub fn holds_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_balances::types::IdAmount< - (), - ::core::primitive::u128, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Balances", - "Holds", - ::alloc::vec::Vec::new(), - [ - 53u8, - 126u8, - 215u8, - 237u8, - 42u8, - 223u8, - 188u8, - 150u8, - 230u8, - 107u8, - 95u8, - 24u8, - 26u8, - 235u8, - 158u8, - 149u8, - 193u8, - 191u8, - 10u8, - 194u8, - 231u8, - 59u8, - 35u8, - 167u8, - 186u8, - 89u8, - 43u8, - 126u8, - 215u8, - 117u8, - 1u8, - 202u8, - ], - ) - } - pub fn holds( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_balances::types::IdAmount< - (), - ::core::primitive::u128, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Balances", - "Holds", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 53u8, - 126u8, - 215u8, - 237u8, - 42u8, - 223u8, - 188u8, - 150u8, - 230u8, - 107u8, - 95u8, - 24u8, - 26u8, - 235u8, - 158u8, - 149u8, - 193u8, - 191u8, - 10u8, - 194u8, - 231u8, - 59u8, - 35u8, - 167u8, - 186u8, - 89u8, - 43u8, - 126u8, - 215u8, - 117u8, - 1u8, - 202u8, - ], - ) - } - pub fn freezes_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_balances::types::IdAmount< - (), - ::core::primitive::u128, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Balances", - "Freezes", - ::alloc::vec::Vec::new(), - [ - 69u8, - 49u8, - 165u8, - 76u8, - 135u8, - 142u8, - 179u8, - 118u8, - 50u8, - 109u8, - 53u8, - 112u8, - 110u8, - 94u8, - 30u8, - 93u8, - 173u8, - 38u8, - 27u8, - 142u8, - 19u8, - 5u8, - 163u8, - 4u8, - 68u8, - 218u8, - 179u8, - 224u8, - 118u8, - 218u8, - 115u8, - 64u8, - ], - ) - } - pub fn freezes( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_balances::types::IdAmount< - (), - ::core::primitive::u128, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Balances", - "Freezes", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 69u8, - 49u8, - 165u8, - 76u8, - 135u8, - 142u8, - 179u8, - 118u8, - 50u8, - 109u8, - 53u8, - 112u8, - 110u8, - 94u8, - 30u8, - 93u8, - 173u8, - 38u8, - 27u8, - 142u8, - 19u8, - 5u8, - 163u8, - 4u8, - 68u8, - 218u8, - 179u8, - 224u8, - 118u8, - 218u8, - 115u8, - 64u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn existential_deposit( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Balances", - "ExistentialDeposit", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn max_locks( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Balances", - "MaxLocks", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn max_reserves( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Balances", - "MaxReserves", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn max_holds( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Balances", - "MaxHolds", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn max_freezes( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Balances", - "MaxFreezes", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod transaction_payment { - use super::root_mod; - use super::runtime_types; - pub type Event = runtime_types::pallet_transaction_payment::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TransactionFeePaid { - pub who: ::subxt::utils::AccountId32, - pub actual_fee: ::core::primitive::u128, - pub tip: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for TransactionFeePaid { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(TransactionFeePaid { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TransactionFeePaid::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - actual_fee: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TransactionFeePaid::actual_fee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tip: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TransactionFeePaid::tip`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for TransactionFeePaid { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.actual_fee), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.tip), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.actual_fee, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.tip, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for TransactionFeePaid {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for TransactionFeePaid { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = TransactionFeePaid; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(TransactionFeePaid { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - actual_fee: { - let val = *vals - .get(&Some("actual_fee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "actual_fee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("actual_fee"))? - }, - tip: { - let val = *vals - .get(&Some("tip")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tip".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tip"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(TransactionFeePaid { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - actual_fee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("actual_fee"))? - }, - tip: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tip"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for TransactionFeePaid { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for TransactionFeePaid { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TransactionFeePaid { who, actual_fee, tip } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("actual_fee"), - actual_fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tip"), - tip as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for TransactionFeePaid { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TransactionFeePaid { who, actual_fee, tip } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("actual_fee"), - actual_fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tip"), - tip as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for TransactionFeePaid { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "TransactionFeePaid", - "who", - &self.who, - "actual_fee", - &self.actual_fee, - "tip", - &&self.tip, - ) - } - } - impl ::subxt::events::StaticEvent for TransactionFeePaid { - const PALLET: &'static str = "TransactionPayment"; - const EVENT: &'static str = "TransactionFeePaid"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn next_fee_multiplier( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_arithmetic::fixed_point::FixedU128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "TransactionPayment", - "NextFeeMultiplier", - ::alloc::vec::Vec::new(), - [ - 247u8, - 39u8, - 81u8, - 170u8, - 225u8, - 226u8, - 82u8, - 147u8, - 34u8, - 113u8, - 147u8, - 213u8, - 59u8, - 80u8, - 139u8, - 35u8, - 36u8, - 196u8, - 152u8, - 19u8, - 9u8, - 159u8, - 176u8, - 79u8, - 249u8, - 201u8, - 170u8, - 1u8, - 129u8, - 79u8, - 146u8, - 197u8, - ], - ) - } - pub fn storage_version( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_transaction_payment::Releases, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "TransactionPayment", - "StorageVersion", - ::alloc::vec::Vec::new(), - [ - 105u8, - 243u8, - 158u8, - 241u8, - 159u8, - 231u8, - 253u8, - 6u8, - 4u8, - 32u8, - 85u8, - 178u8, - 126u8, - 31u8, - 203u8, - 134u8, - 154u8, - 38u8, - 122u8, - 155u8, - 150u8, - 251u8, - 174u8, - 15u8, - 74u8, - 134u8, - 216u8, - 244u8, - 168u8, - 175u8, - 158u8, - 144u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn operational_fee_multiplier( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u8> { - ::subxt::constants::Address::new_static( - "TransactionPayment", - "OperationalFeeMultiplier", - [ - 141u8, - 130u8, - 11u8, - 35u8, - 226u8, - 114u8, - 92u8, - 179u8, - 168u8, - 110u8, - 28u8, - 91u8, - 221u8, - 64u8, - 4u8, - 148u8, - 201u8, - 193u8, - 185u8, - 66u8, - 226u8, - 114u8, - 97u8, - 79u8, - 62u8, - 212u8, - 202u8, - 114u8, - 237u8, - 228u8, - 183u8, - 165u8, - ], - ) - } - } - } - } - pub mod authorship { - use super::root_mod; - use super::runtime_types; - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - 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", - ::alloc::vec::Vec::new(), - [ - 247u8, - 192u8, - 118u8, - 227u8, - 47u8, - 20u8, - 203u8, - 199u8, - 216u8, - 87u8, - 220u8, - 50u8, - 166u8, - 61u8, - 168u8, - 213u8, - 253u8, - 62u8, - 202u8, - 199u8, - 61u8, - 192u8, - 237u8, - 53u8, - 22u8, - 148u8, - 164u8, - 245u8, - 99u8, - 24u8, - 146u8, - 18u8, - ], - ) - } - } - } - } - pub mod staking { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_staking::pallet::pallet::Error; - pub type Call = runtime_types::pallet_staking::pallet::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Bond { - #[codec(compact)] - pub value: ::core::primitive::u128, - pub payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::AccountId32, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Bond { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Bond { - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bond::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - payee: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bond::payee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Bond { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.payee), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.payee, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Bond {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Bond { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Bond; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Bond { - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - payee: { - let val = *vals - .get(&Some("payee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "payee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("payee"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Bond { - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - payee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("payee"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Bond { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Bond { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Bond { value, payee } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("payee"), - payee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Bond { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Bond { value, payee } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("payee"), - payee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Bond { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Bond", - "value", - &self.value, - "payee", - &&self.payee, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Bond { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "bond"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BondExtra { - #[codec(compact)] - pub max_additional: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BondExtra { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(BondExtra { - max_additional: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BondExtra::max_additional`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BondExtra { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.max_additional) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.max_additional) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.max_additional) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.max_additional) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BondExtra {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BondExtra { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BondExtra; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BondExtra { - max_additional: { - let val = *vals - .get(&Some("max_additional")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_additional".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_additional"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(BondExtra { - max_additional: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_additional"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for BondExtra { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BondExtra { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BondExtra { max_additional } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("max_additional"), - max_additional - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BondExtra { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BondExtra { max_additional } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("max_additional"), - max_additional - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BondExtra { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "BondExtra", - "max_additional", - &&self.max_additional, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for BondExtra { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "bond_extra"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Unbond { - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Unbond { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Unbond { - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unbond::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Unbond { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Unbond {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Unbond { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Unbond; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Unbond { - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Unbond { - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Unbond { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Unbond { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unbond { value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Unbond { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unbond { value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Unbond { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Unbond", - "value", - &&self.value, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Unbond { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "unbond"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct WithdrawUnbonded { - pub num_slashing_spans: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for WithdrawUnbonded { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.num_slashing_spans - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - WithdrawUnbonded, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(WithdrawUnbonded { - num_slashing_spans: x, - }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for WithdrawUnbonded { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> WithdrawUnbonded { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for WithdrawUnbonded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(WithdrawUnbonded { - num_slashing_spans: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `WithdrawUnbonded::num_slashing_spans`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for WithdrawUnbonded { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &&self.num_slashing_spans, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.num_slashing_spans, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &&self.num_slashing_spans, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.num_slashing_spans, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for WithdrawUnbonded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for WithdrawUnbonded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = WithdrawUnbonded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(WithdrawUnbonded { - num_slashing_spans: { - let val = *vals - .get(&Some("num_slashing_spans")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "num_slashing_spans".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(WithdrawUnbonded { - num_slashing_spans: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for WithdrawUnbonded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for WithdrawUnbonded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WithdrawUnbonded { num_slashing_spans } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("num_slashing_spans"), - num_slashing_spans - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for WithdrawUnbonded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WithdrawUnbonded { num_slashing_spans } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("num_slashing_spans"), - num_slashing_spans - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for WithdrawUnbonded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "WithdrawUnbonded", - "num_slashing_spans", - &&self.num_slashing_spans, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for WithdrawUnbonded { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "withdraw_unbonded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Validate { - pub prefs: runtime_types::pallet_staking::ValidatorPrefs, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Validate { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Validate { - prefs: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Validate::prefs`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Validate { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.prefs) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.prefs, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.prefs) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.prefs, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Validate {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Validate { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Validate; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Validate { - prefs: { - let val = *vals - .get(&Some("prefs")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prefs".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prefs"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Validate { - prefs: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prefs"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Validate { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Validate { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Validate { prefs } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("prefs"), - prefs as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Validate { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Validate { prefs } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("prefs"), - prefs as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Validate { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Validate", - "prefs", - &&self.prefs, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Validate { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "validate"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Nominate { - pub targets: ::std::vec::Vec< - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Nominate { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Nominate { - targets: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Nominate::targets`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Nominate { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.targets) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.targets, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.targets) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.targets, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Nominate {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Nominate { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Nominate; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Nominate { - targets: { - let val = *vals - .get(&Some("targets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "targets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("targets"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Nominate { - targets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("targets"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Nominate { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Nominate { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Nominate { targets } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("targets"), - targets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Nominate { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Nominate { targets } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("targets"), - targets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Nominate { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Nominate", - "targets", - &&self.targets, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Nominate { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "nominate"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Chill; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Chill { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Chill) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Chill { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Chill {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Chill { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Chill; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(Chill) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Chill { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Chill { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Chill = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Chill { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Chill = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Chill { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "Chill") - } - } - impl ::subxt::blocks::StaticExtrinsic for Chill { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "chill"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetPayee { - pub payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::AccountId32, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetPayee { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetPayee { - payee: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetPayee::payee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetPayee { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.payee) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.payee, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.payee) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.payee, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetPayee {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetPayee { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetPayee; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetPayee { - payee: { - let val = *vals - .get(&Some("payee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "payee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("payee"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetPayee { - payee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("payee"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SetPayee { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetPayee { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetPayee { payee } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("payee"), - payee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetPayee { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetPayee { payee } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("payee"), - payee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetPayee { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetPayee", - "payee", - &&self.payee, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetPayee { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "set_payee"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetController; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetController { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetController) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetController { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetController {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetController { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetController; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(SetController) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetController { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetController { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetController = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetController { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetController = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetController { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "SetController") - } - } - impl ::subxt::blocks::StaticExtrinsic for SetController { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "set_controller"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetValidatorCount { - #[codec(compact)] - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetValidatorCount { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetValidatorCount { - new: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetValidatorCount::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetValidatorCount { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.new) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.new) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.new) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.new) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetValidatorCount {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetValidatorCount { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetValidatorCount; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetValidatorCount { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetValidatorCount { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetValidatorCount { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetValidatorCount { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetValidatorCount { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetValidatorCount { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetValidatorCount { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetValidatorCount { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetValidatorCount", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetValidatorCount { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "set_validator_count"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IncreaseValidatorCount { - #[codec(compact)] - pub additional: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for IncreaseValidatorCount { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(IncreaseValidatorCount { - additional: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `IncreaseValidatorCount::additional`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for IncreaseValidatorCount { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.additional) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.additional) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.additional) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.additional) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for IncreaseValidatorCount {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for IncreaseValidatorCount { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = IncreaseValidatorCount; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(IncreaseValidatorCount { - additional: { - let val = *vals - .get(&Some("additional")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "additional".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("additional"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(IncreaseValidatorCount { - additional: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("additional"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for IncreaseValidatorCount { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for IncreaseValidatorCount { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IncreaseValidatorCount { additional } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("additional"), - additional as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for IncreaseValidatorCount { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IncreaseValidatorCount { additional } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("additional"), - additional as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for IncreaseValidatorCount { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "IncreaseValidatorCount", - "additional", - &&self.additional, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for IncreaseValidatorCount { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "increase_validator_count"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScaleValidatorCount { - pub factor: runtime_types::sp_arithmetic::per_things::Percent, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ScaleValidatorCount { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ScaleValidatorCount { - factor: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScaleValidatorCount::factor`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ScaleValidatorCount { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.factor) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.factor, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.factor) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.factor, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ScaleValidatorCount {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ScaleValidatorCount { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ScaleValidatorCount; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ScaleValidatorCount { - factor: { - let val = *vals - .get(&Some("factor")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "factor".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("factor"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ScaleValidatorCount { - factor: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("factor"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ScaleValidatorCount { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ScaleValidatorCount { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ScaleValidatorCount { factor } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("factor"), - factor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ScaleValidatorCount { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ScaleValidatorCount { factor } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("factor"), - factor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ScaleValidatorCount { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ScaleValidatorCount", - "factor", - &&self.factor, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ScaleValidatorCount { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "scale_validator_count"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceNoEras; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceNoEras { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceNoEras) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceNoEras { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceNoEras {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ForceNoEras { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceNoEras; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(ForceNoEras) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ForceNoEras { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceNoEras { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceNoEras = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ForceNoEras { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceNoEras = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceNoEras { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "ForceNoEras") - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceNoEras { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "force_no_eras"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceNewEra; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceNewEra { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceNewEra) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceNewEra { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceNewEra {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ForceNewEra { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceNewEra; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(ForceNewEra) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ForceNewEra { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceNewEra { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceNewEra = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ForceNewEra { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceNewEra = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceNewEra { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "ForceNewEra") - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceNewEra { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "force_new_era"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetInvulnerables { - pub invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetInvulnerables { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetInvulnerables { - invulnerables: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `SetInvulnerables::invulnerables`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetInvulnerables { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.invulnerables) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.invulnerables, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.invulnerables) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.invulnerables, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetInvulnerables {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetInvulnerables { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetInvulnerables; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetInvulnerables { - invulnerables: { - let val = *vals - .get(&Some("invulnerables")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "invulnerables".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("invulnerables"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetInvulnerables { - invulnerables: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("invulnerables"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetInvulnerables { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetInvulnerables { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetInvulnerables { invulnerables } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("invulnerables"), - invulnerables - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetInvulnerables { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetInvulnerables { invulnerables } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("invulnerables"), - invulnerables - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetInvulnerables { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetInvulnerables", - "invulnerables", - &&self.invulnerables, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetInvulnerables { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "set_invulnerables"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceUnstake { - pub stash: ::subxt::utils::AccountId32, - pub num_slashing_spans: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceUnstake { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceUnstake { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceUnstake::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - num_slashing_spans: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ForceUnstake::num_slashing_spans`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceUnstake { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.num_slashing_spans, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.num_slashing_spans, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceUnstake {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ForceUnstake { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceUnstake; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceUnstake { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - num_slashing_spans: { - let val = *vals - .get(&Some("num_slashing_spans")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "num_slashing_spans".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ForceUnstake { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - num_slashing_spans: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceUnstake { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceUnstake { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceUnstake { stash, num_slashing_spans } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("num_slashing_spans"), - num_slashing_spans - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ForceUnstake { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceUnstake { stash, num_slashing_spans } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("num_slashing_spans"), - num_slashing_spans - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceUnstake { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ForceUnstake", - "stash", - &self.stash, - "num_slashing_spans", - &&self.num_slashing_spans, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceUnstake { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "force_unstake"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceNewEraAlways; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceNewEraAlways { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceNewEraAlways) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceNewEraAlways { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceNewEraAlways {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ForceNewEraAlways { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceNewEraAlways; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(ForceNewEraAlways) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceNewEraAlways { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceNewEraAlways { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceNewEraAlways = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ForceNewEraAlways { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceNewEraAlways = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceNewEraAlways { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "ForceNewEraAlways") - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceNewEraAlways { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "force_new_era_always"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelDeferredSlash { - pub era: ::core::primitive::u32, - pub slash_indices: ::std::vec::Vec<::core::primitive::u32>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CancelDeferredSlash { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CancelDeferredSlash { - era: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CancelDeferredSlash::era`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - slash_indices: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CancelDeferredSlash::slash_indices`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CancelDeferredSlash { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.era), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.slash_indices), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.era, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.slash_indices, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CancelDeferredSlash {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for CancelDeferredSlash { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CancelDeferredSlash; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CancelDeferredSlash { - era: { - let val = *vals - .get(&Some("era")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "era".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - slash_indices: { - let val = *vals - .get(&Some("slash_indices")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "slash_indices".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("slash_indices"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(CancelDeferredSlash { - era: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - slash_indices: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("slash_indices"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CancelDeferredSlash { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for CancelDeferredSlash { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CancelDeferredSlash { era, slash_indices } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("era"), - era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slash_indices"), - slash_indices - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for CancelDeferredSlash { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CancelDeferredSlash { era, slash_indices } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("era"), - era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slash_indices"), - slash_indices - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CancelDeferredSlash { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "CancelDeferredSlash", - "era", - &self.era, - "slash_indices", - &&self.slash_indices, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for CancelDeferredSlash { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "cancel_deferred_slash"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PayoutStakers { - pub validator_stash: ::subxt::utils::AccountId32, - pub era: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PayoutStakers { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(PayoutStakers { - validator_stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PayoutStakers::validator_stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - era: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PayoutStakers::era`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PayoutStakers { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.validator_stash, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.era), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.validator_stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.era, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PayoutStakers {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PayoutStakers { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PayoutStakers; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PayoutStakers { - validator_stash: { - let val = *vals - .get(&Some("validator_stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator_stash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_stash"))? - }, - era: { - let val = *vals - .get(&Some("era")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "era".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(PayoutStakers { - validator_stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_stash"))? - }, - era: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PayoutStakers { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PayoutStakers { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PayoutStakers { validator_stash, era } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validator_stash"), - validator_stash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("era"), - era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PayoutStakers { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PayoutStakers { validator_stash, era } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validator_stash"), - validator_stash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("era"), - era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PayoutStakers { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PayoutStakers", - "validator_stash", - &self.validator_stash, - "era", - &&self.era, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for PayoutStakers { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "payout_stakers"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Rebond { - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Rebond { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Rebond { - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Rebond::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Rebond { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Rebond {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Rebond { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Rebond; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Rebond { - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Rebond { - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Rebond { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Rebond { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rebond { value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Rebond { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rebond { value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Rebond { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Rebond", - "value", - &&self.value, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Rebond { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "rebond"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReapStash { - pub stash: ::subxt::utils::AccountId32, - pub num_slashing_spans: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ReapStash { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ReapStash { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReapStash::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - num_slashing_spans: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReapStash::num_slashing_spans`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ReapStash { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.num_slashing_spans, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.num_slashing_spans, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ReapStash {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ReapStash { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReapStash; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ReapStash { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - num_slashing_spans: { - let val = *vals - .get(&Some("num_slashing_spans")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "num_slashing_spans".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ReapStash { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - num_slashing_spans: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ReapStash { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ReapStash { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReapStash { stash, num_slashing_spans } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("num_slashing_spans"), - num_slashing_spans - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ReapStash { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReapStash { stash, num_slashing_spans } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("num_slashing_spans"), - num_slashing_spans - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ReapStash { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ReapStash", - "stash", - &self.stash, - "num_slashing_spans", - &&self.num_slashing_spans, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ReapStash { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "reap_stash"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Kick { - pub who: ::std::vec::Vec< - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Kick { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Kick { - who: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Kick::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Kick { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.who) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.who, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.who) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.who, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Kick {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Kick { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Kick; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Kick { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Kick { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Kick { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Kick { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Kick { who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Kick { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Kick { who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Kick { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Kick", - "who", - &&self.who, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Kick { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "kick"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetStakingConfigs { - pub min_nominator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u128, - >, - pub min_validator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u128, - >, - pub max_nominator_count: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u32, - >, - pub max_validator_count: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u32, - >, - pub chill_threshold: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - runtime_types::sp_arithmetic::per_things::Percent, - >, - pub min_commission: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - runtime_types::sp_arithmetic::per_things::Perbill, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetStakingConfigs { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetStakingConfigs { - min_nominator_bond: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetStakingConfigs::min_nominator_bond`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - min_validator_bond: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetStakingConfigs::min_validator_bond`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_nominator_count: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetStakingConfigs::max_nominator_count`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_validator_count: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetStakingConfigs::max_validator_count`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - chill_threshold: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetStakingConfigs::chill_threshold`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - min_commission: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetStakingConfigs::min_commission`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetStakingConfigs { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.min_nominator_bond, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.min_validator_bond, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.max_nominator_count, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.max_validator_count, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.chill_threshold, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.min_commission), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.min_nominator_bond, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.min_validator_bond, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_nominator_count, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_validator_count, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.chill_threshold, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.min_commission, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetStakingConfigs {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetStakingConfigs { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetStakingConfigs; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetStakingConfigs { - min_nominator_bond: { - let val = *vals - .get(&Some("min_nominator_bond")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "min_nominator_bond".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("min_nominator_bond"))? - }, - min_validator_bond: { - let val = *vals - .get(&Some("min_validator_bond")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "min_validator_bond".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("min_validator_bond"))? - }, - max_nominator_count: { - let val = *vals - .get(&Some("max_nominator_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_nominator_count".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_nominator_count"))? - }, - max_validator_count: { - let val = *vals - .get(&Some("max_validator_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_validator_count".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_validator_count"))? - }, - chill_threshold: { - let val = *vals - .get(&Some("chill_threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "chill_threshold".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("chill_threshold"))? - }, - min_commission: { - let val = *vals - .get(&Some("min_commission")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "min_commission".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("min_commission"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = value; - Ok(SetStakingConfigs { - min_nominator_bond: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("min_nominator_bond"))? - }, - min_validator_bond: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("min_validator_bond"))? - }, - max_nominator_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_nominator_count"))? - }, - max_validator_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_validator_count"))? - }, - chill_threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("chill_threshold"))? - }, - min_commission: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("min_commission"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetStakingConfigs { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetStakingConfigs { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetStakingConfigs { - min_nominator_bond, - min_validator_bond, - max_nominator_count, - max_validator_count, - chill_threshold, - min_commission, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("min_nominator_bond"), - min_nominator_bond - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_validator_bond"), - min_validator_bond - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_nominator_count"), - max_nominator_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_validator_count"), - max_validator_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("chill_threshold"), - chill_threshold - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_commission"), - min_commission - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetStakingConfigs { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetStakingConfigs { - min_nominator_bond, - min_validator_bond, - max_nominator_count, - max_validator_count, - chill_threshold, - min_commission, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("min_nominator_bond"), - min_nominator_bond - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_validator_bond"), - min_validator_bond - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_nominator_count"), - max_nominator_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_validator_count"), - max_validator_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("chill_threshold"), - chill_threshold - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_commission"), - min_commission - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetStakingConfigs { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "min_nominator_bond", - "min_validator_bond", - "max_nominator_count", - "max_validator_count", - "chill_threshold", - "min_commission", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.min_nominator_bond, - &self.min_validator_bond, - &self.max_nominator_count, - &self.max_validator_count, - &self.chill_threshold, - &&self.min_commission, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "SetStakingConfigs", - names, - values, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetStakingConfigs { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "set_staking_configs"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ChillOther { - pub controller: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ChillOther { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ChillOther { - controller: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ChillOther::controller`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ChillOther { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.controller) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.controller, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.controller) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.controller, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ChillOther {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ChillOther { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ChillOther; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ChillOther { - controller: { - let val = *vals - .get(&Some("controller")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "controller".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("controller"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ChillOther { - controller: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("controller"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ChillOther { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ChillOther { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ChillOther { controller } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("controller"), - controller as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ChillOther { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ChillOther { controller } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("controller"), - controller as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ChillOther { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ChillOther", - "controller", - &&self.controller, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ChillOther { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "chill_other"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceApplyMinCommission { - pub validator_stash: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceApplyMinCommission { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceApplyMinCommission { - validator_stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ForceApplyMinCommission::validator_stash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceApplyMinCommission { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &&self.validator_stash, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.validator_stash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.validator_stash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.validator_stash, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for ForceApplyMinCommission {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ForceApplyMinCommission { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceApplyMinCommission; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceApplyMinCommission { - validator_stash: { - let val = *vals - .get(&Some("validator_stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator_stash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_stash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ForceApplyMinCommission { - validator_stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_stash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceApplyMinCommission { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ForceApplyMinCommission { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceApplyMinCommission { validator_stash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validator_stash"), - validator_stash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ForceApplyMinCommission { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceApplyMinCommission { validator_stash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validator_stash"), - validator_stash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceApplyMinCommission { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ForceApplyMinCommission", - "validator_stash", - &&self.validator_stash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceApplyMinCommission { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "force_apply_min_commission"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMinCommission { - pub new: runtime_types::sp_arithmetic::per_things::Perbill, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetMinCommission { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMinCommission { - new: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMinCommission::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetMinCommission { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetMinCommission {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetMinCommission { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMinCommission; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMinCommission { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetMinCommission { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetMinCommission { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetMinCommission { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMinCommission { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetMinCommission { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMinCommission { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMinCommission { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetMinCommission", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetMinCommission { - const PALLET: &'static str = "Staking"; - const CALL: &'static str = "set_min_commission"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn bond( - &self, - value: ::core::primitive::u128, - payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::AccountId32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "bond", - types::Bond { value, payee }, - [ - 45u8, - 207u8, - 34u8, - 221u8, - 252u8, - 224u8, - 162u8, - 185u8, - 67u8, - 224u8, - 88u8, - 91u8, - 232u8, - 114u8, - 183u8, - 44u8, - 39u8, - 5u8, - 12u8, - 163u8, - 57u8, - 31u8, - 251u8, - 58u8, - 37u8, - 232u8, - 206u8, - 75u8, - 164u8, - 26u8, - 170u8, - 101u8, - ], - ) - } - pub fn bond_extra( - &self, - max_additional: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "bond_extra", - types::BondExtra { max_additional }, - [ - 9u8, - 143u8, - 179u8, - 99u8, - 91u8, - 254u8, - 114u8, - 189u8, - 202u8, - 245u8, - 48u8, - 130u8, - 103u8, - 17u8, - 183u8, - 177u8, - 172u8, - 156u8, - 227u8, - 145u8, - 191u8, - 134u8, - 81u8, - 3u8, - 170u8, - 85u8, - 40u8, - 56u8, - 216u8, - 95u8, - 232u8, - 52u8, - ], - ) - } - pub fn unbond( - &self, - value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "unbond", - types::Unbond { value }, - [ - 70u8, - 201u8, - 146u8, - 56u8, - 51u8, - 237u8, - 90u8, - 193u8, - 69u8, - 42u8, - 168u8, - 96u8, - 215u8, - 128u8, - 253u8, - 22u8, - 239u8, - 14u8, - 214u8, - 103u8, - 170u8, - 140u8, - 2u8, - 182u8, - 3u8, - 190u8, - 184u8, - 191u8, - 231u8, - 137u8, - 50u8, - 16u8, - ], - ) - } - pub fn withdraw_unbonded( - &self, - num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "withdraw_unbonded", - types::WithdrawUnbonded { - num_slashing_spans, - }, - [ - 229u8, - 128u8, - 177u8, - 224u8, - 197u8, - 118u8, - 239u8, - 142u8, - 179u8, - 164u8, - 10u8, - 205u8, - 124u8, - 254u8, - 209u8, - 157u8, - 172u8, - 87u8, - 58u8, - 120u8, - 74u8, - 12u8, - 150u8, - 117u8, - 234u8, - 32u8, - 191u8, - 182u8, - 92u8, - 97u8, - 77u8, - 59u8, - ], - ) - } - pub fn validate( - &self, - prefs: runtime_types::pallet_staking::ValidatorPrefs, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "validate", - types::Validate { prefs }, - [ - 63u8, - 83u8, - 12u8, - 16u8, - 56u8, - 84u8, - 41u8, - 141u8, - 202u8, - 0u8, - 37u8, - 30u8, - 115u8, - 2u8, - 145u8, - 101u8, - 168u8, - 89u8, - 94u8, - 98u8, - 8u8, - 45u8, - 140u8, - 237u8, - 101u8, - 136u8, - 179u8, - 162u8, - 205u8, - 41u8, - 88u8, - 248u8, - ], - ) - } - pub fn nominate( - &self, - targets: ::std::vec::Vec< - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "nominate", - types::Nominate { targets }, - [ - 14u8, - 209u8, - 112u8, - 222u8, - 40u8, - 211u8, - 118u8, - 188u8, - 26u8, - 88u8, - 135u8, - 233u8, - 36u8, - 99u8, - 68u8, - 189u8, - 184u8, - 169u8, - 146u8, - 217u8, - 87u8, - 198u8, - 89u8, - 32u8, - 193u8, - 135u8, - 251u8, - 88u8, - 241u8, - 151u8, - 205u8, - 138u8, - ], - ) - } - pub fn chill(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "chill", - types::Chill {}, - [ - 157u8, - 75u8, - 243u8, - 69u8, - 110u8, - 192u8, - 22u8, - 27u8, - 107u8, - 68u8, - 236u8, - 58u8, - 179u8, - 34u8, - 118u8, - 98u8, - 131u8, - 62u8, - 242u8, - 84u8, - 149u8, - 24u8, - 83u8, - 223u8, - 78u8, - 12u8, - 192u8, - 22u8, - 111u8, - 11u8, - 171u8, - 149u8, - ], - ) - } - 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", - types::SetPayee { payee }, - [ - 86u8, - 172u8, - 187u8, - 98u8, - 106u8, - 240u8, - 184u8, - 60u8, - 163u8, - 244u8, - 7u8, - 64u8, - 147u8, - 168u8, - 192u8, - 177u8, - 211u8, - 138u8, - 73u8, - 188u8, - 159u8, - 154u8, - 175u8, - 219u8, - 231u8, - 235u8, - 93u8, - 195u8, - 204u8, - 100u8, - 196u8, - 241u8, - ], - ) - } - pub fn set_controller( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "set_controller", - types::SetController {}, - [ - 172u8, - 27u8, - 195u8, - 188u8, - 145u8, - 203u8, - 190u8, - 174u8, - 145u8, - 43u8, - 253u8, - 87u8, - 11u8, - 229u8, - 112u8, - 18u8, - 57u8, - 101u8, - 84u8, - 235u8, - 109u8, - 228u8, - 58u8, - 129u8, - 179u8, - 174u8, - 245u8, - 169u8, - 89u8, - 240u8, - 39u8, - 67u8, - ], - ) - } - pub fn set_validator_count( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "set_validator_count", - types::SetValidatorCount { new }, - [ - 172u8, - 225u8, - 157u8, - 48u8, - 242u8, - 217u8, - 126u8, - 206u8, - 26u8, - 156u8, - 203u8, - 100u8, - 116u8, - 189u8, - 98u8, - 89u8, - 151u8, - 101u8, - 77u8, - 236u8, - 101u8, - 8u8, - 148u8, - 236u8, - 180u8, - 175u8, - 232u8, - 146u8, - 141u8, - 141u8, - 78u8, - 165u8, - ], - ) - } - pub fn increase_validator_count( - &self, - additional: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "increase_validator_count", - types::IncreaseValidatorCount { - additional, - }, - [ - 108u8, - 67u8, - 131u8, - 248u8, - 139u8, - 227u8, - 224u8, - 221u8, - 248u8, - 94u8, - 141u8, - 104u8, - 131u8, - 250u8, - 127u8, - 164u8, - 137u8, - 211u8, - 5u8, - 27u8, - 185u8, - 251u8, - 120u8, - 243u8, - 165u8, - 50u8, - 197u8, - 161u8, - 125u8, - 195u8, - 16u8, - 29u8, - ], - ) - } - pub fn scale_validator_count( - &self, - factor: runtime_types::sp_arithmetic::per_things::Percent, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "scale_validator_count", - types::ScaleValidatorCount { - factor, - }, - [ - 93u8, - 200u8, - 119u8, - 240u8, - 148u8, - 144u8, - 175u8, - 135u8, - 102u8, - 130u8, - 183u8, - 216u8, - 28u8, - 215u8, - 155u8, - 233u8, - 152u8, - 65u8, - 49u8, - 125u8, - 196u8, - 79u8, - 31u8, - 195u8, - 233u8, - 79u8, - 150u8, - 138u8, - 103u8, - 161u8, - 78u8, - 154u8, - ], - ) - } - pub fn force_no_eras( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "force_no_eras", - types::ForceNoEras {}, - [ - 77u8, - 5u8, - 105u8, - 167u8, - 251u8, - 78u8, - 52u8, - 80u8, - 177u8, - 226u8, - 28u8, - 130u8, - 106u8, - 62u8, - 40u8, - 210u8, - 110u8, - 62u8, - 21u8, - 113u8, - 234u8, - 227u8, - 171u8, - 205u8, - 240u8, - 46u8, - 32u8, - 84u8, - 184u8, - 208u8, - 61u8, - 207u8, - ], - ) - } - pub fn force_new_era( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "force_new_era", - types::ForceNewEra {}, - [ - 119u8, - 45u8, - 11u8, - 87u8, - 236u8, - 189u8, - 41u8, - 142u8, - 130u8, - 10u8, - 132u8, - 140u8, - 210u8, - 134u8, - 66u8, - 152u8, - 149u8, - 55u8, - 60u8, - 31u8, - 190u8, - 41u8, - 177u8, - 103u8, - 245u8, - 193u8, - 95u8, - 255u8, - 29u8, - 79u8, - 112u8, - 188u8, - ], - ) - } - pub fn set_invulnerables( - &self, - invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "set_invulnerables", - types::SetInvulnerables { - invulnerables, - }, - [ - 31u8, - 115u8, - 221u8, - 229u8, - 187u8, - 61u8, - 33u8, - 22u8, - 126u8, - 142u8, - 248u8, - 190u8, - 213u8, - 35u8, - 49u8, - 208u8, - 193u8, - 0u8, - 58u8, - 18u8, - 136u8, - 220u8, - 32u8, - 8u8, - 121u8, - 36u8, - 184u8, - 57u8, - 6u8, - 125u8, - 199u8, - 245u8, - ], - ) - } - pub fn force_unstake( - &self, - stash: ::subxt::utils::AccountId32, - num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "force_unstake", - types::ForceUnstake { - stash, - num_slashing_spans, - }, - [ - 205u8, - 115u8, - 222u8, - 58u8, - 168u8, - 3u8, - 59u8, - 58u8, - 220u8, - 98u8, - 204u8, - 90u8, - 36u8, - 250u8, - 178u8, - 45u8, - 213u8, - 158u8, - 92u8, - 107u8, - 3u8, - 94u8, - 118u8, - 194u8, - 187u8, - 196u8, - 101u8, - 250u8, - 36u8, - 119u8, - 21u8, - 19u8, - ], - ) - } - pub fn force_new_era_always( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "force_new_era_always", - types::ForceNewEraAlways {}, - [ - 102u8, - 153u8, - 116u8, - 85u8, - 80u8, - 52u8, - 89u8, - 215u8, - 173u8, - 159u8, - 96u8, - 99u8, - 180u8, - 5u8, - 62u8, - 142u8, - 181u8, - 101u8, - 160u8, - 57u8, - 177u8, - 182u8, - 6u8, - 252u8, - 107u8, - 252u8, - 225u8, - 104u8, - 147u8, - 123u8, - 244u8, - 134u8, - ], - ) - } - pub fn cancel_deferred_slash( - &self, - era: ::core::primitive::u32, - slash_indices: ::std::vec::Vec<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "cancel_deferred_slash", - types::CancelDeferredSlash { - era, - slash_indices, - }, - [ - 49u8, - 208u8, - 248u8, - 109u8, - 25u8, - 132u8, - 73u8, - 172u8, - 232u8, - 194u8, - 114u8, - 23u8, - 114u8, - 4u8, - 64u8, - 156u8, - 70u8, - 41u8, - 207u8, - 208u8, - 78u8, - 199u8, - 81u8, - 125u8, - 101u8, - 31u8, - 17u8, - 140u8, - 190u8, - 254u8, - 64u8, - 101u8, - ], - ) - } - pub fn payout_stakers( - &self, - validator_stash: ::subxt::utils::AccountId32, - era: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "payout_stakers", - types::PayoutStakers { - validator_stash, - era, - }, - [ - 69u8, - 67u8, - 140u8, - 197u8, - 89u8, - 20u8, - 59u8, - 55u8, - 142u8, - 197u8, - 62u8, - 107u8, - 239u8, - 50u8, - 237u8, - 52u8, - 4u8, - 65u8, - 119u8, - 73u8, - 138u8, - 57u8, - 46u8, - 78u8, - 252u8, - 157u8, - 187u8, - 14u8, - 232u8, - 244u8, - 217u8, - 171u8, - ], - ) - } - pub fn rebond( - &self, - value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "rebond", - types::Rebond { value }, - [ - 204u8, - 209u8, - 27u8, - 219u8, - 45u8, - 129u8, - 15u8, - 39u8, - 105u8, - 165u8, - 255u8, - 55u8, - 0u8, - 59u8, - 115u8, - 79u8, - 139u8, - 82u8, - 163u8, - 197u8, - 44u8, - 89u8, - 41u8, - 234u8, - 116u8, - 214u8, - 248u8, - 123u8, - 250u8, - 49u8, - 15u8, - 77u8, - ], - ) - } - pub fn reap_stash( - &self, - stash: ::subxt::utils::AccountId32, - num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "reap_stash", - types::ReapStash { - stash, - num_slashing_spans, - }, - [ - 231u8, - 240u8, - 152u8, - 33u8, - 10u8, - 60u8, - 18u8, - 233u8, - 0u8, - 229u8, - 90u8, - 45u8, - 118u8, - 29u8, - 98u8, - 109u8, - 89u8, - 7u8, - 228u8, - 254u8, - 119u8, - 125u8, - 172u8, - 209u8, - 217u8, - 107u8, - 50u8, - 226u8, - 31u8, - 5u8, - 153u8, - 93u8, - ], - ) - } - pub fn kick( - &self, - who: ::std::vec::Vec< - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "kick", - types::Kick { who }, - [ - 27u8, - 64u8, - 10u8, - 21u8, - 174u8, - 6u8, - 40u8, - 249u8, - 144u8, - 247u8, - 5u8, - 123u8, - 225u8, - 172u8, - 143u8, - 50u8, - 192u8, - 248u8, - 160u8, - 179u8, - 119u8, - 122u8, - 147u8, - 92u8, - 248u8, - 123u8, - 3u8, - 154u8, - 205u8, - 199u8, - 6u8, - 126u8, - ], - ) - } - pub fn set_staking_configs( - &self, - min_nominator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u128, - >, - min_validator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u128, - >, - max_nominator_count: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u32, - >, - max_validator_count: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u32, - >, - chill_threshold: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - runtime_types::sp_arithmetic::per_things::Percent, - >, - min_commission: runtime_types::pallet_staking::pallet::pallet::ConfigOp< - runtime_types::sp_arithmetic::per_things::Perbill, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "set_staking_configs", - types::SetStakingConfigs { - min_nominator_bond, - min_validator_bond, - max_nominator_count, - max_validator_count, - chill_threshold, - min_commission, - }, - [ - 99u8, - 61u8, - 196u8, - 68u8, - 226u8, - 64u8, - 104u8, - 70u8, - 173u8, - 108u8, - 29u8, - 39u8, - 61u8, - 202u8, - 72u8, - 227u8, - 190u8, - 6u8, - 138u8, - 137u8, - 207u8, - 11u8, - 190u8, - 79u8, - 73u8, - 7u8, - 108u8, - 131u8, - 19u8, - 7u8, - 173u8, - 60u8, - ], - ) - } - pub fn chill_other( - &self, - controller: ::subxt::utils::AccountId32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "chill_other", - types::ChillOther { controller }, - [ - 143u8, - 82u8, - 167u8, - 43u8, - 102u8, - 136u8, - 78u8, - 139u8, - 110u8, - 159u8, - 235u8, - 226u8, - 237u8, - 140u8, - 142u8, - 47u8, - 77u8, - 57u8, - 209u8, - 208u8, - 9u8, - 193u8, - 3u8, - 77u8, - 147u8, - 41u8, - 182u8, - 122u8, - 178u8, - 185u8, - 32u8, - 182u8, - ], - ) - } - pub fn force_apply_min_commission( - &self, - validator_stash: ::subxt::utils::AccountId32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "force_apply_min_commission", - types::ForceApplyMinCommission { - validator_stash, - }, - [ - 158u8, - 27u8, - 152u8, - 23u8, - 97u8, - 53u8, - 54u8, - 49u8, - 179u8, - 236u8, - 69u8, - 65u8, - 253u8, - 136u8, - 232u8, - 44u8, - 207u8, - 66u8, - 5u8, - 186u8, - 49u8, - 91u8, - 173u8, - 5u8, - 84u8, - 45u8, - 154u8, - 91u8, - 239u8, - 97u8, - 62u8, - 42u8, - ], - ) - } - pub fn set_min_commission( - &self, - new: runtime_types::sp_arithmetic::per_things::Perbill, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Staking", - "set_min_commission", - types::SetMinCommission { new }, - [ - 96u8, - 168u8, - 55u8, - 79u8, - 79u8, - 49u8, - 8u8, - 127u8, - 98u8, - 158u8, - 106u8, - 187u8, - 177u8, - 201u8, - 68u8, - 181u8, - 219u8, - 172u8, - 63u8, - 120u8, - 172u8, - 173u8, - 251u8, - 167u8, - 84u8, - 165u8, - 238u8, - 115u8, - 110u8, - 97u8, - 144u8, - 50u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_staking::pallet::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct EraPaid { - pub era_index: ::core::primitive::u32, - pub validator_payout: ::core::primitive::u128, - pub remainder: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for EraPaid { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(EraPaid { - era_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `EraPaid::era_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validator_payout: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `EraPaid::validator_payout`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - remainder: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `EraPaid::remainder`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for EraPaid { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.era_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.validator_payout, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.remainder), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.era_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validator_payout, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.remainder, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for EraPaid {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for EraPaid { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = EraPaid; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(EraPaid { - era_index: { - let val = *vals - .get(&Some("era_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "era_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("era_index"))? - }, - validator_payout: { - let val = *vals - .get(&Some("validator_payout")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator_payout".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_payout"))? - }, - remainder: { - let val = *vals - .get(&Some("remainder")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "remainder".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("remainder"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(EraPaid { - era_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("era_index"))? - }, - validator_payout: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_payout"))? - }, - remainder: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("remainder"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for EraPaid { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for EraPaid { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EraPaid { era_index, validator_payout, remainder } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("era_index"), - era_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_payout"), - validator_payout - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("remainder"), - remainder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for EraPaid { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EraPaid { era_index, validator_payout, remainder } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("era_index"), - era_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_payout"), - validator_payout - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("remainder"), - remainder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for EraPaid { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "EraPaid", - "era_index", - &self.era_index, - "validator_payout", - &self.validator_payout, - "remainder", - &&self.remainder, - ) - } - } - impl ::subxt::events::StaticEvent for EraPaid { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "EraPaid"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Rewarded { - pub stash: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Rewarded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Rewarded { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Rewarded::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Rewarded::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Rewarded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Rewarded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Rewarded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Rewarded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Rewarded { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Rewarded { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Rewarded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Rewarded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rewarded { stash, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Rewarded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rewarded { stash, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Rewarded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Rewarded", - "stash", - &self.stash, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Rewarded { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Rewarded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Slashed { - pub staker: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Slashed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Slashed { - staker: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Slashed::staker`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Slashed::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Slashed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.staker), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.staker, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Slashed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Slashed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Slashed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Slashed { - staker: { - let val = *vals - .get(&Some("staker")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "staker".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("staker"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Slashed { - staker: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("staker"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Slashed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Slashed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Slashed { staker, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("staker"), - staker as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Slashed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Slashed { staker, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("staker"), - staker as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Slashed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Slashed", - "staker", - &self.staker, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Slashed { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Slashed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SlashReported { - pub validator: ::subxt::utils::AccountId32, - pub fraction: runtime_types::sp_arithmetic::per_things::Perbill, - pub slash_era: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SlashReported { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(SlashReported { - validator: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SlashReported::validator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fraction: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SlashReported::fraction`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - slash_era: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SlashReported::slash_era`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SlashReported { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.validator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.fraction), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.slash_era), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.validator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.fraction, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.slash_era, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SlashReported {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SlashReported { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SlashReported; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SlashReported { - validator: { - let val = *vals - .get(&Some("validator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("validator"))? - }, - fraction: { - let val = *vals - .get(&Some("fraction")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fraction".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fraction"))? - }, - slash_era: { - let val = *vals - .get(&Some("slash_era")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "slash_era".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("slash_era"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(SlashReported { - validator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("validator"))? - }, - fraction: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fraction"))? - }, - slash_era: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("slash_era"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SlashReported { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SlashReported { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SlashReported { validator, fraction, slash_era } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validator"), - validator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fraction"), - fraction as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slash_era"), - slash_era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SlashReported { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SlashReported { validator, fraction, slash_era } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validator"), - validator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fraction"), - fraction as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slash_era"), - slash_era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SlashReported { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SlashReported", - "validator", - &self.validator, - "fraction", - &self.fraction, - "slash_era", - &&self.slash_era, - ) - } - } - impl ::subxt::events::StaticEvent for SlashReported { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "SlashReported"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OldSlashingReportDiscarded { - pub session_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for OldSlashingReportDiscarded { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.session_index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - OldSlashingReportDiscarded, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(OldSlashingReportDiscarded { - session_index: x, - }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for OldSlashingReportDiscarded { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> OldSlashingReportDiscarded { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for OldSlashingReportDiscarded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(OldSlashingReportDiscarded { - session_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `OldSlashingReportDiscarded::session_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for OldSlashingReportDiscarded { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.session_index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.session_index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.session_index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.session_index, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for OldSlashingReportDiscarded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for OldSlashingReportDiscarded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = OldSlashingReportDiscarded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(OldSlashingReportDiscarded { - session_index: { - let val = *vals - .get(&Some("session_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "session_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("session_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(OldSlashingReportDiscarded { - session_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("session_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for OldSlashingReportDiscarded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for OldSlashingReportDiscarded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OldSlashingReportDiscarded { session_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("session_index"), - session_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for OldSlashingReportDiscarded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OldSlashingReportDiscarded { session_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("session_index"), - session_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for OldSlashingReportDiscarded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "OldSlashingReportDiscarded", - "session_index", - &&self.session_index, - ) - } - } - impl ::subxt::events::StaticEvent for OldSlashingReportDiscarded { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "OldSlashingReportDiscarded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct StakersElected; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for StakersElected { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(StakersElected) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for StakersElected { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for StakersElected {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for StakersElected { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = StakersElected; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(StakersElected) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for StakersElected { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for StakersElected { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let StakersElected = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for StakersElected { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let StakersElected = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for StakersElected { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "StakersElected") - } - } - impl ::subxt::events::StaticEvent for StakersElected { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "StakersElected"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Bonded { - pub stash: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Bonded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Bonded { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bonded::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bonded::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Bonded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Bonded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Bonded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Bonded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Bonded { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Bonded { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Bonded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Bonded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Bonded { stash, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Bonded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Bonded { stash, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Bonded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Bonded", - "stash", - &self.stash, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Bonded { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Bonded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Unbonded { - pub stash: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Unbonded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Unbonded { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unbonded::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unbonded::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Unbonded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Unbonded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Unbonded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Unbonded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Unbonded { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Unbonded { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Unbonded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Unbonded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unbonded { stash, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Unbonded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unbonded { stash, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Unbonded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Unbonded", - "stash", - &self.stash, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Unbonded { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Unbonded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Withdrawn { - pub stash: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Withdrawn { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Withdrawn { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Withdrawn::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Withdrawn::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Withdrawn { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Withdrawn {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Withdrawn { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Withdrawn; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Withdrawn { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Withdrawn { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Withdrawn { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Withdrawn { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Withdrawn { stash, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Withdrawn { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Withdrawn { stash, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Withdrawn { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Withdrawn", - "stash", - &self.stash, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Withdrawn { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Withdrawn"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Kicked { - pub nominator: ::subxt::utils::AccountId32, - pub stash: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Kicked { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Kicked { - nominator: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Kicked::nominator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Kicked::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Kicked { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.nominator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.stash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.nominator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.stash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Kicked {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Kicked { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Kicked; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Kicked { - nominator: { - let val = *vals - .get(&Some("nominator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nominator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Kicked { - nominator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Kicked { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Kicked { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Kicked { nominator, stash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("nominator"), - nominator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Kicked { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Kicked { nominator, stash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("nominator"), - nominator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Kicked { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Kicked", - "nominator", - &self.nominator, - "stash", - &&self.stash, - ) - } - } - impl ::subxt::events::StaticEvent for Kicked { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Kicked"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct StakingElectionFailed; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for StakingElectionFailed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(StakingElectionFailed) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for StakingElectionFailed { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for StakingElectionFailed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for StakingElectionFailed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = StakingElectionFailed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(StakingElectionFailed) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for StakingElectionFailed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for StakingElectionFailed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let StakingElectionFailed = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for StakingElectionFailed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let StakingElectionFailed = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for StakingElectionFailed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "StakingElectionFailed") - } - } - impl ::subxt::events::StaticEvent for StakingElectionFailed { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "StakingElectionFailed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Chilled { - pub stash: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Chilled { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Chilled { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Chilled::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Chilled { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.stash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.stash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.stash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.stash, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Chilled {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Chilled { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Chilled; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Chilled { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Chilled { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Chilled { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Chilled { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Chilled { stash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Chilled { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Chilled { stash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Chilled { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Chilled", - "stash", - &&self.stash, - ) - } - } - impl ::subxt::events::StaticEvent for Chilled { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Chilled"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PayoutStarted { - pub era_index: ::core::primitive::u32, - pub validator_stash: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PayoutStarted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(PayoutStarted { - era_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PayoutStarted::era_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validator_stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PayoutStarted::validator_stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PayoutStarted { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.era_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.validator_stash, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.era_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validator_stash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PayoutStarted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PayoutStarted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PayoutStarted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PayoutStarted { - era_index: { - let val = *vals - .get(&Some("era_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "era_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("era_index"))? - }, - validator_stash: { - let val = *vals - .get(&Some("validator_stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator_stash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_stash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(PayoutStarted { - era_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("era_index"))? - }, - validator_stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_stash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for PayoutStarted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PayoutStarted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PayoutStarted { era_index, validator_stash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("era_index"), - era_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_stash"), - validator_stash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PayoutStarted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PayoutStarted { era_index, validator_stash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("era_index"), - era_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_stash"), - validator_stash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PayoutStarted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PayoutStarted", - "era_index", - &self.era_index, - "validator_stash", - &&self.validator_stash, - ) - } - } - impl ::subxt::events::StaticEvent for PayoutStarted { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "PayoutStarted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ValidatorPrefsSet { - pub stash: ::subxt::utils::AccountId32, - pub prefs: runtime_types::pallet_staking::ValidatorPrefs, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ValidatorPrefsSet { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ValidatorPrefsSet { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ValidatorPrefsSet::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - prefs: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ValidatorPrefsSet::prefs`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ValidatorPrefsSet { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.prefs), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.prefs, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ValidatorPrefsSet {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ValidatorPrefsSet { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ValidatorPrefsSet; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ValidatorPrefsSet { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - prefs: { - let val = *vals - .get(&Some("prefs")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prefs".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prefs"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ValidatorPrefsSet { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - prefs: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prefs"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ValidatorPrefsSet { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ValidatorPrefsSet { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ValidatorPrefsSet { stash, prefs } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prefs"), - prefs as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ValidatorPrefsSet { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ValidatorPrefsSet { stash, prefs } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prefs"), - prefs as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ValidatorPrefsSet { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ValidatorPrefsSet", - "stash", - &self.stash, - "prefs", - &&self.prefs, - ) - } - } - impl ::subxt::events::StaticEvent for ValidatorPrefsSet { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "ValidatorPrefsSet"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceEra { - pub mode: runtime_types::pallet_staking::Forcing, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceEra { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ForceEra { - mode: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceEra::mode`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceEra { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.mode) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.mode, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.mode) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.mode, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceEra {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ForceEra { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceEra; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceEra { - mode: { - let val = *vals - .get(&Some("mode")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "mode".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("mode"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ForceEra { - mode: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("mode"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ForceEra { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceEra { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceEra { mode } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("mode"), - mode as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ForceEra { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceEra { mode } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("mode"), - mode as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceEra { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ForceEra", - "mode", - &&self.mode, - ) - } - } - 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 { - pub fn validator_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( - "Staking", - "ValidatorCount", - ::alloc::vec::Vec::new(), - [ - 105u8, - 251u8, - 193u8, - 198u8, - 232u8, - 118u8, - 73u8, - 115u8, - 205u8, - 78u8, - 49u8, - 253u8, - 140u8, - 193u8, - 161u8, - 205u8, - 13u8, - 147u8, - 125u8, - 102u8, - 142u8, - 244u8, - 210u8, - 227u8, - 225u8, - 46u8, - 144u8, - 122u8, - 254u8, - 48u8, - 44u8, - 169u8, - ], - ) - } - pub fn minimum_validator_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( - "Staking", - "MinimumValidatorCount", - ::alloc::vec::Vec::new(), - [ - 103u8, - 178u8, - 29u8, - 91u8, - 90u8, - 31u8, - 49u8, - 9u8, - 11u8, - 58u8, - 178u8, - 30u8, - 219u8, - 55u8, - 58u8, - 181u8, - 80u8, - 155u8, - 9u8, - 11u8, - 38u8, - 46u8, - 125u8, - 179u8, - 220u8, - 20u8, - 212u8, - 181u8, - 136u8, - 103u8, - 58u8, - 48u8, - ], - ) - } - pub fn invulnerables( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::subxt::utils::AccountId32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "Invulnerables", - ::alloc::vec::Vec::new(), - [ - 199u8, - 35u8, - 0u8, - 229u8, - 160u8, - 128u8, - 139u8, - 245u8, - 27u8, - 133u8, - 47u8, - 240u8, - 86u8, - 195u8, - 90u8, - 169u8, - 158u8, - 231u8, - 128u8, - 58u8, - 24u8, - 173u8, - 138u8, - 122u8, - 226u8, - 104u8, - 239u8, - 114u8, - 91u8, - 165u8, - 207u8, - 150u8, - ], - ) - } - pub fn bonded_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::AccountId32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "Bonded", - ::alloc::vec::Vec::new(), - [ - 99u8, - 128u8, - 108u8, - 100u8, - 235u8, - 102u8, - 243u8, - 95u8, - 61u8, - 206u8, - 220u8, - 49u8, - 155u8, - 85u8, - 236u8, - 110u8, - 99u8, - 21u8, - 117u8, - 127u8, - 157u8, - 226u8, - 108u8, - 80u8, - 126u8, - 93u8, - 203u8, - 0u8, - 160u8, - 253u8, - 56u8, - 101u8, - ], - ) - } - pub fn bonded( - &self, - _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::Address::new_static( - "Staking", - "Bonded", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 99u8, - 128u8, - 108u8, - 100u8, - 235u8, - 102u8, - 243u8, - 95u8, - 61u8, - 206u8, - 220u8, - 49u8, - 155u8, - 85u8, - 236u8, - 110u8, - 99u8, - 21u8, - 117u8, - 127u8, - 157u8, - 226u8, - 108u8, - 80u8, - 126u8, - 93u8, - 203u8, - 0u8, - 160u8, - 253u8, - 56u8, - 101u8, - ], - ) - } - pub fn min_nominator_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", - "MinNominatorBond", - ::alloc::vec::Vec::new(), - [ - 102u8, - 115u8, - 254u8, - 15u8, - 191u8, - 228u8, - 85u8, - 249u8, - 112u8, - 190u8, - 129u8, - 243u8, - 236u8, - 39u8, - 195u8, - 232u8, - 10u8, - 230u8, - 11u8, - 144u8, - 115u8, - 1u8, - 45u8, - 70u8, - 181u8, - 161u8, - 17u8, - 92u8, - 19u8, - 70u8, - 100u8, - 94u8, - ], - ) - } - pub fn min_validator_bond( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "MinValidatorBond", - ::alloc::vec::Vec::new(), - [ - 146u8, - 249u8, - 26u8, - 52u8, - 224u8, - 81u8, - 85u8, - 153u8, - 118u8, - 169u8, - 140u8, - 37u8, - 208u8, - 242u8, - 8u8, - 29u8, - 156u8, - 73u8, - 154u8, - 162u8, - 186u8, - 159u8, - 119u8, - 100u8, - 109u8, - 227u8, - 6u8, - 139u8, - 155u8, - 203u8, - 167u8, - 244u8, - ], - ) - } - pub fn minimum_active_stake( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "MinimumActiveStake", - ::alloc::vec::Vec::new(), - [ - 166u8, - 211u8, - 59u8, - 23u8, - 2u8, - 160u8, - 244u8, - 52u8, - 153u8, - 12u8, - 103u8, - 113u8, - 51u8, - 232u8, - 145u8, - 188u8, - 54u8, - 67u8, - 227u8, - 221u8, - 186u8, - 6u8, - 28u8, - 63u8, - 146u8, - 212u8, - 233u8, - 173u8, - 134u8, - 41u8, - 169u8, - 153u8, - ], - ) - } - pub fn min_commission( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "MinCommission", - ::alloc::vec::Vec::new(), - [ - 220u8, - 197u8, - 232u8, - 212u8, - 205u8, - 242u8, - 121u8, - 165u8, - 255u8, - 199u8, - 122u8, - 20u8, - 145u8, - 245u8, - 175u8, - 26u8, - 45u8, - 70u8, - 207u8, - 26u8, - 112u8, - 234u8, - 181u8, - 167u8, - 140u8, - 75u8, - 15u8, - 1u8, - 221u8, - 168u8, - 17u8, - 211u8, - ], - ) - } - pub fn ledger_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_staking::StakingLedger, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "Ledger", - ::alloc::vec::Vec::new(), - [ - 210u8, - 236u8, - 6u8, - 49u8, - 200u8, - 118u8, - 116u8, - 25u8, - 66u8, - 60u8, - 18u8, - 75u8, - 240u8, - 156u8, - 58u8, - 48u8, - 176u8, - 10u8, - 175u8, - 0u8, - 86u8, - 7u8, - 16u8, - 134u8, - 64u8, - 41u8, - 46u8, - 128u8, - 33u8, - 40u8, - 10u8, - 129u8, - ], - ) - } - pub fn ledger( - &self, - _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::Address::new_static( - "Staking", - "Ledger", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 210u8, - 236u8, - 6u8, - 49u8, - 200u8, - 118u8, - 116u8, - 25u8, - 66u8, - 60u8, - 18u8, - 75u8, - 240u8, - 156u8, - 58u8, - 48u8, - 176u8, - 10u8, - 175u8, - 0u8, - 86u8, - 7u8, - 16u8, - 134u8, - 64u8, - 41u8, - 46u8, - 128u8, - 33u8, - 40u8, - 10u8, - 129u8, - ], - ) - } - pub fn payee_iter( - &self, - ) -> ::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", - "Payee", - ::alloc::vec::Vec::new(), - [ - 141u8, - 225u8, - 44u8, - 134u8, - 50u8, - 229u8, - 64u8, - 186u8, - 166u8, - 88u8, - 213u8, - 118u8, - 32u8, - 154u8, - 151u8, - 204u8, - 104u8, - 216u8, - 198u8, - 66u8, - 123u8, - 143u8, - 206u8, - 245u8, - 53u8, - 67u8, - 78u8, - 82u8, - 115u8, - 31u8, - 39u8, - 76u8, - ], - ) - } - pub fn payee( - &self, - _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::Address::new_static( - "Staking", - "Payee", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 141u8, - 225u8, - 44u8, - 134u8, - 50u8, - 229u8, - 64u8, - 186u8, - 166u8, - 88u8, - 213u8, - 118u8, - 32u8, - 154u8, - 151u8, - 204u8, - 104u8, - 216u8, - 198u8, - 66u8, - 123u8, - 143u8, - 206u8, - 245u8, - 53u8, - 67u8, - 78u8, - 82u8, - 115u8, - 31u8, - 39u8, - 76u8, - ], - ) - } - pub fn validators_iter( - &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", - "Validators", - ::alloc::vec::Vec::new(), - [ - 149u8, - 207u8, - 68u8, - 38u8, - 24u8, - 220u8, - 207u8, - 84u8, - 236u8, - 33u8, - 210u8, - 124u8, - 200u8, - 99u8, - 98u8, - 29u8, - 235u8, - 46u8, - 124u8, - 4u8, - 203u8, - 6u8, - 209u8, - 21u8, - 124u8, - 236u8, - 112u8, - 118u8, - 180u8, - 85u8, - 78u8, - 13u8, - ], - ) - } - 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::Address::new_static( - "Staking", - "Validators", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 149u8, - 207u8, - 68u8, - 38u8, - 24u8, - 220u8, - 207u8, - 84u8, - 236u8, - 33u8, - 210u8, - 124u8, - 200u8, - 99u8, - 98u8, - 29u8, - 235u8, - 46u8, - 124u8, - 4u8, - 203u8, - 6u8, - 209u8, - 21u8, - 124u8, - 236u8, - 112u8, - 118u8, - 180u8, - 85u8, - 78u8, - 13u8, - ], - ) - } - pub fn counter_for_validators( - &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", - "CounterForValidators", - ::alloc::vec::Vec::new(), - [ - 169u8, - 146u8, - 194u8, - 114u8, - 57u8, - 232u8, - 137u8, - 93u8, - 214u8, - 98u8, - 176u8, - 151u8, - 237u8, - 165u8, - 176u8, - 252u8, - 73u8, - 124u8, - 22u8, - 166u8, - 225u8, - 217u8, - 65u8, - 56u8, - 174u8, - 12u8, - 32u8, - 2u8, - 7u8, - 173u8, - 125u8, - 235u8, - ], - ) - } - pub fn max_validators_count( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "MaxValidatorsCount", - ::alloc::vec::Vec::new(), - [ - 139u8, - 116u8, - 236u8, - 217u8, - 110u8, - 47u8, - 140u8, - 197u8, - 184u8, - 246u8, - 180u8, - 188u8, - 233u8, - 99u8, - 102u8, - 21u8, - 114u8, - 23u8, - 143u8, - 163u8, - 224u8, - 250u8, - 248u8, - 185u8, - 235u8, - 94u8, - 110u8, - 83u8, - 170u8, - 123u8, - 113u8, - 168u8, - ], - ) - } - pub fn nominators_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_staking::Nominations, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "Nominators", - ::alloc::vec::Vec::new(), - [ - 244u8, - 174u8, - 214u8, - 105u8, - 215u8, - 218u8, - 241u8, - 145u8, - 155u8, - 54u8, - 219u8, - 34u8, - 158u8, - 224u8, - 251u8, - 17u8, - 245u8, - 9u8, - 150u8, - 36u8, - 2u8, - 233u8, - 222u8, - 218u8, - 136u8, - 86u8, - 37u8, - 244u8, - 18u8, - 50u8, - 91u8, - 120u8, - ], - ) - } - pub fn nominators( - &self, - _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::Address::new_static( - "Staking", - "Nominators", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 244u8, - 174u8, - 214u8, - 105u8, - 215u8, - 218u8, - 241u8, - 145u8, - 155u8, - 54u8, - 219u8, - 34u8, - 158u8, - 224u8, - 251u8, - 17u8, - 245u8, - 9u8, - 150u8, - 36u8, - 2u8, - 233u8, - 222u8, - 218u8, - 136u8, - 86u8, - 37u8, - 244u8, - 18u8, - 50u8, - 91u8, - 120u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 150u8, - 236u8, - 184u8, - 12u8, - 224u8, - 26u8, - 13u8, - 204u8, - 208u8, - 178u8, - 68u8, - 148u8, - 232u8, - 85u8, - 74u8, - 248u8, - 167u8, - 61u8, - 88u8, - 126u8, - 40u8, - 20u8, - 73u8, - 47u8, - 94u8, - 57u8, - 144u8, - 77u8, - 156u8, - 179u8, - 55u8, - 49u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 11u8, - 234u8, - 179u8, - 254u8, - 95u8, - 119u8, - 35u8, - 255u8, - 141u8, - 95u8, - 148u8, - 209u8, - 43u8, - 202u8, - 19u8, - 57u8, - 185u8, - 50u8, - 152u8, - 192u8, - 95u8, - 13u8, - 158u8, - 245u8, - 113u8, - 199u8, - 255u8, - 187u8, - 37u8, - 44u8, - 8u8, - 119u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 247u8, - 239u8, - 171u8, - 18u8, - 137u8, - 240u8, - 213u8, - 3u8, - 173u8, - 173u8, - 236u8, - 141u8, - 202u8, - 191u8, - 228u8, - 120u8, - 196u8, - 188u8, - 13u8, - 66u8, - 253u8, - 117u8, - 90u8, - 8u8, - 158u8, - 11u8, - 236u8, - 141u8, - 178u8, - 44u8, - 119u8, - 25u8, - ], - ) - } - pub fn active_era( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_staking::ActiveEraInfo, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "ActiveEra", - ::alloc::vec::Vec::new(), - [ - 24u8, - 229u8, - 66u8, - 56u8, - 111u8, - 234u8, - 139u8, - 93u8, - 245u8, - 137u8, - 110u8, - 110u8, - 121u8, - 15u8, - 216u8, - 207u8, - 97u8, - 120u8, - 125u8, - 45u8, - 61u8, - 2u8, - 50u8, - 100u8, - 3u8, - 106u8, - 12u8, - 233u8, - 123u8, - 156u8, - 145u8, - 38u8, - ], - ) - } - pub fn eras_start_session_index_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "ErasStartSessionIndex", - ::alloc::vec::Vec::new(), - [ - 104u8, - 76u8, - 102u8, - 20u8, - 9u8, - 146u8, - 55u8, - 204u8, - 12u8, - 15u8, - 117u8, - 22u8, - 54u8, - 230u8, - 98u8, - 105u8, - 191u8, - 136u8, - 140u8, - 65u8, - 48u8, - 29u8, - 19u8, - 144u8, - 159u8, - 241u8, - 158u8, - 77u8, - 4u8, - 230u8, - 216u8, - 52u8, - ], - ) - } - 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::Address::new_static( - "Staking", - "ErasStartSessionIndex", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 104u8, - 76u8, - 102u8, - 20u8, - 9u8, - 146u8, - 55u8, - 204u8, - 12u8, - 15u8, - 117u8, - 22u8, - 54u8, - 230u8, - 98u8, - 105u8, - 191u8, - 136u8, - 140u8, - 65u8, - 48u8, - 29u8, - 19u8, - 144u8, - 159u8, - 241u8, - 158u8, - 77u8, - 4u8, - 230u8, - 216u8, - 52u8, - ], - ) - } - pub fn eras_stakers_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "ErasStakers", - ::alloc::vec::Vec::new(), - [ - 120u8, - 64u8, - 232u8, - 134u8, - 109u8, - 212u8, - 242u8, - 64u8, - 68u8, - 196u8, - 108u8, - 91u8, - 255u8, - 123u8, - 245u8, - 27u8, - 55u8, - 254u8, - 60u8, - 74u8, - 183u8, - 183u8, - 226u8, - 159u8, - 244u8, - 56u8, - 139u8, - 34u8, - 228u8, - 176u8, - 241u8, - 76u8, - ], - ) - } - pub fn eras_stakers_iter1( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "ErasStakers", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 120u8, - 64u8, - 232u8, - 134u8, - 109u8, - 212u8, - 242u8, - 64u8, - 68u8, - 196u8, - 108u8, - 91u8, - 255u8, - 123u8, - 245u8, - 27u8, - 55u8, - 254u8, - 60u8, - 74u8, - 183u8, - 183u8, - 226u8, - 159u8, - 244u8, - 56u8, - 139u8, - 34u8, - 228u8, - 176u8, - 241u8, - 76u8, - ], - ) - } - 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::Address::new_static( - "Staking", - "ErasStakers", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 120u8, - 64u8, - 232u8, - 134u8, - 109u8, - 212u8, - 242u8, - 64u8, - 68u8, - 196u8, - 108u8, - 91u8, - 255u8, - 123u8, - 245u8, - 27u8, - 55u8, - 254u8, - 60u8, - 74u8, - 183u8, - 183u8, - 226u8, - 159u8, - 244u8, - 56u8, - 139u8, - 34u8, - 228u8, - 176u8, - 241u8, - 76u8, - ], - ) - } - pub fn eras_stakers_clipped_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "ErasStakersClipped", - ::alloc::vec::Vec::new(), - [ - 85u8, - 192u8, - 164u8, - 53u8, - 181u8, - 61u8, - 132u8, - 255u8, - 144u8, - 41u8, - 44u8, - 199u8, - 34u8, - 11u8, - 248u8, - 81u8, - 203u8, - 204u8, - 152u8, - 138u8, - 112u8, - 229u8, - 145u8, - 253u8, - 111u8, - 111u8, - 38u8, - 74u8, - 199u8, - 164u8, - 16u8, - 45u8, - ], - ) - } - pub fn eras_stakers_clipped_iter1( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "ErasStakersClipped", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 85u8, - 192u8, - 164u8, - 53u8, - 181u8, - 61u8, - 132u8, - 255u8, - 144u8, - 41u8, - 44u8, - 199u8, - 34u8, - 11u8, - 248u8, - 81u8, - 203u8, - 204u8, - 152u8, - 138u8, - 112u8, - 229u8, - 145u8, - 253u8, - 111u8, - 111u8, - 38u8, - 74u8, - 199u8, - 164u8, - 16u8, - 45u8, - ], - ) - } - pub fn eras_stakers_clipped( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "ErasStakersClipped", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 85u8, - 192u8, - 164u8, - 53u8, - 181u8, - 61u8, - 132u8, - 255u8, - 144u8, - 41u8, - 44u8, - 199u8, - 34u8, - 11u8, - 248u8, - 81u8, - 203u8, - 204u8, - 152u8, - 138u8, - 112u8, - 229u8, - 145u8, - 253u8, - 111u8, - 111u8, - 38u8, - 74u8, - 199u8, - 164u8, - 16u8, - 45u8, - ], - ) - } - pub fn eras_validator_prefs_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 134u8, - 250u8, - 229u8, - 21u8, - 44u8, - 119u8, - 43u8, - 99u8, - 69u8, - 94u8, - 177u8, - 180u8, - 174u8, - 134u8, - 54u8, - 25u8, - 56u8, - 144u8, - 194u8, - 149u8, - 56u8, - 234u8, - 78u8, - 238u8, - 78u8, - 247u8, - 205u8, - 43u8, - 16u8, - 159u8, - 92u8, - 169u8, - ], - ) - } - pub fn eras_validator_prefs_iter1( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_staking::ValidatorPrefs, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "ErasValidatorPrefs", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 134u8, - 250u8, - 229u8, - 21u8, - 44u8, - 119u8, - 43u8, - 99u8, - 69u8, - 94u8, - 177u8, - 180u8, - 174u8, - 134u8, - 54u8, - 25u8, - 56u8, - 144u8, - 194u8, - 149u8, - 56u8, - 234u8, - 78u8, - 238u8, - 78u8, - 247u8, - 205u8, - 43u8, - 16u8, - 159u8, - 92u8, - 169u8, - ], - ) - } - 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::Address::new_static( - "Staking", - "ErasValidatorPrefs", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 134u8, - 250u8, - 229u8, - 21u8, - 44u8, - 119u8, - 43u8, - 99u8, - 69u8, - 94u8, - 177u8, - 180u8, - 174u8, - 134u8, - 54u8, - 25u8, - 56u8, - 144u8, - 194u8, - 149u8, - 56u8, - 234u8, - 78u8, - 238u8, - 78u8, - 247u8, - 205u8, - 43u8, - 16u8, - 159u8, - 92u8, - 169u8, - ], - ) - } - pub fn eras_validator_reward_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "ErasValidatorReward", - ::alloc::vec::Vec::new(), - [ - 185u8, - 85u8, - 179u8, - 163u8, - 178u8, - 168u8, - 141u8, - 200u8, - 59u8, - 77u8, - 2u8, - 197u8, - 36u8, - 188u8, - 133u8, - 117u8, - 2u8, - 25u8, - 105u8, - 132u8, - 44u8, - 75u8, - 15u8, - 82u8, - 57u8, - 89u8, - 242u8, - 234u8, - 70u8, - 244u8, - 198u8, - 126u8, - ], - ) - } - 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::Address::new_static( - "Staking", - "ErasValidatorReward", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 185u8, - 85u8, - 179u8, - 163u8, - 178u8, - 168u8, - 141u8, - 200u8, - 59u8, - 77u8, - 2u8, - 197u8, - 36u8, - 188u8, - 133u8, - 117u8, - 2u8, - 25u8, - 105u8, - 132u8, - 44u8, - 75u8, - 15u8, - 82u8, - 57u8, - 89u8, - 242u8, - 234u8, - 70u8, - 244u8, - 198u8, - 126u8, - ], - ) - } - pub fn eras_reward_points_iter( - &self, - ) -> ::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", - "ErasRewardPoints", - ::alloc::vec::Vec::new(), - [ - 135u8, - 0u8, - 85u8, - 241u8, - 213u8, - 133u8, - 30u8, - 192u8, - 251u8, - 191u8, - 41u8, - 38u8, - 233u8, - 236u8, - 218u8, - 246u8, - 166u8, - 93u8, - 46u8, - 37u8, - 48u8, - 187u8, - 172u8, - 48u8, - 251u8, - 178u8, - 75u8, - 203u8, - 60u8, - 188u8, - 204u8, - 207u8, - ], - ) - } - pub fn eras_reward_points( - &self, - _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::Address::new_static( - "Staking", - "ErasRewardPoints", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 135u8, - 0u8, - 85u8, - 241u8, - 213u8, - 133u8, - 30u8, - 192u8, - 251u8, - 191u8, - 41u8, - 38u8, - 233u8, - 236u8, - 218u8, - 246u8, - 166u8, - 93u8, - 46u8, - 37u8, - 48u8, - 187u8, - 172u8, - 48u8, - 251u8, - 178u8, - 75u8, - 203u8, - 60u8, - 188u8, - 204u8, - 207u8, - ], - ) - } - pub fn eras_total_stake_iter( - &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", - "ErasTotalStake", - ::alloc::vec::Vec::new(), - [ - 8u8, - 78u8, - 101u8, - 62u8, - 124u8, - 126u8, - 66u8, - 26u8, - 47u8, - 126u8, - 239u8, - 204u8, - 222u8, - 104u8, - 19u8, - 108u8, - 238u8, - 160u8, - 112u8, - 242u8, - 56u8, - 2u8, - 250u8, - 164u8, - 250u8, - 213u8, - 201u8, - 84u8, - 193u8, - 117u8, - 108u8, - 146u8, - ], - ) - } - pub fn eras_total_stake( - &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", - "ErasTotalStake", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 8u8, - 78u8, - 101u8, - 62u8, - 124u8, - 126u8, - 66u8, - 26u8, - 47u8, - 126u8, - 239u8, - 204u8, - 222u8, - 104u8, - 19u8, - 108u8, - 238u8, - 160u8, - 112u8, - 242u8, - 56u8, - 2u8, - 250u8, - 164u8, - 250u8, - 213u8, - 201u8, - 84u8, - 193u8, - 117u8, - 108u8, - 146u8, - ], - ) - } - pub fn force_era( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_staking::Forcing, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "ForceEra", - ::alloc::vec::Vec::new(), - [ - 177u8, - 148u8, - 73u8, - 108u8, - 136u8, - 126u8, - 89u8, - 18u8, - 124u8, - 66u8, - 30u8, - 102u8, - 133u8, - 164u8, - 78u8, - 214u8, - 184u8, - 163u8, - 75u8, - 164u8, - 117u8, - 233u8, - 209u8, - 158u8, - 99u8, - 208u8, - 21u8, - 194u8, - 152u8, - 82u8, - 16u8, - 222u8, - ], - ) - } - pub fn slash_reward_fraction( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "SlashRewardFraction", - ::alloc::vec::Vec::new(), - [ - 53u8, - 88u8, - 253u8, - 237u8, - 84u8, - 228u8, - 187u8, - 130u8, - 108u8, - 195u8, - 135u8, - 25u8, - 75u8, - 52u8, - 238u8, - 62u8, - 133u8, - 38u8, - 139u8, - 129u8, - 216u8, - 193u8, - 197u8, - 216u8, - 245u8, - 171u8, - 128u8, - 207u8, - 125u8, - 246u8, - 248u8, - 7u8, - ], - ) - } - pub fn canceled_slash_payout( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "CanceledSlashPayout", - ::alloc::vec::Vec::new(), - [ - 221u8, - 88u8, - 134u8, - 81u8, - 22u8, - 229u8, - 100u8, - 27u8, - 86u8, - 244u8, - 229u8, - 107u8, - 251u8, - 119u8, - 58u8, - 153u8, - 19u8, - 20u8, - 254u8, - 169u8, - 248u8, - 220u8, - 98u8, - 118u8, - 48u8, - 213u8, - 22u8, - 79u8, - 242u8, - 250u8, - 147u8, - 173u8, - ], - ) - } - pub fn unapplied_slashes_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::pallet_staking::UnappliedSlash< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "UnappliedSlashes", - ::alloc::vec::Vec::new(), - [ - 158u8, - 134u8, - 7u8, - 21u8, - 200u8, - 222u8, - 197u8, - 166u8, - 199u8, - 39u8, - 1u8, - 167u8, - 164u8, - 154u8, - 165u8, - 118u8, - 92u8, - 223u8, - 219u8, - 136u8, - 196u8, - 155u8, - 243u8, - 20u8, - 198u8, - 92u8, - 198u8, - 61u8, - 252u8, - 176u8, - 175u8, - 172u8, - ], - ) - } - pub fn unapplied_slashes( - &self, - _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::Address::new_static( - "Staking", - "UnappliedSlashes", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 158u8, - 134u8, - 7u8, - 21u8, - 200u8, - 222u8, - 197u8, - 166u8, - 199u8, - 39u8, - 1u8, - 167u8, - 164u8, - 154u8, - 165u8, - 118u8, - 92u8, - 223u8, - 219u8, - 136u8, - 196u8, - 155u8, - 243u8, - 20u8, - 198u8, - 92u8, - 198u8, - 61u8, - 252u8, - 176u8, - 175u8, - 172u8, - ], - ) - } - pub fn bonded_eras( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - (::core::primitive::u32, ::core::primitive::u32), - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "BondedEras", - ::alloc::vec::Vec::new(), - [ - 20u8, - 0u8, - 164u8, - 169u8, - 183u8, - 130u8, - 242u8, - 167u8, - 92u8, - 254u8, - 191u8, - 206u8, - 177u8, - 182u8, - 219u8, - 162u8, - 7u8, - 116u8, - 223u8, - 166u8, - 239u8, - 216u8, - 140u8, - 42u8, - 174u8, - 237u8, - 134u8, - 186u8, - 180u8, - 62u8, - 175u8, - 239u8, - ], - ) - } - pub fn validator_slash_in_era_iter( - &self, - ) -> ::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::Address::new_static( - "Staking", - "ValidatorSlashInEra", - ::alloc::vec::Vec::new(), - [ - 245u8, - 72u8, - 52u8, - 22u8, - 10u8, - 177u8, - 127u8, - 83u8, - 180u8, - 246u8, - 17u8, - 82u8, - 6u8, - 231u8, - 131u8, - 68u8, - 73u8, - 92u8, - 241u8, - 251u8, - 32u8, - 97u8, - 121u8, - 137u8, - 190u8, - 227u8, - 162u8, - 16u8, - 224u8, - 207u8, - 63u8, - 184u8, - ], - ) - } - pub fn validator_slash_in_era_iter1( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::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::Address::new_static( - "Staking", - "ValidatorSlashInEra", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 245u8, - 72u8, - 52u8, - 22u8, - 10u8, - 177u8, - 127u8, - 83u8, - 180u8, - 246u8, - 17u8, - 82u8, - 6u8, - 231u8, - 131u8, - 68u8, - 73u8, - 92u8, - 241u8, - 251u8, - 32u8, - 97u8, - 121u8, - 137u8, - 190u8, - 227u8, - 162u8, - 16u8, - 224u8, - 207u8, - 63u8, - 184u8, - ], - ) - } - 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::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - runtime_types::sp_arithmetic::per_things::Perbill, - ::core::primitive::u128, - ), - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "ValidatorSlashInEra", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 245u8, - 72u8, - 52u8, - 22u8, - 10u8, - 177u8, - 127u8, - 83u8, - 180u8, - 246u8, - 17u8, - 82u8, - 6u8, - 231u8, - 131u8, - 68u8, - 73u8, - 92u8, - 241u8, - 251u8, - 32u8, - 97u8, - 121u8, - 137u8, - 190u8, - 227u8, - 162u8, - 16u8, - 224u8, - 207u8, - 63u8, - 184u8, - ], - ) - } - pub fn nominator_slash_in_era_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "NominatorSlashInEra", - ::alloc::vec::Vec::new(), - [ - 8u8, - 89u8, - 171u8, - 183u8, - 64u8, - 29u8, - 44u8, - 185u8, - 11u8, - 204u8, - 67u8, - 60u8, - 208u8, - 132u8, - 9u8, - 214u8, - 13u8, - 148u8, - 205u8, - 26u8, - 5u8, - 7u8, - 250u8, - 191u8, - 83u8, - 118u8, - 95u8, - 17u8, - 40u8, - 126u8, - 16u8, - 135u8, - ], - ) - } - pub fn nominator_slash_in_era_iter1( - &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::Address::new_static( - "Staking", - "NominatorSlashInEra", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 8u8, - 89u8, - 171u8, - 183u8, - 64u8, - 29u8, - 44u8, - 185u8, - 11u8, - 204u8, - 67u8, - 60u8, - 208u8, - 132u8, - 9u8, - 214u8, - 13u8, - 148u8, - 205u8, - 26u8, - 5u8, - 7u8, - 250u8, - 191u8, - 83u8, - 118u8, - 95u8, - 17u8, - 40u8, - 126u8, - 16u8, - 135u8, - ], - ) - } - 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::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "NominatorSlashInEra", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 8u8, - 89u8, - 171u8, - 183u8, - 64u8, - 29u8, - 44u8, - 185u8, - 11u8, - 204u8, - 67u8, - 60u8, - 208u8, - 132u8, - 9u8, - 214u8, - 13u8, - 148u8, - 205u8, - 26u8, - 5u8, - 7u8, - 250u8, - 191u8, - 83u8, - 118u8, - 95u8, - 17u8, - 40u8, - 126u8, - 16u8, - 135u8, - ], - ) - } - pub fn slashing_spans_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_staking::slashing::SlashingSpans, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "SlashingSpans", - ::alloc::vec::Vec::new(), - [ - 74u8, - 169u8, - 189u8, - 252u8, - 193u8, - 191u8, - 114u8, - 107u8, - 158u8, - 125u8, - 252u8, - 35u8, - 177u8, - 129u8, - 99u8, - 24u8, - 77u8, - 223u8, - 238u8, - 24u8, - 237u8, - 225u8, - 5u8, - 117u8, - 163u8, - 180u8, - 139u8, - 22u8, - 169u8, - 185u8, - 60u8, - 217u8, - ], - ) - } - pub fn slashing_spans( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_staking::slashing::SlashingSpans, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "SlashingSpans", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 74u8, - 169u8, - 189u8, - 252u8, - 193u8, - 191u8, - 114u8, - 107u8, - 158u8, - 125u8, - 252u8, - 35u8, - 177u8, - 129u8, - 99u8, - 24u8, - 77u8, - 223u8, - 238u8, - 24u8, - 237u8, - 225u8, - 5u8, - 117u8, - 163u8, - 180u8, - 139u8, - 22u8, - 169u8, - 185u8, - 60u8, - 217u8, - ], - ) - } - pub fn span_slash_iter( - &self, - ) -> ::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::Address::new_static( - "Staking", - "SpanSlash", - ::alloc::vec::Vec::new(), - [ - 158u8, - 168u8, - 151u8, - 108u8, - 4u8, - 168u8, - 253u8, - 28u8, - 69u8, - 111u8, - 99u8, - 235u8, - 175u8, - 72u8, - 48u8, - 238u8, - 239u8, - 142u8, - 40u8, - 142u8, - 97u8, - 77u8, - 72u8, - 123u8, - 210u8, - 157u8, - 119u8, - 180u8, - 205u8, - 98u8, - 110u8, - 215u8, - ], - ) - } - pub fn span_slash_iter1( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::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::Address::new_static( - "Staking", - "SpanSlash", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 158u8, - 168u8, - 151u8, - 108u8, - 4u8, - 168u8, - 253u8, - 28u8, - 69u8, - 111u8, - 99u8, - 235u8, - 175u8, - 72u8, - 48u8, - 238u8, - 239u8, - 142u8, - 40u8, - 142u8, - 97u8, - 77u8, - 72u8, - 123u8, - 210u8, - 157u8, - 119u8, - 180u8, - 205u8, - 98u8, - 110u8, - 215u8, - ], - ) - } - pub fn span_slash( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _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::Address::new_static( - "Staking", - "SpanSlash", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 158u8, - 168u8, - 151u8, - 108u8, - 4u8, - 168u8, - 253u8, - 28u8, - 69u8, - 111u8, - 99u8, - 235u8, - 175u8, - 72u8, - 48u8, - 238u8, - 239u8, - 142u8, - 40u8, - 142u8, - 97u8, - 77u8, - 72u8, - 123u8, - 210u8, - 157u8, - 119u8, - 180u8, - 205u8, - 98u8, - 110u8, - 215u8, - ], - ) - } - pub fn current_planned_session( - &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", - "CurrentPlannedSession", - ::alloc::vec::Vec::new(), - [ - 12u8, - 47u8, - 20u8, - 104u8, - 155u8, - 181u8, - 35u8, - 91u8, - 172u8, - 97u8, - 206u8, - 135u8, - 185u8, - 142u8, - 46u8, - 72u8, - 32u8, - 118u8, - 225u8, - 191u8, - 28u8, - 130u8, - 7u8, - 38u8, - 181u8, - 233u8, - 201u8, - 8u8, - 160u8, - 161u8, - 86u8, - 204u8, - ], - ) - } - pub fn offending_validators( - &self, - ) -> ::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::Address::new_static( - "Staking", - "OffendingValidators", - ::alloc::vec::Vec::new(), - [ - 201u8, - 31u8, - 141u8, - 182u8, - 160u8, - 180u8, - 37u8, - 226u8, - 50u8, - 65u8, - 103u8, - 11u8, - 38u8, - 120u8, - 200u8, - 219u8, - 219u8, - 98u8, - 185u8, - 137u8, - 154u8, - 20u8, - 130u8, - 163u8, - 126u8, - 185u8, - 33u8, - 194u8, - 76u8, - 172u8, - 70u8, - 220u8, - ], - ) - } - pub fn chill_threshold( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_arithmetic::per_things::Percent, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Staking", - "ChillThreshold", - ::alloc::vec::Vec::new(), - [ - 133u8, - 222u8, - 1u8, - 208u8, - 212u8, - 216u8, - 247u8, - 66u8, - 178u8, - 96u8, - 35u8, - 112u8, - 33u8, - 245u8, - 11u8, - 249u8, - 255u8, - 212u8, - 204u8, - 161u8, - 44u8, - 38u8, - 126u8, - 151u8, - 140u8, - 42u8, - 253u8, - 101u8, - 1u8, - 23u8, - 239u8, - 39u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn max_nominations( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Staking", - "MaxNominations", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn history_depth( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Staking", - "HistoryDepth", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn sessions_per_era( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Staking", - "SessionsPerEra", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn bonding_duration( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Staking", - "BondingDuration", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn slash_defer_duration( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Staking", - "SlashDeferDuration", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn max_nominator_rewarded_per_validator( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Staking", - "MaxNominatorRewardedPerValidator", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn max_unlocking_chunks( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Staking", - "MaxUnlockingChunks", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod offences { - use super::root_mod; - use super::runtime_types; - pub type Event = runtime_types::pallet_offences::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Offence { - pub kind: [::core::primitive::u8; 16usize], - pub timeslot: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Offence { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Offence { - kind: { - let __codec_res_edqy = <[::core::primitive::u8; 16usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Offence::kind`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - timeslot: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Offence::timeslot`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Offence { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.kind), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.timeslot), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.kind, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.timeslot, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Offence {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Offence { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Offence; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Offence { - kind: { - let val = *vals - .get(&Some("kind")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "kind".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("kind"))? - }, - timeslot: { - let val = *vals - .get(&Some("timeslot")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "timeslot".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("timeslot"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Offence { - kind: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("kind"))? - }, - timeslot: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("timeslot"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Offence { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Offence { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Offence { kind, timeslot } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("kind"), - kind as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("timeslot"), - timeslot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Offence { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Offence { kind, timeslot } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("kind"), - kind as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("timeslot"), - timeslot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Offence { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Offence", - "kind", - &self.kind, - "timeslot", - &&self.timeslot, - ) - } - } - 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 { - pub fn reports_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_staking::offence::OffenceDetails< - ::subxt::utils::AccountId32, - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - ), - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Offences", - "Reports", - ::alloc::vec::Vec::new(), - [ - 140u8, - 14u8, - 199u8, - 180u8, - 83u8, - 5u8, - 23u8, - 57u8, - 241u8, - 41u8, - 240u8, - 35u8, - 80u8, - 12u8, - 115u8, - 16u8, - 2u8, - 15u8, - 22u8, - 77u8, - 25u8, - 92u8, - 100u8, - 39u8, - 226u8, - 55u8, - 240u8, - 80u8, - 190u8, - 196u8, - 234u8, - 177u8, - ], - ) - } - pub fn reports( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_staking::offence::OffenceDetails< - ::subxt::utils::AccountId32, - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - ), - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Offences", - "Reports", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 140u8, - 14u8, - 199u8, - 180u8, - 83u8, - 5u8, - 23u8, - 57u8, - 241u8, - 41u8, - 240u8, - 35u8, - 80u8, - 12u8, - 115u8, - 16u8, - 2u8, - 15u8, - 22u8, - 77u8, - 25u8, - 92u8, - 100u8, - 39u8, - 226u8, - 55u8, - 240u8, - 80u8, - 190u8, - 196u8, - 234u8, - 177u8, - ], - ) - } - pub fn concurrent_reports_index_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::subxt::utils::H256>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Offences", - "ConcurrentReportsIndex", - ::alloc::vec::Vec::new(), - [ - 170u8, - 186u8, - 72u8, - 29u8, - 251u8, - 38u8, - 193u8, - 195u8, - 109u8, - 86u8, - 0u8, - 241u8, - 20u8, - 235u8, - 108u8, - 126u8, - 215u8, - 82u8, - 73u8, - 113u8, - 199u8, - 138u8, - 24u8, - 58u8, - 216u8, - 72u8, - 221u8, - 232u8, - 252u8, - 244u8, - 96u8, - 247u8, - ], - ) - } - pub fn concurrent_reports_index_iter1( - &self, - _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 16usize]>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::subxt::utils::H256>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Offences", - "ConcurrentReportsIndex", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 170u8, - 186u8, - 72u8, - 29u8, - 251u8, - 38u8, - 193u8, - 195u8, - 109u8, - 86u8, - 0u8, - 241u8, - 20u8, - 235u8, - 108u8, - 126u8, - 215u8, - 82u8, - 73u8, - 113u8, - 199u8, - 138u8, - 24u8, - 58u8, - 216u8, - 72u8, - 221u8, - 232u8, - 252u8, - 244u8, - 96u8, - 247u8, - ], - ) - } - 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::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::subxt::utils::H256>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Offences", - "ConcurrentReportsIndex", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 170u8, - 186u8, - 72u8, - 29u8, - 251u8, - 38u8, - 193u8, - 195u8, - 109u8, - 86u8, - 0u8, - 241u8, - 20u8, - 235u8, - 108u8, - 126u8, - 215u8, - 82u8, - 73u8, - 113u8, - 199u8, - 138u8, - 24u8, - 58u8, - 216u8, - 72u8, - 221u8, - 232u8, - 252u8, - 244u8, - 96u8, - 247u8, - ], - ) - } - } - } - } - pub mod historical { - use super::root_mod; - use super::runtime_types; - } - pub mod session { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_session::pallet::Error; - pub type Call = runtime_types::pallet_session::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetKeys { - pub keys: runtime_types::polkadot_runtime::SessionKeys, - pub proof: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetKeys { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetKeys { - keys: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetKeys::keys`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proof: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetKeys::proof`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetKeys { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.keys), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proof), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.keys, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proof, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetKeys {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetKeys { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetKeys; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetKeys { - keys: { - let val = *vals - .get(&Some("keys")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "keys".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("keys"))? - }, - proof: { - let val = *vals - .get(&Some("proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proof".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proof"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SetKeys { - keys: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("keys"))? - }, - proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proof"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SetKeys { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetKeys { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetKeys { keys, proof } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("keys"), - keys as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proof"), - proof as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetKeys { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetKeys { keys, proof } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("keys"), - keys as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proof"), - proof as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetKeys { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SetKeys", - "keys", - &self.keys, - "proof", - &&self.proof, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetKeys { - const PALLET: &'static str = "Session"; - const CALL: &'static str = "set_keys"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PurgeKeys; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PurgeKeys { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(PurgeKeys) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PurgeKeys { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PurgeKeys {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PurgeKeys { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PurgeKeys; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(PurgeKeys) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for PurgeKeys { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PurgeKeys { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PurgeKeys = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PurgeKeys { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PurgeKeys = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PurgeKeys { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "PurgeKeys") - } - } - impl ::subxt::blocks::StaticExtrinsic for PurgeKeys { - const PALLET: &'static str = "Session"; - const CALL: &'static str = "purge_keys"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn set_keys( - &self, - keys: runtime_types::polkadot_runtime::SessionKeys, - proof: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Session", - "set_keys", - types::SetKeys { keys, proof }, - [ - 34u8, - 174u8, - 125u8, - 16u8, - 173u8, - 107u8, - 253u8, - 141u8, - 27u8, - 177u8, - 211u8, - 118u8, - 29u8, - 108u8, - 84u8, - 116u8, - 138u8, - 212u8, - 123u8, - 27u8, - 87u8, - 60u8, - 198u8, - 48u8, - 4u8, - 150u8, - 230u8, - 8u8, - 36u8, - 1u8, - 74u8, - 13u8, - ], - ) - } - pub fn purge_keys(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Session", - "purge_keys", - types::PurgeKeys {}, - [ - 215u8, - 204u8, - 146u8, - 236u8, - 32u8, - 78u8, - 198u8, - 79u8, - 85u8, - 214u8, - 15u8, - 151u8, - 158u8, - 31u8, - 146u8, - 119u8, - 119u8, - 204u8, - 151u8, - 169u8, - 226u8, - 67u8, - 217u8, - 39u8, - 241u8, - 245u8, - 203u8, - 240u8, - 203u8, - 172u8, - 16u8, - 209u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_session::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NewSession { - pub session_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for NewSession { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.session_index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - NewSession, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(NewSession { session_index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for NewSession { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> NewSession { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NewSession { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(NewSession { - session_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NewSession::session_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NewSession { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.session_index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.session_index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.session_index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.session_index, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NewSession {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for NewSession { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NewSession; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(NewSession { - session_index: { - let val = *vals - .get(&Some("session_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "session_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("session_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(NewSession { - session_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("session_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for NewSession { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NewSession { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewSession { session_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("session_index"), - session_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for NewSession { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewSession { session_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("session_index"), - session_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NewSession { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "NewSession", - "session_index", - &&self.session_index, - ) - } - } - 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 { - pub fn validators( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::subxt::utils::AccountId32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Session", - "Validators", - ::alloc::vec::Vec::new(), - [ - 50u8, - 86u8, - 154u8, - 222u8, - 249u8, - 209u8, - 156u8, - 22u8, - 155u8, - 25u8, - 133u8, - 194u8, - 210u8, - 50u8, - 38u8, - 28u8, - 139u8, - 201u8, - 90u8, - 139u8, - 115u8, - 12u8, - 12u8, - 141u8, - 4u8, - 178u8, - 201u8, - 241u8, - 223u8, - 234u8, - 6u8, - 86u8, - ], - ) - } - pub fn current_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( - "Session", - "CurrentIndex", - ::alloc::vec::Vec::new(), - [ - 167u8, - 151u8, - 125u8, - 150u8, - 159u8, - 21u8, - 78u8, - 217u8, - 237u8, - 183u8, - 135u8, - 65u8, - 187u8, - 114u8, - 188u8, - 206u8, - 16u8, - 32u8, - 69u8, - 208u8, - 134u8, - 159u8, - 232u8, - 224u8, - 243u8, - 27u8, - 31u8, - 166u8, - 145u8, - 44u8, - 221u8, - 230u8, - ], - ) - } - pub fn queued_changed( - &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( - "Session", - "QueuedChanged", - ::alloc::vec::Vec::new(), - [ - 184u8, - 137u8, - 224u8, - 137u8, - 31u8, - 236u8, - 95u8, - 164u8, - 102u8, - 225u8, - 198u8, - 227u8, - 140u8, - 37u8, - 113u8, - 57u8, - 59u8, - 4u8, - 202u8, - 102u8, - 117u8, - 36u8, - 226u8, - 64u8, - 113u8, - 141u8, - 199u8, - 111u8, - 99u8, - 144u8, - 198u8, - 153u8, - ], - ) - } - pub fn queued_keys( - &self, - ) -> ::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::Address::new_static( - "Session", - "QueuedKeys", - ::alloc::vec::Vec::new(), - [ - 112u8, - 98u8, - 60u8, - 1u8, - 187u8, - 198u8, - 207u8, - 148u8, - 164u8, - 235u8, - 211u8, - 169u8, - 230u8, - 39u8, - 145u8, - 166u8, - 131u8, - 53u8, - 85u8, - 171u8, - 223u8, - 147u8, - 137u8, - 135u8, - 42u8, - 203u8, - 37u8, - 27u8, - 67u8, - 129u8, - 103u8, - 129u8, - ], - ) - } - pub fn disabled_validators( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Session", - "DisabledValidators", - ::alloc::vec::Vec::new(), - [ - 213u8, - 19u8, - 168u8, - 234u8, - 187u8, - 200u8, - 180u8, - 97u8, - 234u8, - 189u8, - 36u8, - 233u8, - 158u8, - 184u8, - 45u8, - 35u8, - 129u8, - 213u8, - 133u8, - 8u8, - 104u8, - 183u8, - 46u8, - 68u8, - 154u8, - 240u8, - 132u8, - 22u8, - 247u8, - 11u8, - 54u8, - 221u8, - ], - ) - } - pub fn next_keys_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime::SessionKeys, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Session", - "NextKeys", - ::alloc::vec::Vec::new(), - [ - 204u8, - 75u8, - 94u8, - 239u8, - 45u8, - 174u8, - 177u8, - 27u8, - 185u8, - 143u8, - 4u8, - 2u8, - 157u8, - 212u8, - 9u8, - 103u8, - 51u8, - 160u8, - 35u8, - 61u8, - 118u8, - 144u8, - 32u8, - 217u8, - 9u8, - 159u8, - 15u8, - 177u8, - 91u8, - 108u8, - 0u8, - 219u8, - ], - ) - } - pub fn next_keys( - &self, - _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::Address::new_static( - "Session", - "NextKeys", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 204u8, - 75u8, - 94u8, - 239u8, - 45u8, - 174u8, - 177u8, - 27u8, - 185u8, - 143u8, - 4u8, - 2u8, - 157u8, - 212u8, - 9u8, - 103u8, - 51u8, - 160u8, - 35u8, - 61u8, - 118u8, - 144u8, - 32u8, - 217u8, - 9u8, - 159u8, - 15u8, - 177u8, - 91u8, - 108u8, - 0u8, - 219u8, - ], - ) - } - pub fn key_owner_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::AccountId32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Session", - "KeyOwner", - ::alloc::vec::Vec::new(), - [ - 217u8, - 204u8, - 21u8, - 114u8, - 247u8, - 129u8, - 32u8, - 242u8, - 93u8, - 91u8, - 253u8, - 253u8, - 248u8, - 90u8, - 12u8, - 202u8, - 195u8, - 25u8, - 18u8, - 100u8, - 253u8, - 109u8, - 88u8, - 77u8, - 217u8, - 140u8, - 51u8, - 40u8, - 118u8, - 35u8, - 107u8, - 206u8, - ], - ) - } - pub fn key_owner_iter1( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::sp_core::crypto::KeyTypeId, - >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::AccountId32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Session", - "KeyOwner", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 217u8, - 204u8, - 21u8, - 114u8, - 247u8, - 129u8, - 32u8, - 242u8, - 93u8, - 91u8, - 253u8, - 253u8, - 248u8, - 90u8, - 12u8, - 202u8, - 195u8, - 25u8, - 18u8, - 100u8, - 253u8, - 109u8, - 88u8, - 77u8, - 217u8, - 140u8, - 51u8, - 40u8, - 118u8, - 35u8, - 107u8, - 206u8, - ], - ) - } - pub fn key_owner( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::sp_core::crypto::KeyTypeId, - >, - _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::Address::new_static( - "Session", - "KeyOwner", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 217u8, - 204u8, - 21u8, - 114u8, - 247u8, - 129u8, - 32u8, - 242u8, - 93u8, - 91u8, - 253u8, - 253u8, - 248u8, - 90u8, - 12u8, - 202u8, - 195u8, - 25u8, - 18u8, - 100u8, - 253u8, - 109u8, - 88u8, - 77u8, - 217u8, - 140u8, - 51u8, - 40u8, - 118u8, - 35u8, - 107u8, - 206u8, - ], - ) - } - } - } - } - pub mod grandpa { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_grandpa::pallet::Error; - pub type Call = runtime_types::pallet_grandpa::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReportEquivocation { - pub equivocation_proof: ::std::boxed::Box< - runtime_types::sp_consensus_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ReportEquivocation { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ReportEquivocation { - equivocation_proof: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::sp_consensus_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ReportEquivocation::equivocation_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - key_owner_proof: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ReportEquivocation::key_owner_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ReportEquivocation { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.equivocation_proof, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.key_owner_proof, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.equivocation_proof, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.key_owner_proof, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ReportEquivocation {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ReportEquivocation { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReportEquivocation; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ReportEquivocation { - equivocation_proof: { - let val = *vals - .get(&Some("equivocation_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "equivocation_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation_proof"))? - }, - key_owner_proof: { - let val = *vals - .get(&Some("key_owner_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "key_owner_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ReportEquivocation { - equivocation_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation_proof"))? - }, - key_owner_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ReportEquivocation { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ReportEquivocation { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReportEquivocation { - equivocation_proof, - key_owner_proof, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("equivocation_proof"), - equivocation_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("key_owner_proof"), - key_owner_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ReportEquivocation { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReportEquivocation { - equivocation_proof, - key_owner_proof, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("equivocation_proof"), - equivocation_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("key_owner_proof"), - key_owner_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ReportEquivocation { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ReportEquivocation", - "equivocation_proof", - &self.equivocation_proof, - "key_owner_proof", - &&self.key_owner_proof, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ReportEquivocation { - const PALLET: &'static str = "Grandpa"; - const CALL: &'static str = "report_equivocation"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReportEquivocationUnsigned { - pub equivocation_proof: ::std::boxed::Box< - runtime_types::sp_consensus_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ReportEquivocationUnsigned { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ReportEquivocationUnsigned { - equivocation_proof: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::sp_consensus_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ReportEquivocationUnsigned::equivocation_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - key_owner_proof: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ReportEquivocationUnsigned::key_owner_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ReportEquivocationUnsigned { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.equivocation_proof, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.key_owner_proof, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.equivocation_proof, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.key_owner_proof, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for ReportEquivocationUnsigned {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ReportEquivocationUnsigned { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReportEquivocationUnsigned; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ReportEquivocationUnsigned { - equivocation_proof: { - let val = *vals - .get(&Some("equivocation_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "equivocation_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation_proof"))? - }, - key_owner_proof: { - let val = *vals - .get(&Some("key_owner_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "key_owner_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ReportEquivocationUnsigned { - equivocation_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation_proof"))? - }, - key_owner_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ReportEquivocationUnsigned { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ReportEquivocationUnsigned { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReportEquivocationUnsigned { - equivocation_proof, - key_owner_proof, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("equivocation_proof"), - equivocation_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("key_owner_proof"), - key_owner_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ReportEquivocationUnsigned { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReportEquivocationUnsigned { - equivocation_proof, - key_owner_proof, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("equivocation_proof"), - equivocation_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("key_owner_proof"), - key_owner_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ReportEquivocationUnsigned { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ReportEquivocationUnsigned", - "equivocation_proof", - &self.equivocation_proof, - "key_owner_proof", - &&self.key_owner_proof, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for ReportEquivocationUnsigned { - const PALLET: &'static str = "Grandpa"; - const CALL: &'static str = "report_equivocation_unsigned"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NoteStalled { - pub delay: ::core::primitive::u32, - pub best_finalized_block_number: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NoteStalled { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(NoteStalled { - delay: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NoteStalled::delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - best_finalized_block_number: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `NoteStalled::best_finalized_block_number`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NoteStalled { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delay), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.best_finalized_block_number, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.delay, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.best_finalized_block_number, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NoteStalled {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for NoteStalled { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NoteStalled; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(NoteStalled { - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - best_finalized_block_number: { - let val = *vals - .get(&Some("best_finalized_block_number")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "best_finalized_block_number".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("best_finalized_block_number"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(NoteStalled { - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - best_finalized_block_number: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("best_finalized_block_number"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for NoteStalled { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NoteStalled { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NoteStalled { delay, best_finalized_block_number } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("best_finalized_block_number"), - best_finalized_block_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for NoteStalled { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NoteStalled { delay, best_finalized_block_number } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("best_finalized_block_number"), - best_finalized_block_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NoteStalled { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "NoteStalled", - "delay", - &self.delay, - "best_finalized_block_number", - &&self.best_finalized_block_number, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for NoteStalled { - const PALLET: &'static str = "Grandpa"; - const CALL: &'static str = "note_stalled"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn report_equivocation( - &self, - equivocation_proof: runtime_types::sp_consensus_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", - types::ReportEquivocation { - equivocation_proof: ::std::boxed::Box::new( - equivocation_proof, - ), - key_owner_proof, - }, - [ - 11u8, - 183u8, - 81u8, - 93u8, - 41u8, - 7u8, - 70u8, - 155u8, - 8u8, - 57u8, - 177u8, - 245u8, - 131u8, - 79u8, - 236u8, - 118u8, - 147u8, - 114u8, - 40u8, - 204u8, - 177u8, - 2u8, - 43u8, - 42u8, - 2u8, - 201u8, - 202u8, - 120u8, - 150u8, - 109u8, - 108u8, - 156u8, - ], - ) - } - pub fn report_equivocation_unsigned( - &self, - equivocation_proof: runtime_types::sp_consensus_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", - types::ReportEquivocationUnsigned { - equivocation_proof: ::std::boxed::Box::new( - equivocation_proof, - ), - key_owner_proof, - }, - [ - 141u8, - 133u8, - 227u8, - 65u8, - 22u8, - 181u8, - 108u8, - 9u8, - 157u8, - 27u8, - 124u8, - 53u8, - 177u8, - 27u8, - 5u8, - 16u8, - 193u8, - 66u8, - 59u8, - 87u8, - 143u8, - 238u8, - 251u8, - 167u8, - 117u8, - 138u8, - 246u8, - 236u8, - 65u8, - 148u8, - 20u8, - 131u8, - ], - ) - } - 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", - types::NoteStalled { - delay, - best_finalized_block_number, - }, - [ - 158u8, - 25u8, - 64u8, - 114u8, - 131u8, - 139u8, - 227u8, - 132u8, - 42u8, - 107u8, - 40u8, - 249u8, - 18u8, - 93u8, - 254u8, - 86u8, - 37u8, - 67u8, - 250u8, - 35u8, - 241u8, - 194u8, - 209u8, - 20u8, - 39u8, - 75u8, - 186u8, - 21u8, - 48u8, - 124u8, - 151u8, - 31u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_grandpa::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NewAuthorities { - pub authority_set: ::std::vec::Vec< - ( - runtime_types::sp_consensus_grandpa::app::Public, - ::core::primitive::u64, - ), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NewAuthorities { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(NewAuthorities { - authority_set: { - let __codec_res_edqy = <::std::vec::Vec< - ( - runtime_types::sp_consensus_grandpa::app::Public, - ::core::primitive::u64, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NewAuthorities::authority_set`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NewAuthorities { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.authority_set) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.authority_set, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.authority_set) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.authority_set, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NewAuthorities {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for NewAuthorities { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NewAuthorities; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(NewAuthorities { - authority_set: { - let val = *vals - .get(&Some("authority_set")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "authority_set".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_set"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(NewAuthorities { - authority_set: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_set"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for NewAuthorities { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NewAuthorities { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewAuthorities { authority_set } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("authority_set"), - authority_set - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for NewAuthorities { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewAuthorities { authority_set } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("authority_set"), - authority_set - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NewAuthorities { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "NewAuthorities", - "authority_set", - &&self.authority_set, - ) - } - } - impl ::subxt::events::StaticEvent for NewAuthorities { - const PALLET: &'static str = "Grandpa"; - const EVENT: &'static str = "NewAuthorities"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Paused; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Paused { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Paused) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Paused { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Paused {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Paused { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Paused; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(Paused) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Paused { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Paused { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Paused = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Paused { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Paused = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Paused { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "Paused") - } - } - impl ::subxt::events::StaticEvent for Paused { - const PALLET: &'static str = "Grandpa"; - const EVENT: &'static str = "Paused"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Resumed; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Resumed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Resumed) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Resumed { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Resumed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Resumed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Resumed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(Resumed) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Resumed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Resumed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Resumed = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Resumed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Resumed = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Resumed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "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 { - 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::Address::new_static( - "Grandpa", - "State", - ::alloc::vec::Vec::new(), - [ - 73u8, - 71u8, - 112u8, - 83u8, - 238u8, - 75u8, - 44u8, - 9u8, - 180u8, - 33u8, - 30u8, - 121u8, - 98u8, - 96u8, - 61u8, - 133u8, - 16u8, - 70u8, - 30u8, - 249u8, - 34u8, - 148u8, - 15u8, - 239u8, - 164u8, - 157u8, - 52u8, - 27u8, - 144u8, - 52u8, - 223u8, - 109u8, - ], - ) - } - pub fn pending_change( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_grandpa::StoredPendingChange< - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Grandpa", - "PendingChange", - ::alloc::vec::Vec::new(), - [ - 150u8, - 194u8, - 185u8, - 248u8, - 239u8, - 43u8, - 141u8, - 253u8, - 61u8, - 106u8, - 74u8, - 164u8, - 209u8, - 204u8, - 206u8, - 200u8, - 32u8, - 38u8, - 11u8, - 78u8, - 84u8, - 243u8, - 181u8, - 142u8, - 179u8, - 151u8, - 81u8, - 204u8, - 244u8, - 150u8, - 137u8, - 250u8, - ], - ) - } - pub fn next_forced( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Grandpa", - "NextForced", - ::alloc::vec::Vec::new(), - [ - 3u8, - 231u8, - 56u8, - 18u8, - 87u8, - 112u8, - 227u8, - 126u8, - 180u8, - 131u8, - 255u8, - 141u8, - 82u8, - 34u8, - 61u8, - 47u8, - 234u8, - 37u8, - 95u8, - 62u8, - 33u8, - 235u8, - 231u8, - 122u8, - 125u8, - 8u8, - 223u8, - 95u8, - 255u8, - 204u8, - 40u8, - 97u8, - ], - ) - } - pub fn stalled( - &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( - "Grandpa", - "Stalled", - ::alloc::vec::Vec::new(), - [ - 6u8, - 81u8, - 205u8, - 142u8, - 195u8, - 48u8, - 0u8, - 247u8, - 108u8, - 170u8, - 10u8, - 249u8, - 72u8, - 206u8, - 32u8, - 103u8, - 109u8, - 57u8, - 51u8, - 21u8, - 144u8, - 204u8, - 79u8, - 8u8, - 191u8, - 185u8, - 38u8, - 34u8, - 118u8, - 223u8, - 75u8, - 241u8, - ], - ) - } - pub fn current_set_id( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u64, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Grandpa", - "CurrentSetId", - ::alloc::vec::Vec::new(), - [ - 234u8, - 215u8, - 218u8, - 42u8, - 30u8, - 76u8, - 129u8, - 40u8, - 125u8, - 137u8, - 207u8, - 47u8, - 46u8, - 213u8, - 159u8, - 50u8, - 175u8, - 81u8, - 155u8, - 123u8, - 246u8, - 175u8, - 156u8, - 68u8, - 22u8, - 113u8, - 135u8, - 137u8, - 163u8, - 18u8, - 115u8, - 73u8, - ], - ) - } - pub fn set_id_session_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Grandpa", - "SetIdSession", - ::alloc::vec::Vec::new(), - [ - 47u8, - 0u8, - 239u8, - 121u8, - 187u8, - 213u8, - 254u8, - 50u8, - 238u8, - 10u8, - 162u8, - 65u8, - 189u8, - 166u8, - 37u8, - 74u8, - 82u8, - 81u8, - 160u8, - 20u8, - 180u8, - 253u8, - 238u8, - 18u8, - 209u8, - 203u8, - 38u8, - 148u8, - 16u8, - 105u8, - 72u8, - 169u8, - ], - ) - } - pub fn set_id_session( - &self, - _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::Address::new_static( - "Grandpa", - "SetIdSession", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 47u8, - 0u8, - 239u8, - 121u8, - 187u8, - 213u8, - 254u8, - 50u8, - 238u8, - 10u8, - 162u8, - 65u8, - 189u8, - 166u8, - 37u8, - 74u8, - 82u8, - 81u8, - 160u8, - 20u8, - 180u8, - 253u8, - 238u8, - 18u8, - 209u8, - 203u8, - 38u8, - 148u8, - 16u8, - 105u8, - 72u8, - 169u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn max_authorities( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Grandpa", - "MaxAuthorities", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn max_set_id_session_entries( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u64> { - ::subxt::constants::Address::new_static( - "Grandpa", - "MaxSetIdSessionEntries", - [ - 128u8, - 214u8, - 205u8, - 242u8, - 181u8, - 142u8, - 124u8, - 231u8, - 190u8, - 146u8, - 59u8, - 226u8, - 157u8, - 101u8, - 103u8, - 117u8, - 249u8, - 65u8, - 18u8, - 191u8, - 103u8, - 119u8, - 53u8, - 85u8, - 81u8, - 96u8, - 220u8, - 42u8, - 184u8, - 239u8, - 42u8, - 246u8, - ], - ) - } - } - } - } - pub mod im_online { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_im_online::pallet::Error; - pub type Call = runtime_types::pallet_im_online::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Heartbeat { - pub heartbeat: runtime_types::pallet_im_online::Heartbeat< - ::core::primitive::u32, - >, - pub signature: runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Heartbeat { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Heartbeat { - heartbeat: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Heartbeat::heartbeat`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - signature: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Heartbeat::signature`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Heartbeat { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.heartbeat), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.signature), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.heartbeat, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.signature, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Heartbeat {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Heartbeat { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Heartbeat; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Heartbeat { - heartbeat: { - let val = *vals - .get(&Some("heartbeat")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "heartbeat".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("heartbeat"))? - }, - signature: { - let val = *vals - .get(&Some("signature")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "signature".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Heartbeat { - heartbeat: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("heartbeat"))? - }, - signature: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Heartbeat { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Heartbeat { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Heartbeat { heartbeat, signature } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("heartbeat"), - heartbeat as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("signature"), - signature as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Heartbeat { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Heartbeat { heartbeat, signature } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("heartbeat"), - heartbeat as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("signature"), - signature as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Heartbeat { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Heartbeat", - "heartbeat", - &self.heartbeat, - "signature", - &&self.signature, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Heartbeat { - const PALLET: &'static str = "ImOnline"; - const CALL: &'static str = "heartbeat"; - } - } - pub struct TransactionApi; - impl TransactionApi { - 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", - types::Heartbeat { - heartbeat, - signature, - }, - [ - 24u8, - 24u8, - 223u8, - 6u8, - 162u8, - 170u8, - 69u8, - 242u8, - 215u8, - 74u8, - 140u8, - 123u8, - 123u8, - 10u8, - 163u8, - 19u8, - 63u8, - 121u8, - 22u8, - 12u8, - 192u8, - 69u8, - 48u8, - 223u8, - 39u8, - 129u8, - 236u8, - 87u8, - 142u8, - 167u8, - 129u8, - 184u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_im_online::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HeartbeatReceived { - pub authority_id: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for HeartbeatReceived { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(HeartbeatReceived { - authority_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `HeartbeatReceived::authority_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for HeartbeatReceived { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.authority_id) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.authority_id, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.authority_id) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.authority_id, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for HeartbeatReceived {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for HeartbeatReceived { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = HeartbeatReceived; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(HeartbeatReceived { - authority_id: { - let val = *vals - .get(&Some("authority_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "authority_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(HeartbeatReceived { - authority_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for HeartbeatReceived { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for HeartbeatReceived { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HeartbeatReceived { authority_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("authority_id"), - authority_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for HeartbeatReceived { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HeartbeatReceived { authority_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("authority_id"), - authority_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for HeartbeatReceived { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "HeartbeatReceived", - "authority_id", - &&self.authority_id, - ) - } - } - impl ::subxt::events::StaticEvent for HeartbeatReceived { - const PALLET: &'static str = "ImOnline"; - const EVENT: &'static str = "HeartbeatReceived"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AllGood; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AllGood { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(AllGood) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AllGood { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AllGood {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AllGood { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AllGood; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(AllGood) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for AllGood { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AllGood { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AllGood = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AllGood { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AllGood = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AllGood { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "AllGood") - } - } - impl ::subxt::events::StaticEvent for AllGood { - const PALLET: &'static str = "ImOnline"; - const EVENT: &'static str = "AllGood"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SomeOffline { - pub offline: ::std::vec::Vec< - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - ), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SomeOffline { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(SomeOffline { - offline: { - let __codec_res_edqy = <::std::vec::Vec< - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SomeOffline::offline`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SomeOffline { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.offline) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.offline, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.offline) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.offline, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SomeOffline {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SomeOffline { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SomeOffline; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SomeOffline { - offline: { - let val = *vals - .get(&Some("offline")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "offline".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("offline"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SomeOffline { - offline: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("offline"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SomeOffline { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SomeOffline { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SomeOffline { offline } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("offline"), - offline as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SomeOffline { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SomeOffline { offline } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("offline"), - offline as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SomeOffline { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SomeOffline", - "offline", - &&self.offline, - ) - } - } - 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 { - pub fn heartbeat_after( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ImOnline", - "HeartbeatAfter", - ::alloc::vec::Vec::new(), - [ - 36u8, - 179u8, - 76u8, - 254u8, - 3u8, - 184u8, - 154u8, - 142u8, - 70u8, - 104u8, - 44u8, - 244u8, - 39u8, - 97u8, - 31u8, - 31u8, - 93u8, - 228u8, - 185u8, - 224u8, - 13u8, - 160u8, - 231u8, - 210u8, - 110u8, - 143u8, - 116u8, - 29u8, - 0u8, - 215u8, - 217u8, - 137u8, - ], - ) - } - pub fn keys( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ImOnline", - "Keys", - ::alloc::vec::Vec::new(), - [ - 111u8, - 104u8, - 188u8, - 46u8, - 152u8, - 140u8, - 137u8, - 244u8, - 52u8, - 214u8, - 115u8, - 156u8, - 39u8, - 239u8, - 15u8, - 168u8, - 193u8, - 125u8, - 57u8, - 195u8, - 250u8, - 156u8, - 234u8, - 222u8, - 222u8, - 253u8, - 135u8, - 232u8, - 196u8, - 163u8, - 29u8, - 218u8, - ], - ) - } - pub fn received_heartbeats_iter( - &self, - ) -> ::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::Address::new_static( - "ImOnline", - "ReceivedHeartbeats", - ::alloc::vec::Vec::new(), - [ - 50u8, - 203u8, - 165u8, - 39u8, - 243u8, - 200u8, - 26u8, - 241u8, - 83u8, - 248u8, - 200u8, - 104u8, - 79u8, - 169u8, - 170u8, - 120u8, - 74u8, - 195u8, - 58u8, - 235u8, - 39u8, - 177u8, - 215u8, - 47u8, - 155u8, - 8u8, - 164u8, - 9u8, - 91u8, - 3u8, - 71u8, - 242u8, - ], - ) - } - pub fn received_heartbeats_iter1( - &self, - _0: 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::Address::new_static( - "ImOnline", - "ReceivedHeartbeats", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 50u8, - 203u8, - 165u8, - 39u8, - 243u8, - 200u8, - 26u8, - 241u8, - 83u8, - 248u8, - 200u8, - 104u8, - 79u8, - 169u8, - 170u8, - 120u8, - 74u8, - 195u8, - 58u8, - 235u8, - 39u8, - 177u8, - 215u8, - 47u8, - 155u8, - 8u8, - 164u8, - 9u8, - 91u8, - 3u8, - 71u8, - 242u8, - ], - ) - } - pub fn received_heartbeats( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::frame_support::traits::misc::WrapperOpaque< - runtime_types::pallet_im_online::BoundedOpaqueNetworkState, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ImOnline", - "ReceivedHeartbeats", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 50u8, - 203u8, - 165u8, - 39u8, - 243u8, - 200u8, - 26u8, - 241u8, - 83u8, - 248u8, - 200u8, - 104u8, - 79u8, - 169u8, - 170u8, - 120u8, - 74u8, - 195u8, - 58u8, - 235u8, - 39u8, - 177u8, - 215u8, - 47u8, - 155u8, - 8u8, - 164u8, - 9u8, - 91u8, - 3u8, - 71u8, - 242u8, - ], - ) - } - pub fn authored_blocks_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ImOnline", - "AuthoredBlocks", - ::alloc::vec::Vec::new(), - [ - 123u8, - 76u8, - 230u8, - 113u8, - 65u8, - 255u8, - 99u8, - 79u8, - 131u8, - 139u8, - 218u8, - 20u8, - 174u8, - 191u8, - 224u8, - 67u8, - 137u8, - 48u8, - 146u8, - 209u8, - 148u8, - 69u8, - 130u8, - 9u8, - 173u8, - 253u8, - 206u8, - 196u8, - 68u8, - 160u8, - 233u8, - 126u8, - ], - ) - } - pub fn authored_blocks_iter1( - &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( - "ImOnline", - "AuthoredBlocks", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 123u8, - 76u8, - 230u8, - 113u8, - 65u8, - 255u8, - 99u8, - 79u8, - 131u8, - 139u8, - 218u8, - 20u8, - 174u8, - 191u8, - 224u8, - 67u8, - 137u8, - 48u8, - 146u8, - 209u8, - 148u8, - 69u8, - 130u8, - 9u8, - 173u8, - 253u8, - 206u8, - 196u8, - 68u8, - 160u8, - 233u8, - 126u8, - ], - ) - } - pub fn authored_blocks( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ImOnline", - "AuthoredBlocks", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 123u8, - 76u8, - 230u8, - 113u8, - 65u8, - 255u8, - 99u8, - 79u8, - 131u8, - 139u8, - 218u8, - 20u8, - 174u8, - 191u8, - 224u8, - 67u8, - 137u8, - 48u8, - 146u8, - 209u8, - 148u8, - 69u8, - 130u8, - 9u8, - 173u8, - 253u8, - 206u8, - 196u8, - 68u8, - 160u8, - 233u8, - 126u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn unsigned_priority( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u64> { - ::subxt::constants::Address::new_static( - "ImOnline", - "UnsignedPriority", - [ - 128u8, - 214u8, - 205u8, - 242u8, - 181u8, - 142u8, - 124u8, - 231u8, - 190u8, - 146u8, - 59u8, - 226u8, - 157u8, - 101u8, - 103u8, - 117u8, - 249u8, - 65u8, - 18u8, - 191u8, - 103u8, - 119u8, - 53u8, - 85u8, - 81u8, - 96u8, - 220u8, - 42u8, - 184u8, - 239u8, - 42u8, - 246u8, - ], - ) - } - } - } - } - pub mod authority_discovery { - use super::root_mod; - use super::runtime_types; - } - pub mod democracy { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_democracy::pallet::Error; - pub type Call = runtime_types::pallet_democracy::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Propose { - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Propose { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Propose { - proposal: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Propose::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Propose::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Propose { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Propose {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Propose { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Propose; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Propose { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Propose { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Propose { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Propose { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Propose { proposal, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Propose { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Propose { proposal, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Propose { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Propose", - "proposal", - &self.proposal, - "value", - &&self.value, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Propose { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "propose"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Second { - #[codec(compact)] - pub proposal: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Second { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Second { - proposal: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Second::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Second { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.proposal) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.proposal) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.proposal) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.proposal) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Second {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Second { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Second; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Second { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Second { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Second { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Second { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Second { proposal } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Second { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Second { proposal } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Second { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Second", - "proposal", - &&self.proposal, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Second { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "second"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote { - #[codec(compact)] - pub ref_index: ::core::primitive::u32, - pub vote: runtime_types::pallet_democracy::vote::AccountVote< - ::core::primitive::u128, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Vote { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Vote { - ref_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Vote::ref_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - vote: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Vote::vote`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Vote { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.ref_index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.vote), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.ref_index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.vote, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Vote {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Vote { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Vote; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Vote { - ref_index: { - let val = *vals - .get(&Some("ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ref_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - vote: { - let val = *vals - .get(&Some("vote")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "vote".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("vote"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Vote { - ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - vote: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("vote"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Vote { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Vote { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vote { ref_index, vote } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("vote"), - vote as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Vote { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vote { ref_index, vote } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("vote"), - vote as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Vote { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Vote", - "ref_index", - &self.ref_index, - "vote", - &&self.vote, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Vote { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "vote"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct EmergencyCancel { - pub ref_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for EmergencyCancel { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.ref_index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - EmergencyCancel, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(EmergencyCancel { ref_index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for EmergencyCancel { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> EmergencyCancel { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for EmergencyCancel { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(EmergencyCancel { - ref_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `EmergencyCancel::ref_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for EmergencyCancel { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.ref_index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.ref_index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.ref_index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.ref_index, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for EmergencyCancel {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for EmergencyCancel { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = EmergencyCancel; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(EmergencyCancel { - ref_index: { - let val = *vals - .get(&Some("ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ref_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(EmergencyCancel { - ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for EmergencyCancel { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for EmergencyCancel { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EmergencyCancel { ref_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for EmergencyCancel { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EmergencyCancel { ref_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for EmergencyCancel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "EmergencyCancel", - "ref_index", - &&self.ref_index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for EmergencyCancel { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "emergency_cancel"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ExternalPropose { - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ExternalPropose { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ExternalPropose { - proposal: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ExternalPropose::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ExternalPropose { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.proposal) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.proposal, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.proposal) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.proposal, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ExternalPropose {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ExternalPropose { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ExternalPropose; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ExternalPropose { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ExternalPropose { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ExternalPropose { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ExternalPropose { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExternalPropose { proposal } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ExternalPropose { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExternalPropose { proposal } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ExternalPropose { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ExternalPropose", - "proposal", - &&self.proposal, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ExternalPropose { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "external_propose"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ExternalProposeMajority { - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ExternalProposeMajority { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ExternalProposeMajority { - proposal: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ExternalProposeMajority::proposal`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ExternalProposeMajority { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.proposal) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.proposal, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.proposal) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.proposal, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for ExternalProposeMajority {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ExternalProposeMajority { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ExternalProposeMajority; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ExternalProposeMajority { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ExternalProposeMajority { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ExternalProposeMajority { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ExternalProposeMajority { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExternalProposeMajority { proposal } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ExternalProposeMajority { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExternalProposeMajority { proposal } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ExternalProposeMajority { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ExternalProposeMajority", - "proposal", - &&self.proposal, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ExternalProposeMajority { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "external_propose_majority"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ExternalProposeDefault { - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ExternalProposeDefault { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ExternalProposeDefault { - proposal: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ExternalProposeDefault::proposal`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ExternalProposeDefault { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.proposal) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.proposal, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.proposal) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.proposal, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ExternalProposeDefault {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ExternalProposeDefault { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ExternalProposeDefault; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ExternalProposeDefault { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ExternalProposeDefault { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ExternalProposeDefault { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ExternalProposeDefault { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExternalProposeDefault { proposal } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ExternalProposeDefault { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExternalProposeDefault { proposal } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ExternalProposeDefault { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ExternalProposeDefault", - "proposal", - &&self.proposal, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ExternalProposeDefault { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "external_propose_default"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct FastTrack { - pub proposal_hash: ::subxt::utils::H256, - pub voting_period: ::core::primitive::u32, - pub delay: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for FastTrack { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(FastTrack { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `FastTrack::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - voting_period: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `FastTrack::voting_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delay: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `FastTrack::delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for FastTrack { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.voting_period), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delay), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.voting_period, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.delay, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for FastTrack {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for FastTrack { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = FastTrack; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(FastTrack { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - voting_period: { - let val = *vals - .get(&Some("voting_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "voting_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("voting_period"))? - }, - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(FastTrack { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - voting_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("voting_period"))? - }, - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for FastTrack { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for FastTrack { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let FastTrack { proposal_hash, voting_period, delay } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("voting_period"), - voting_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for FastTrack { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let FastTrack { proposal_hash, voting_period, delay } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("voting_period"), - voting_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for FastTrack { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "FastTrack", - "proposal_hash", - &self.proposal_hash, - "voting_period", - &self.voting_period, - "delay", - &&self.delay, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for FastTrack { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "fast_track"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VetoExternal { - pub proposal_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VetoExternal { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(VetoExternal { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VetoExternal::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VetoExternal { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.proposal_hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.proposal_hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.proposal_hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.proposal_hash, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VetoExternal {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for VetoExternal { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VetoExternal; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(VetoExternal { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(VetoExternal { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for VetoExternal { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for VetoExternal { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VetoExternal { proposal_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for VetoExternal { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VetoExternal { proposal_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VetoExternal { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "VetoExternal", - "proposal_hash", - &&self.proposal_hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for VetoExternal { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "veto_external"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelReferendum { - #[codec(compact)] - pub ref_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CancelReferendum { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CancelReferendum { - ref_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CancelReferendum::ref_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CancelReferendum { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.ref_index) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.ref_index) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.ref_index) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.ref_index) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CancelReferendum {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for CancelReferendum { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CancelReferendum; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CancelReferendum { - ref_index: { - let val = *vals - .get(&Some("ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ref_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(CancelReferendum { - ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CancelReferendum { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CancelReferendum { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CancelReferendum { ref_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for CancelReferendum { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CancelReferendum { ref_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CancelReferendum { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "CancelReferendum", - "ref_index", - &&self.ref_index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for CancelReferendum { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "cancel_referendum"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Delegate { - pub to: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub conviction: runtime_types::pallet_democracy::conviction::Conviction, - pub balance: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Delegate { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Delegate { - to: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegate::to`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - conviction: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegate::conviction`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - balance: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegate::balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Delegate { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.to), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.conviction), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.balance), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.to, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.conviction, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.balance, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Delegate {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Delegate { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Delegate; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Delegate { - to: { - let val = *vals - .get(&Some("to")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "to".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - conviction: { - let val = *vals - .get(&Some("conviction")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "conviction".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("conviction"))? - }, - balance: { - let val = *vals - .get(&Some("balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "balance".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Delegate { - to: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - conviction: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("conviction"))? - }, - balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Delegate { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Delegate { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Delegate { to, conviction, balance } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("conviction"), - conviction as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Delegate { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Delegate { to, conviction, balance } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("conviction"), - conviction as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Delegate { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Delegate", - "to", - &self.to, - "conviction", - &self.conviction, - "balance", - &&self.balance, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Delegate { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "delegate"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Undelegate; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Undelegate { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Undelegate) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Undelegate { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Undelegate {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Undelegate { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Undelegate; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(Undelegate) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Undelegate { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Undelegate { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Undelegate = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Undelegate { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Undelegate = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Undelegate { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "Undelegate") - } - } - impl ::subxt::blocks::StaticExtrinsic for Undelegate { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "undelegate"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearPublicProposals; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ClearPublicProposals { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ClearPublicProposals) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ClearPublicProposals { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ClearPublicProposals {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ClearPublicProposals { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ClearPublicProposals; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(ClearPublicProposals) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ClearPublicProposals { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ClearPublicProposals { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClearPublicProposals = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ClearPublicProposals { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClearPublicProposals = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ClearPublicProposals { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "ClearPublicProposals") - } - } - impl ::subxt::blocks::StaticExtrinsic for ClearPublicProposals { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "clear_public_proposals"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Unlock { - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Unlock { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Unlock { - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unlock::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Unlock { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.target) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.target, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.target) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.target, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Unlock {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Unlock { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Unlock; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Unlock { - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Unlock { - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Unlock { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Unlock { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unlock { target } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Unlock { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unlock { target } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Unlock { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Unlock", - "target", - &&self.target, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Unlock { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "unlock"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveVote { - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for RemoveVote { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - RemoveVote, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RemoveVote { index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for RemoveVote { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> RemoveVote { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RemoveVote { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RemoveVote { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveVote::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RemoveVote { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RemoveVote {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RemoveVote { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RemoveVote; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RemoveVote { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(RemoveVote { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for RemoveVote { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RemoveVote { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveVote { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RemoveVote { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveVote { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RemoveVote { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "RemoveVote", - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RemoveVote { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "remove_vote"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveOtherVote { - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RemoveOtherVote { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RemoveOtherVote { - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveOtherVote::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveOtherVote::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RemoveOtherVote { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.target), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.target, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RemoveOtherVote {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for RemoveOtherVote { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RemoveOtherVote; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RemoveOtherVote { - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(RemoveOtherVote { - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for RemoveOtherVote { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RemoveOtherVote { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveOtherVote { target, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RemoveOtherVote { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveOtherVote { target, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RemoveOtherVote { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "RemoveOtherVote", - "target", - &self.target, - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RemoveOtherVote { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "remove_other_vote"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Blacklist { - pub proposal_hash: ::subxt::utils::H256, - pub maybe_ref_index: ::core::option::Option< - ::core::primitive::u32, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Blacklist { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Blacklist { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Blacklist::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_ref_index: { - let __codec_res_edqy = <::core::option::Option< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Blacklist::maybe_ref_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Blacklist { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.maybe_ref_index, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.maybe_ref_index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Blacklist {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Blacklist { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Blacklist; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Blacklist { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - maybe_ref_index: { - let val = *vals - .get(&Some("maybe_ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_ref_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_ref_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Blacklist { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - maybe_ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_ref_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Blacklist { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Blacklist { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Blacklist { proposal_hash, maybe_ref_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_ref_index"), - maybe_ref_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Blacklist { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Blacklist { proposal_hash, maybe_ref_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_ref_index"), - maybe_ref_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Blacklist { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Blacklist", - "proposal_hash", - &self.proposal_hash, - "maybe_ref_index", - &&self.maybe_ref_index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Blacklist { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "blacklist"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelProposal { - #[codec(compact)] - pub prop_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CancelProposal { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CancelProposal { - prop_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CancelProposal::prop_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CancelProposal { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.prop_index) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.prop_index) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.prop_index) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.prop_index) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CancelProposal {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CancelProposal { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CancelProposal; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CancelProposal { - prop_index: { - let val = *vals - .get(&Some("prop_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prop_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prop_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(CancelProposal { - prop_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prop_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CancelProposal { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CancelProposal { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CancelProposal { prop_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("prop_index"), - prop_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CancelProposal { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CancelProposal { prop_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("prop_index"), - prop_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CancelProposal { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "CancelProposal", - "prop_index", - &&self.prop_index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for CancelProposal { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "cancel_proposal"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMetadata { - pub owner: runtime_types::pallet_democracy::types::MetadataOwner, - pub maybe_hash: ::core::option::Option<::subxt::utils::H256>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetMetadata { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMetadata { - owner: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMetadata::owner`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_hash: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::H256, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMetadata::maybe_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetMetadata { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.owner), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.maybe_hash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.owner, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.maybe_hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetMetadata {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetMetadata { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMetadata; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMetadata { - owner: { - let val = *vals - .get(&Some("owner")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "owner".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - maybe_hash: { - let val = *vals - .get(&Some("maybe_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("maybe_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SetMetadata { - owner: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - maybe_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("maybe_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SetMetadata { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetMetadata { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMetadata { owner, maybe_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("owner"), - owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_hash"), - maybe_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetMetadata { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMetadata { owner, maybe_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("owner"), - owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_hash"), - maybe_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMetadata { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SetMetadata", - "owner", - &self.owner, - "maybe_hash", - &&self.maybe_hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetMetadata { - const PALLET: &'static str = "Democracy"; - const CALL: &'static str = "set_metadata"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn propose( - &self, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "propose", - types::Propose { proposal, value }, - [ - 164u8, - 45u8, - 183u8, - 137u8, - 222u8, - 27u8, - 138u8, - 45u8, - 20u8, - 18u8, - 234u8, - 211u8, - 52u8, - 184u8, - 234u8, - 222u8, - 193u8, - 9u8, - 160u8, - 58u8, - 198u8, - 106u8, - 236u8, - 210u8, - 172u8, - 34u8, - 194u8, - 107u8, - 135u8, - 83u8, - 22u8, - 238u8, - ], - ) - } - pub fn second( - &self, - proposal: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "second", - types::Second { proposal }, - [ - 195u8, - 55u8, - 178u8, - 55u8, - 129u8, - 64u8, - 10u8, - 131u8, - 217u8, - 79u8, - 1u8, - 187u8, - 73u8, - 126u8, - 191u8, - 221u8, - 110u8, - 10u8, - 13u8, - 65u8, - 190u8, - 107u8, - 21u8, - 236u8, - 175u8, - 130u8, - 227u8, - 179u8, - 173u8, - 39u8, - 32u8, - 147u8, - ], - ) - } - pub fn vote( - &self, - ref_index: ::core::primitive::u32, - vote: runtime_types::pallet_democracy::vote::AccountVote< - ::core::primitive::u128, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "vote", - types::Vote { ref_index, vote }, - [ - 106u8, - 195u8, - 229u8, - 44u8, - 217u8, - 214u8, - 8u8, - 234u8, - 175u8, - 62u8, - 97u8, - 83u8, - 193u8, - 180u8, - 103u8, - 26u8, - 174u8, - 8u8, - 2u8, - 158u8, - 25u8, - 122u8, - 203u8, - 122u8, - 32u8, - 14u8, - 107u8, - 169u8, - 43u8, - 240u8, - 143u8, - 103u8, - ], - ) - } - pub fn emergency_cancel( - &self, - ref_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "emergency_cancel", - types::EmergencyCancel { - ref_index, - }, - [ - 82u8, - 232u8, - 19u8, - 158u8, - 88u8, - 69u8, - 96u8, - 225u8, - 106u8, - 253u8, - 6u8, - 136u8, - 87u8, - 0u8, - 68u8, - 128u8, - 122u8, - 16u8, - 107u8, - 76u8, - 209u8, - 14u8, - 230u8, - 49u8, - 228u8, - 100u8, - 187u8, - 10u8, - 76u8, - 71u8, - 197u8, - 72u8, - ], - ) - } - pub fn external_propose( - &self, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "external_propose", - types::ExternalPropose { proposal }, - [ - 99u8, - 120u8, - 61u8, - 124u8, - 244u8, - 68u8, - 12u8, - 240u8, - 11u8, - 168u8, - 4u8, - 50u8, - 19u8, - 152u8, - 255u8, - 97u8, - 20u8, - 195u8, - 141u8, - 199u8, - 31u8, - 250u8, - 222u8, - 136u8, - 47u8, - 162u8, - 0u8, - 32u8, - 215u8, - 110u8, - 94u8, - 109u8, - ], - ) - } - pub fn external_propose_majority( - &self, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "external_propose_majority", - types::ExternalProposeMajority { - proposal, - }, - [ - 35u8, - 61u8, - 130u8, - 81u8, - 81u8, - 180u8, - 127u8, - 202u8, - 67u8, - 84u8, - 105u8, - 113u8, - 112u8, - 210u8, - 1u8, - 191u8, - 10u8, - 39u8, - 157u8, - 164u8, - 9u8, - 231u8, - 75u8, - 25u8, - 17u8, - 175u8, - 128u8, - 180u8, - 238u8, - 58u8, - 236u8, - 214u8, - ], - ) - } - pub fn external_propose_default( - &self, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "external_propose_default", - types::ExternalProposeDefault { - proposal, - }, - [ - 136u8, - 199u8, - 244u8, - 69u8, - 5u8, - 174u8, - 166u8, - 251u8, - 102u8, - 196u8, - 25u8, - 6u8, - 33u8, - 216u8, - 141u8, - 78u8, - 118u8, - 125u8, - 128u8, - 218u8, - 120u8, - 170u8, - 166u8, - 15u8, - 124u8, - 216u8, - 128u8, - 178u8, - 5u8, - 74u8, - 170u8, - 25u8, - ], - ) - } - pub fn fast_track( - &self, - proposal_hash: ::subxt::utils::H256, - voting_period: ::core::primitive::u32, - delay: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "fast_track", - types::FastTrack { - proposal_hash, - voting_period, - delay, - }, - [ - 96u8, - 201u8, - 216u8, - 109u8, - 4u8, - 244u8, - 52u8, - 237u8, - 120u8, - 234u8, - 30u8, - 102u8, - 186u8, - 132u8, - 214u8, - 22u8, - 40u8, - 75u8, - 118u8, - 23u8, - 56u8, - 68u8, - 192u8, - 129u8, - 74u8, - 61u8, - 247u8, - 98u8, - 103u8, - 127u8, - 200u8, - 171u8, - ], - ) - } - pub fn veto_external( - &self, - proposal_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "veto_external", - types::VetoExternal { - proposal_hash, - }, - [ - 121u8, - 217u8, - 249u8, - 134u8, - 45u8, - 19u8, - 126u8, - 166u8, - 218u8, - 223u8, - 165u8, - 124u8, - 162u8, - 59u8, - 56u8, - 200u8, - 227u8, - 125u8, - 23u8, - 133u8, - 196u8, - 93u8, - 210u8, - 15u8, - 39u8, - 26u8, - 58u8, - 236u8, - 9u8, - 101u8, - 202u8, - 168u8, - ], - ) - } - pub fn cancel_referendum( - &self, - ref_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "cancel_referendum", - types::CancelReferendum { - ref_index, - }, - [ - 149u8, - 120u8, - 70u8, - 20u8, - 126u8, - 21u8, - 30u8, - 33u8, - 82u8, - 124u8, - 229u8, - 179u8, - 169u8, - 243u8, - 173u8, - 146u8, - 140u8, - 22u8, - 124u8, - 154u8, - 228u8, - 117u8, - 109u8, - 88u8, - 11u8, - 100u8, - 235u8, - 243u8, - 118u8, - 99u8, - 250u8, - 140u8, - ], - ) - } - pub fn delegate( - &self, - to: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - conviction: runtime_types::pallet_democracy::conviction::Conviction, - balance: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "delegate", - types::Delegate { - to, - conviction, - balance, - }, - [ - 98u8, - 120u8, - 223u8, - 48u8, - 181u8, - 91u8, - 232u8, - 157u8, - 124u8, - 249u8, - 137u8, - 195u8, - 211u8, - 199u8, - 173u8, - 118u8, - 164u8, - 196u8, - 253u8, - 53u8, - 214u8, - 120u8, - 138u8, - 7u8, - 129u8, - 85u8, - 217u8, - 172u8, - 98u8, - 78u8, - 165u8, - 37u8, - ], - ) - } - pub fn undelegate(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "undelegate", - types::Undelegate {}, - [ - 225u8, - 156u8, - 102u8, - 1u8, - 172u8, - 145u8, - 88u8, - 12u8, - 89u8, - 32u8, - 51u8, - 83u8, - 25u8, - 149u8, - 132u8, - 203u8, - 246u8, - 98u8, - 155u8, - 36u8, - 165u8, - 206u8, - 233u8, - 169u8, - 91u8, - 85u8, - 105u8, - 67u8, - 46u8, - 134u8, - 244u8, - 250u8, - ], - ) - } - pub fn clear_public_proposals( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "clear_public_proposals", - types::ClearPublicProposals {}, - [ - 116u8, - 160u8, - 246u8, - 216u8, - 23u8, - 188u8, - 144u8, - 63u8, - 97u8, - 198u8, - 11u8, - 243u8, - 165u8, - 84u8, - 159u8, - 153u8, - 235u8, - 169u8, - 166u8, - 15u8, - 23u8, - 116u8, - 30u8, - 56u8, - 133u8, - 31u8, - 158u8, - 114u8, - 158u8, - 86u8, - 106u8, - 93u8, - ], - ) - } - pub fn unlock( - &self, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "unlock", - types::Unlock { target }, - [ - 168u8, - 111u8, - 199u8, - 137u8, - 136u8, - 162u8, - 69u8, - 122u8, - 130u8, - 226u8, - 234u8, - 79u8, - 214u8, - 164u8, - 127u8, - 217u8, - 140u8, - 10u8, - 116u8, - 94u8, - 5u8, - 58u8, - 208u8, - 255u8, - 136u8, - 147u8, - 148u8, - 133u8, - 136u8, - 206u8, - 219u8, - 94u8, - ], - ) - } - pub fn remove_vote( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "remove_vote", - types::RemoveVote { index }, - [ - 98u8, - 146u8, - 215u8, - 63u8, - 222u8, - 70u8, - 61u8, - 186u8, - 90u8, - 34u8, - 63u8, - 25u8, - 195u8, - 119u8, - 228u8, - 189u8, - 38u8, - 163u8, - 58u8, - 210u8, - 216u8, - 156u8, - 20u8, - 204u8, - 136u8, - 192u8, - 33u8, - 210u8, - 124u8, - 65u8, - 153u8, - 105u8, - ], - ) - } - pub fn remove_other_vote( - &self, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "remove_other_vote", - types::RemoveOtherVote { - target, - index, - }, - [ - 144u8, - 81u8, - 115u8, - 108u8, - 30u8, - 235u8, - 166u8, - 115u8, - 147u8, - 56u8, - 144u8, - 196u8, - 252u8, - 166u8, - 201u8, - 131u8, - 0u8, - 193u8, - 21u8, - 234u8, - 55u8, - 253u8, - 165u8, - 149u8, - 38u8, - 47u8, - 241u8, - 140u8, - 186u8, - 139u8, - 227u8, - 165u8, - ], - ) - } - pub fn blacklist( - &self, - proposal_hash: ::subxt::utils::H256, - maybe_ref_index: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "blacklist", - types::Blacklist { - proposal_hash, - maybe_ref_index, - }, - [ - 227u8, - 200u8, - 88u8, - 154u8, - 134u8, - 121u8, - 131u8, - 177u8, - 94u8, - 119u8, - 12u8, - 129u8, - 150u8, - 59u8, - 108u8, - 103u8, - 109u8, - 55u8, - 220u8, - 211u8, - 250u8, - 103u8, - 160u8, - 170u8, - 63u8, - 142u8, - 112u8, - 244u8, - 29u8, - 238u8, - 101u8, - 24u8, - ], - ) - } - pub fn cancel_proposal( - &self, - prop_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "cancel_proposal", - types::CancelProposal { - prop_index, - }, - [ - 213u8, - 5u8, - 215u8, - 209u8, - 71u8, - 229u8, - 66u8, - 38u8, - 171u8, - 38u8, - 14u8, - 103u8, - 248u8, - 176u8, - 217u8, - 143u8, - 234u8, - 89u8, - 110u8, - 250u8, - 3u8, - 190u8, - 151u8, - 74u8, - 55u8, - 58u8, - 249u8, - 138u8, - 25u8, - 191u8, - 55u8, - 142u8, - ], - ) - } - pub fn set_metadata( - &self, - owner: runtime_types::pallet_democracy::types::MetadataOwner, - maybe_hash: ::core::option::Option<::subxt::utils::H256>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Democracy", - "set_metadata", - types::SetMetadata { - owner, - maybe_hash, - }, - [ - 191u8, - 200u8, - 139u8, - 27u8, - 167u8, - 250u8, - 72u8, - 78u8, - 18u8, - 98u8, - 108u8, - 1u8, - 122u8, - 120u8, - 47u8, - 77u8, - 174u8, - 60u8, - 247u8, - 69u8, - 228u8, - 196u8, - 149u8, - 107u8, - 239u8, - 45u8, - 47u8, - 118u8, - 87u8, - 233u8, - 79u8, - 29u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_democracy::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Proposed { - pub proposal_index: ::core::primitive::u32, - pub deposit: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Proposed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Proposed { - proposal_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proposed::proposal_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proposed::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Proposed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deposit), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deposit, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Proposed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Proposed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Proposed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Proposed { - proposal_index: { - let val = *vals - .get(&Some("proposal_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Proposed { - proposal_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Proposed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Proposed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Proposed { proposal_index, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Proposed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Proposed { proposal_index, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Proposed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Proposed", - "proposal_index", - &self.proposal_index, - "deposit", - &&self.deposit, - ) - } - } - impl ::subxt::events::StaticEvent for Proposed { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Proposed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Tabled { - pub proposal_index: ::core::primitive::u32, - pub deposit: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Tabled { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Tabled { - proposal_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Tabled::proposal_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Tabled::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Tabled { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deposit), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deposit, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Tabled {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Tabled { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Tabled; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Tabled { - proposal_index: { - let val = *vals - .get(&Some("proposal_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Tabled { - proposal_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Tabled { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Tabled { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Tabled { proposal_index, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Tabled { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Tabled { proposal_index, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Tabled { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Tabled", - "proposal_index", - &self.proposal_index, - "deposit", - &&self.deposit, - ) - } - } - impl ::subxt::events::StaticEvent for Tabled { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Tabled"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ExternalTabled; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ExternalTabled { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ExternalTabled) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ExternalTabled { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ExternalTabled {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ExternalTabled { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ExternalTabled; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(ExternalTabled) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ExternalTabled { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ExternalTabled { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExternalTabled = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ExternalTabled { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExternalTabled = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ExternalTabled { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "ExternalTabled") - } - } - impl ::subxt::events::StaticEvent for ExternalTabled { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "ExternalTabled"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Started { - pub ref_index: ::core::primitive::u32, - pub threshold: runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Started { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Started { - ref_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Started::ref_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - threshold: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Started::threshold`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Started { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.ref_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.threshold), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.ref_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.threshold, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Started {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Started { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Started; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Started { - ref_index: { - let val = *vals - .get(&Some("ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ref_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Started { - ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Started { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Started { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Started { ref_index, threshold } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Started { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Started { ref_index, threshold } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Started { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Started", - "ref_index", - &self.ref_index, - "threshold", - &&self.threshold, - ) - } - } - impl ::subxt::events::StaticEvent for Started { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Started"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Passed { - pub ref_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Passed { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.ref_index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Passed { ref_index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Passed { - fn from(x: ::subxt::ext::codec::Compact) -> Passed { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Passed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Passed { - ref_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Passed::ref_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Passed { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.ref_index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.ref_index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.ref_index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.ref_index, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Passed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Passed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Passed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Passed { - ref_index: { - let val = *vals - .get(&Some("ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ref_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Passed { - ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Passed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Passed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Passed { ref_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Passed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Passed { ref_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Passed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Passed", - "ref_index", - &&self.ref_index, - ) - } - } - impl ::subxt::events::StaticEvent for Passed { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Passed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NotPassed { - pub ref_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for NotPassed { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.ref_index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - NotPassed, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(NotPassed { ref_index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for NotPassed { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> NotPassed { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NotPassed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(NotPassed { - ref_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotPassed::ref_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NotPassed { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.ref_index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.ref_index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.ref_index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.ref_index, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NotPassed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for NotPassed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NotPassed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(NotPassed { - ref_index: { - let val = *vals - .get(&Some("ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ref_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(NotPassed { - ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for NotPassed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NotPassed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NotPassed { ref_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for NotPassed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NotPassed { ref_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NotPassed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "NotPassed", - "ref_index", - &&self.ref_index, - ) - } - } - impl ::subxt::events::StaticEvent for NotPassed { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "NotPassed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Cancelled { - pub ref_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Cancelled { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.ref_index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - Cancelled, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Cancelled { ref_index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Cancelled { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> Cancelled { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Cancelled { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Cancelled { - ref_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Cancelled::ref_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Cancelled { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.ref_index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.ref_index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.ref_index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.ref_index, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Cancelled {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Cancelled { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Cancelled; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Cancelled { - ref_index: { - let val = *vals - .get(&Some("ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ref_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Cancelled { - ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Cancelled { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Cancelled { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Cancelled { ref_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Cancelled { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Cancelled { ref_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Cancelled { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Cancelled", - "ref_index", - &&self.ref_index, - ) - } - } - impl ::subxt::events::StaticEvent for Cancelled { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Cancelled"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Delegated { - pub who: ::subxt::utils::AccountId32, - pub target: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Delegated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Delegated { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegated::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - target: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegated::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Delegated { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.target), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.target, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Delegated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Delegated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Delegated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Delegated { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Delegated { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Delegated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Delegated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Delegated { who, target } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Delegated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Delegated { who, target } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Delegated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Delegated", - "who", - &self.who, - "target", - &&self.target, - ) - } - } - impl ::subxt::events::StaticEvent for Delegated { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Delegated"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Undelegated { - pub account: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Undelegated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Undelegated { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Undelegated::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Undelegated { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.account) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.account, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.account) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.account, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Undelegated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Undelegated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Undelegated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Undelegated { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Undelegated { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Undelegated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Undelegated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Undelegated { account } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Undelegated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Undelegated { account } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Undelegated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Undelegated", - "account", - &&self.account, - ) - } - } - impl ::subxt::events::StaticEvent for Undelegated { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Undelegated"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vetoed { - pub who: ::subxt::utils::AccountId32, - pub proposal_hash: ::subxt::utils::H256, - pub until: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Vetoed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Vetoed { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Vetoed::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Vetoed::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - until: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Vetoed::until`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Vetoed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.until), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.until, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Vetoed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Vetoed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Vetoed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Vetoed { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - until: { - let val = *vals - .get(&Some("until")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "until".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("until"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Vetoed { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - until: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("until"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Vetoed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Vetoed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vetoed { who, proposal_hash, until } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("until"), - until as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Vetoed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vetoed { who, proposal_hash, until } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("until"), - until as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Vetoed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Vetoed", - "who", - &self.who, - "proposal_hash", - &self.proposal_hash, - "until", - &&self.until, - ) - } - } - impl ::subxt::events::StaticEvent for Vetoed { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Vetoed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Blacklisted { - pub proposal_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Blacklisted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Blacklisted { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Blacklisted::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Blacklisted { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.proposal_hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.proposal_hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.proposal_hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.proposal_hash, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Blacklisted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Blacklisted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Blacklisted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Blacklisted { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Blacklisted { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Blacklisted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Blacklisted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Blacklisted { proposal_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Blacklisted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Blacklisted { proposal_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Blacklisted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Blacklisted", - "proposal_hash", - &&self.proposal_hash, - ) - } - } - impl ::subxt::events::StaticEvent for Blacklisted { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Blacklisted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Voted { - pub voter: ::subxt::utils::AccountId32, - pub ref_index: ::core::primitive::u32, - pub vote: runtime_types::pallet_democracy::vote::AccountVote< - ::core::primitive::u128, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Voted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Voted { - voter: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voted::voter`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ref_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voted::ref_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - vote: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voted::vote`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Voted { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.voter), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.ref_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.vote), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.voter, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.ref_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.vote, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Voted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Voted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Voted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Voted { - voter: { - let val = *vals - .get(&Some("voter")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "voter".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("voter"))? - }, - ref_index: { - let val = *vals - .get(&Some("ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ref_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - vote: { - let val = *vals - .get(&Some("vote")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "vote".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("vote"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Voted { - voter: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("voter"))? - }, - ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - vote: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("vote"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Voted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Voted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Voted { voter, ref_index, vote } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("voter"), - voter as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("vote"), - vote as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Voted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Voted { voter, ref_index, vote } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("voter"), - voter as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("vote"), - vote as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Voted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Voted", - "voter", - &self.voter, - "ref_index", - &self.ref_index, - "vote", - &&self.vote, - ) - } - } - impl ::subxt::events::StaticEvent for Voted { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Voted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Seconded { - pub seconder: ::subxt::utils::AccountId32, - pub prop_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Seconded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Seconded { - seconder: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Seconded::seconder`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - prop_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Seconded::prop_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Seconded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.seconder), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.prop_index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.seconder, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.prop_index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Seconded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Seconded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Seconded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Seconded { - seconder: { - let val = *vals - .get(&Some("seconder")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "seconder".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("seconder"))? - }, - prop_index: { - let val = *vals - .get(&Some("prop_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prop_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prop_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Seconded { - seconder: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("seconder"))? - }, - prop_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prop_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Seconded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Seconded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Seconded { seconder, prop_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("seconder"), - seconder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prop_index"), - prop_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Seconded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Seconded { seconder, prop_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("seconder"), - seconder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prop_index"), - prop_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Seconded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Seconded", - "seconder", - &self.seconder, - "prop_index", - &&self.prop_index, - ) - } - } - impl ::subxt::events::StaticEvent for Seconded { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Seconded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProposalCanceled { - pub prop_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for ProposalCanceled { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.prop_index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - ProposalCanceled, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ProposalCanceled { - prop_index: x, - }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for ProposalCanceled { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> ProposalCanceled { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ProposalCanceled { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ProposalCanceled { - prop_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProposalCanceled::prop_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ProposalCanceled { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.prop_index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.prop_index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.prop_index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.prop_index, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ProposalCanceled {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ProposalCanceled { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ProposalCanceled; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ProposalCanceled { - prop_index: { - let val = *vals - .get(&Some("prop_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prop_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prop_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ProposalCanceled { - prop_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prop_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ProposalCanceled { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ProposalCanceled { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProposalCanceled { prop_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("prop_index"), - prop_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ProposalCanceled { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProposalCanceled { prop_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("prop_index"), - prop_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ProposalCanceled { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ProposalCanceled", - "prop_index", - &&self.prop_index, - ) - } - } - impl ::subxt::events::StaticEvent for ProposalCanceled { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "ProposalCanceled"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MetadataSet { - pub owner: runtime_types::pallet_democracy::types::MetadataOwner, - pub hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MetadataSet { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MetadataSet { - owner: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MetadataSet::owner`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MetadataSet::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MetadataSet { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.owner), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.hash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.owner, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MetadataSet {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MetadataSet { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MetadataSet; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MetadataSet { - owner: { - let val = *vals - .get(&Some("owner")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "owner".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(MetadataSet { - owner: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for MetadataSet { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MetadataSet { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MetadataSet { owner, hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("owner"), - owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MetadataSet { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MetadataSet { owner, hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("owner"), - owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MetadataSet { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MetadataSet", - "owner", - &self.owner, - "hash", - &&self.hash, - ) - } - } - impl ::subxt::events::StaticEvent for MetadataSet { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "MetadataSet"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MetadataCleared { - pub owner: runtime_types::pallet_democracy::types::MetadataOwner, - pub hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MetadataCleared { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MetadataCleared { - owner: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MetadataCleared::owner`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MetadataCleared::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MetadataCleared { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.owner), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.hash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.owner, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MetadataCleared {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MetadataCleared { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MetadataCleared; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MetadataCleared { - owner: { - let val = *vals - .get(&Some("owner")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "owner".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(MetadataCleared { - owner: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for MetadataCleared { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MetadataCleared { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MetadataCleared { owner, hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("owner"), - owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MetadataCleared { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MetadataCleared { owner, hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("owner"), - owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MetadataCleared { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MetadataCleared", - "owner", - &self.owner, - "hash", - &&self.hash, - ) - } - } - impl ::subxt::events::StaticEvent for MetadataCleared { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "MetadataCleared"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MetadataTransferred { - pub prev_owner: runtime_types::pallet_democracy::types::MetadataOwner, - pub owner: runtime_types::pallet_democracy::types::MetadataOwner, - pub hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MetadataTransferred { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MetadataTransferred { - prev_owner: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `MetadataTransferred::prev_owner`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - owner: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MetadataTransferred::owner`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MetadataTransferred::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MetadataTransferred { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.prev_owner), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.owner), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.hash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.prev_owner, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.owner, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MetadataTransferred {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for MetadataTransferred { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MetadataTransferred; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MetadataTransferred { - prev_owner: { - let val = *vals - .get(&Some("prev_owner")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prev_owner".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prev_owner"))? - }, - owner: { - let val = *vals - .get(&Some("owner")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "owner".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(MetadataTransferred { - prev_owner: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prev_owner"))? - }, - owner: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for MetadataTransferred { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MetadataTransferred { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MetadataTransferred { prev_owner, owner, hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("prev_owner"), - prev_owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("owner"), - owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MetadataTransferred { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MetadataTransferred { prev_owner, owner, hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("prev_owner"), - prev_owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("owner"), - owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MetadataTransferred { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "MetadataTransferred", - "prev_owner", - &self.prev_owner, - "owner", - &self.owner, - "hash", - &&self.hash, - ) - } - } - impl ::subxt::events::StaticEvent for MetadataTransferred { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "MetadataTransferred"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn public_prop_count( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "PublicPropCount", - ::alloc::vec::Vec::new(), - [ - 51u8, - 175u8, - 184u8, - 94u8, - 91u8, - 212u8, - 100u8, - 108u8, - 127u8, - 162u8, - 233u8, - 137u8, - 12u8, - 209u8, - 29u8, - 130u8, - 125u8, - 179u8, - 208u8, - 160u8, - 173u8, - 149u8, - 12u8, - 111u8, - 1u8, - 82u8, - 196u8, - 137u8, - 51u8, - 204u8, - 153u8, - 198u8, - ], - ) - } - pub fn public_props( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - ::core::primitive::u32, - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - ::subxt::utils::AccountId32, - ), - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "PublicProps", - ::alloc::vec::Vec::new(), - [ - 174u8, - 85u8, - 209u8, - 117u8, - 29u8, - 193u8, - 230u8, - 16u8, - 94u8, - 219u8, - 69u8, - 29u8, - 116u8, - 35u8, - 252u8, - 43u8, - 127u8, - 0u8, - 43u8, - 218u8, - 240u8, - 176u8, - 73u8, - 81u8, - 207u8, - 131u8, - 227u8, - 132u8, - 242u8, - 45u8, - 172u8, - 50u8, - ], - ) - } - pub fn deposit_of_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - ::core::primitive::u128, - ), - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "DepositOf", - ::alloc::vec::Vec::new(), - [ - 115u8, - 12u8, - 250u8, - 191u8, - 201u8, - 165u8, - 90u8, - 140u8, - 101u8, - 47u8, - 46u8, - 3u8, - 78u8, - 30u8, - 180u8, - 22u8, - 28u8, - 154u8, - 36u8, - 99u8, - 255u8, - 84u8, - 33u8, - 21u8, - 65u8, - 110u8, - 52u8, - 245u8, - 19u8, - 6u8, - 104u8, - 167u8, - ], - ) - } - pub fn deposit_of( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - ::core::primitive::u128, - ), - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "DepositOf", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 115u8, - 12u8, - 250u8, - 191u8, - 201u8, - 165u8, - 90u8, - 140u8, - 101u8, - 47u8, - 46u8, - 3u8, - 78u8, - 30u8, - 180u8, - 22u8, - 28u8, - 154u8, - 36u8, - 99u8, - 255u8, - 84u8, - 33u8, - 21u8, - 65u8, - 110u8, - 52u8, - 245u8, - 19u8, - 6u8, - 104u8, - 167u8, - ], - ) - } - pub fn referendum_count( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "ReferendumCount", - ::alloc::vec::Vec::new(), - [ - 64u8, - 145u8, - 232u8, - 153u8, - 121u8, - 87u8, - 128u8, - 253u8, - 170u8, - 192u8, - 139u8, - 18u8, - 0u8, - 33u8, - 243u8, - 11u8, - 238u8, - 222u8, - 244u8, - 5u8, - 247u8, - 198u8, - 149u8, - 31u8, - 122u8, - 208u8, - 86u8, - 179u8, - 166u8, - 167u8, - 93u8, - 67u8, - ], - ) - } - pub fn lowest_unbaked( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "LowestUnbaked", - ::alloc::vec::Vec::new(), - [ - 237u8, - 222u8, - 144u8, - 214u8, - 0u8, - 186u8, - 81u8, - 176u8, - 51u8, - 14u8, - 204u8, - 184u8, - 147u8, - 97u8, - 187u8, - 84u8, - 40u8, - 8u8, - 86u8, - 241u8, - 16u8, - 157u8, - 202u8, - 44u8, - 185u8, - 111u8, - 70u8, - 114u8, - 40u8, - 135u8, - 1u8, - 155u8, - ], - ) - } - pub fn referendum_info_of_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_democracy::types::ReferendumInfo< - ::core::primitive::u32, - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - ::core::primitive::u128, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "ReferendumInfoOf", - ::alloc::vec::Vec::new(), - [ - 245u8, - 152u8, - 149u8, - 236u8, - 59u8, - 164u8, - 120u8, - 142u8, - 130u8, - 25u8, - 119u8, - 158u8, - 103u8, - 140u8, - 203u8, - 213u8, - 110u8, - 151u8, - 137u8, - 226u8, - 186u8, - 130u8, - 233u8, - 245u8, - 145u8, - 145u8, - 140u8, - 54u8, - 222u8, - 219u8, - 234u8, - 206u8, - ], - ) - } - pub fn referendum_info_of( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_democracy::types::ReferendumInfo< - ::core::primitive::u32, - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - ::core::primitive::u128, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "ReferendumInfoOf", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 245u8, - 152u8, - 149u8, - 236u8, - 59u8, - 164u8, - 120u8, - 142u8, - 130u8, - 25u8, - 119u8, - 158u8, - 103u8, - 140u8, - 203u8, - 213u8, - 110u8, - 151u8, - 137u8, - 226u8, - 186u8, - 130u8, - 233u8, - 245u8, - 145u8, - 145u8, - 140u8, - 54u8, - 222u8, - 219u8, - 234u8, - 206u8, - ], - ) - } - pub fn voting_of_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_democracy::vote::Voting< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "VotingOf", - ::alloc::vec::Vec::new(), - [ - 234u8, - 35u8, - 206u8, - 197u8, - 17u8, - 251u8, - 1u8, - 230u8, - 80u8, - 235u8, - 108u8, - 126u8, - 82u8, - 145u8, - 39u8, - 104u8, - 209u8, - 16u8, - 209u8, - 52u8, - 165u8, - 231u8, - 110u8, - 92u8, - 113u8, - 212u8, - 72u8, - 57u8, - 60u8, - 73u8, - 107u8, - 118u8, - ], - ) - } - pub fn voting_of( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_democracy::vote::Voting< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "VotingOf", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 234u8, - 35u8, - 206u8, - 197u8, - 17u8, - 251u8, - 1u8, - 230u8, - 80u8, - 235u8, - 108u8, - 126u8, - 82u8, - 145u8, - 39u8, - 104u8, - 209u8, - 16u8, - 209u8, - 52u8, - 165u8, - 231u8, - 110u8, - 92u8, - 113u8, - 212u8, - 72u8, - 57u8, - 60u8, - 73u8, - 107u8, - 118u8, - ], - ) - } - pub fn last_tabled_was_external( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::bool, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "LastTabledWasExternal", - ::alloc::vec::Vec::new(), - [ - 162u8, - 201u8, - 72u8, - 9u8, - 78u8, - 49u8, - 72u8, - 62u8, - 240u8, - 69u8, - 20u8, - 135u8, - 26u8, - 59u8, - 71u8, - 46u8, - 19u8, - 25u8, - 195u8, - 11u8, - 99u8, - 31u8, - 104u8, - 4u8, - 24u8, - 129u8, - 47u8, - 69u8, - 219u8, - 178u8, - 104u8, - 190u8, - ], - ) - } - pub fn next_external( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - ), - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "NextExternal", - ::alloc::vec::Vec::new(), - [ - 240u8, - 58u8, - 238u8, - 86u8, - 35u8, - 48u8, - 192u8, - 51u8, - 91u8, - 4u8, - 47u8, - 202u8, - 21u8, - 74u8, - 158u8, - 64u8, - 107u8, - 247u8, - 248u8, - 240u8, - 122u8, - 109u8, - 204u8, - 180u8, - 103u8, - 239u8, - 156u8, - 68u8, - 141u8, - 253u8, - 131u8, - 239u8, - ], - ) - } - pub fn blacklist_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - ::core::primitive::u32, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - ), - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "Blacklist", - ::alloc::vec::Vec::new(), - [ - 12u8, - 231u8, - 204u8, - 151u8, - 57u8, - 182u8, - 5u8, - 74u8, - 231u8, - 100u8, - 165u8, - 28u8, - 147u8, - 109u8, - 119u8, - 37u8, - 138u8, - 159u8, - 7u8, - 175u8, - 41u8, - 110u8, - 205u8, - 69u8, - 17u8, - 9u8, - 39u8, - 102u8, - 90u8, - 244u8, - 165u8, - 141u8, - ], - ) - } - pub fn blacklist( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - ::core::primitive::u32, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - ), - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "Blacklist", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 12u8, - 231u8, - 204u8, - 151u8, - 57u8, - 182u8, - 5u8, - 74u8, - 231u8, - 100u8, - 165u8, - 28u8, - 147u8, - 109u8, - 119u8, - 37u8, - 138u8, - 159u8, - 7u8, - 175u8, - 41u8, - 110u8, - 205u8, - 69u8, - 17u8, - 9u8, - 39u8, - 102u8, - 90u8, - 244u8, - 165u8, - 141u8, - ], - ) - } - pub fn cancellations_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::bool, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "Cancellations", - ::alloc::vec::Vec::new(), - [ - 80u8, - 190u8, - 98u8, - 105u8, - 129u8, - 25u8, - 167u8, - 180u8, - 74u8, - 128u8, - 232u8, - 29u8, - 193u8, - 209u8, - 185u8, - 60u8, - 18u8, - 180u8, - 59u8, - 192u8, - 149u8, - 13u8, - 123u8, - 232u8, - 34u8, - 208u8, - 48u8, - 104u8, - 35u8, - 181u8, - 186u8, - 244u8, - ], - ) - } - pub fn cancellations( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::bool, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "Cancellations", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 80u8, - 190u8, - 98u8, - 105u8, - 129u8, - 25u8, - 167u8, - 180u8, - 74u8, - 128u8, - 232u8, - 29u8, - 193u8, - 209u8, - 185u8, - 60u8, - 18u8, - 180u8, - 59u8, - 192u8, - 149u8, - 13u8, - 123u8, - 232u8, - 34u8, - 208u8, - 48u8, - 104u8, - 35u8, - 181u8, - 186u8, - 244u8, - ], - ) - } - pub fn metadata_of_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::H256, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "MetadataOf", - ::alloc::vec::Vec::new(), - [ - 52u8, - 151u8, - 124u8, - 110u8, - 85u8, - 173u8, - 181u8, - 86u8, - 174u8, - 183u8, - 102u8, - 22u8, - 8u8, - 36u8, - 224u8, - 114u8, - 98u8, - 0u8, - 220u8, - 215u8, - 19u8, - 147u8, - 32u8, - 238u8, - 242u8, - 187u8, - 235u8, - 163u8, - 183u8, - 235u8, - 9u8, - 180u8, - ], - ) - } - pub fn metadata_of( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::pallet_democracy::types::MetadataOwner, - >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::H256, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Democracy", - "MetadataOf", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 52u8, - 151u8, - 124u8, - 110u8, - 85u8, - 173u8, - 181u8, - 86u8, - 174u8, - 183u8, - 102u8, - 22u8, - 8u8, - 36u8, - 224u8, - 114u8, - 98u8, - 0u8, - 220u8, - 215u8, - 19u8, - 147u8, - 32u8, - 238u8, - 242u8, - 187u8, - 235u8, - 163u8, - 183u8, - 235u8, - 9u8, - 180u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn enactment_period( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "EnactmentPeriod", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn launch_period( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "LaunchPeriod", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn voting_period( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "VotingPeriod", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn vote_locking_period( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "VoteLockingPeriod", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn minimum_deposit( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Democracy", - "MinimumDeposit", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn instant_allowed( - &self, - ) -> ::subxt::constants::Address<::core::primitive::bool> { - ::subxt::constants::Address::new_static( - "Democracy", - "InstantAllowed", - [ - 165u8, - 28u8, - 112u8, - 190u8, - 18u8, - 129u8, - 182u8, - 206u8, - 237u8, - 1u8, - 68u8, - 252u8, - 125u8, - 234u8, - 185u8, - 50u8, - 149u8, - 164u8, - 47u8, - 126u8, - 134u8, - 100u8, - 14u8, - 86u8, - 209u8, - 39u8, - 20u8, - 4u8, - 233u8, - 115u8, - 102u8, - 131u8, - ], - ) - } - pub fn fast_track_voting_period( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "FastTrackVotingPeriod", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn cooloff_period( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "CooloffPeriod", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn max_votes( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "MaxVotes", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn max_proposals( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "MaxProposals", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn max_deposits( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "MaxDeposits", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn max_blacklisted( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Democracy", - "MaxBlacklisted", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod council { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_collective::pallet::Error; - pub type Call = runtime_types::pallet_collective::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMembers { - pub new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub prime: ::core::option::Option<::subxt::utils::AccountId32>, - pub old_count: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetMembers { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMembers { - new_members: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMembers::new_members`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - prime: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMembers::prime`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - old_count: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMembers::old_count`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetMembers { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new_members), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.prime), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.old_count), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.new_members, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.prime, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.old_count, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetMembers {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetMembers { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMembers; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMembers { - new_members: { - let val = *vals - .get(&Some("new_members")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_members".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_members"))? - }, - prime: { - let val = *vals - .get(&Some("prime")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prime".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prime"))? - }, - old_count: { - let val = *vals - .get(&Some("old_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "old_count".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("old_count"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(SetMembers { - new_members: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_members"))? - }, - prime: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prime"))? - }, - old_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("old_count"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SetMembers { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetMembers { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMembers { new_members, prime, old_count } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new_members"), - new_members as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prime"), - prime as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("old_count"), - old_count as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetMembers { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMembers { new_members, prime, old_count } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new_members"), - new_members as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prime"), - prime as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("old_count"), - old_count as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMembers { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SetMembers", - "new_members", - &self.new_members, - "prime", - &self.prime, - "old_count", - &&self.old_count, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetMembers { - const PALLET: &'static str = "Council"; - const CALL: &'static str = "set_members"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Execute { - pub proposal: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Execute { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Execute { - proposal: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Execute::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - length_bound: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Execute::length_bound`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Execute { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.length_bound), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.length_bound), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Execute {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Execute { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Execute; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Execute { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - length_bound: { - let val = *vals - .get(&Some("length_bound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "length_bound".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Execute { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - length_bound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Execute { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Execute { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Execute { proposal, length_bound } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Execute { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Execute { proposal, length_bound } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Execute { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Execute", - "proposal", - &self.proposal, - "length_bound", - &&self.length_bound, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Execute { - const PALLET: &'static str = "Council"; - const CALL: &'static str = "execute"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Propose { - #[codec(compact)] - pub threshold: ::core::primitive::u32, - pub proposal: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Propose { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Propose { - threshold: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Propose::threshold`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - proposal: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Propose::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - length_bound: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Propose::length_bound`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Propose { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.threshold), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.length_bound), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.threshold), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.proposal, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.length_bound), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Propose {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Propose { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Propose; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Propose { - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - length_bound: { - let val = *vals - .get(&Some("length_bound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "length_bound".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Propose { - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - length_bound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Propose { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Propose { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Propose { threshold, proposal, length_bound } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Propose { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Propose { threshold, proposal, length_bound } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Propose { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Propose", - "threshold", - &self.threshold, - "proposal", - &self.proposal, - "length_bound", - &&self.length_bound, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Propose { - const PALLET: &'static str = "Council"; - const CALL: &'static str = "propose"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote { - pub proposal: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - pub approve: ::core::primitive::bool, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Vote { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Vote { - proposal: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Vote::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Vote::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - approve: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Vote::approve`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Vote { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.approve), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.approve, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Vote {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Vote { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Vote; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Vote { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - approve: { - let val = *vals - .get(&Some("approve")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "approve".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("approve"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Vote { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - approve: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("approve"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Vote { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Vote { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vote { proposal, index, approve } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("approve"), - approve as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Vote { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vote { proposal, index, approve } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("approve"), - approve as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Vote { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Vote", - "proposal", - &self.proposal, - "index", - &self.index, - "approve", - &&self.approve, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Vote { - const PALLET: &'static str = "Council"; - const CALL: &'static str = "vote"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DisapproveProposal { - pub proposal_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DisapproveProposal { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(DisapproveProposal { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `DisapproveProposal::proposal_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DisapproveProposal { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.proposal_hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.proposal_hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.proposal_hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.proposal_hash, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DisapproveProposal {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for DisapproveProposal { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DisapproveProposal; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DisapproveProposal { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(DisapproveProposal { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for DisapproveProposal { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for DisapproveProposal { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DisapproveProposal { proposal_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for DisapproveProposal { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DisapproveProposal { proposal_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DisapproveProposal { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "DisapproveProposal", - "proposal_hash", - &&self.proposal_hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for DisapproveProposal { - const PALLET: &'static str = "Council"; - const CALL: &'static str = "disapprove_proposal"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Close { - pub proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - pub proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Close { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Close { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Close::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Close::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - proposal_weight_bound: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Close::proposal_weight_bound`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - length_bound: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Close::length_bound`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Close { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.proposal_weight_bound, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.length_bound), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_hash, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_weight_bound, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.length_bound), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Close {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Close { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Close; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Close { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - proposal_weight_bound: { - let val = *vals - .get(&Some("proposal_weight_bound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_weight_bound".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_weight_bound"))? - }, - length_bound: { - let val = *vals - .get(&Some("length_bound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "length_bound".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(Close { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - proposal_weight_bound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_weight_bound"))? - }, - length_bound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Close { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Close { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Close { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_weight_bound"), - proposal_weight_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Close { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Close { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_weight_bound"), - proposal_weight_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Close { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Close", - "proposal_hash", - &self.proposal_hash, - "index", - &self.index, - "proposal_weight_bound", - &self.proposal_weight_bound, - "length_bound", - &&self.length_bound, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Close { - const PALLET: &'static str = "Council"; - const CALL: &'static str = "close"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn set_members( - &self, - new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, - prime: ::core::option::Option<::subxt::utils::AccountId32>, - old_count: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Council", - "set_members", - types::SetMembers { - new_members, - prime, - old_count, - }, - [ - 66u8, - 224u8, - 186u8, - 178u8, - 41u8, - 208u8, - 67u8, - 192u8, - 57u8, - 242u8, - 141u8, - 31u8, - 216u8, - 118u8, - 192u8, - 43u8, - 125u8, - 213u8, - 226u8, - 85u8, - 142u8, - 225u8, - 131u8, - 45u8, - 172u8, - 142u8, - 12u8, - 9u8, - 73u8, - 7u8, - 218u8, - 61u8, - ], - ) - } - pub fn execute( - &self, - proposal: runtime_types::polkadot_runtime::RuntimeCall, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Council", - "execute", - types::Execute { - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }, - [ - 133u8, - 165u8, - 196u8, - 168u8, - 123u8, - 181u8, - 94u8, - 202u8, - 148u8, - 229u8, - 228u8, - 128u8, - 109u8, - 130u8, - 11u8, - 162u8, - 223u8, - 46u8, - 69u8, - 59u8, - 230u8, - 20u8, - 230u8, - 107u8, - 17u8, - 12u8, - 33u8, - 149u8, - 153u8, - 157u8, - 33u8, - 51u8, - ], - ) - } - pub fn propose( - &self, - threshold: ::core::primitive::u32, - proposal: runtime_types::polkadot_runtime::RuntimeCall, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Council", - "propose", - types::Propose { - threshold, - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }, - [ - 25u8, - 57u8, - 92u8, - 114u8, - 27u8, - 54u8, - 48u8, - 110u8, - 212u8, - 40u8, - 3u8, - 205u8, - 62u8, - 245u8, - 179u8, - 78u8, - 17u8, - 165u8, - 1u8, - 228u8, - 98u8, - 17u8, - 32u8, - 55u8, - 225u8, - 239u8, - 19u8, - 11u8, - 60u8, - 44u8, - 101u8, - 25u8, - ], - ) - } - pub fn vote( - &self, - proposal: ::subxt::utils::H256, - index: ::core::primitive::u32, - approve: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Council", - "vote", - types::Vote { - proposal, - index, - approve, - }, - [ - 110u8, - 141u8, - 24u8, - 33u8, - 91u8, - 7u8, - 89u8, - 198u8, - 54u8, - 10u8, - 76u8, - 129u8, - 45u8, - 20u8, - 216u8, - 104u8, - 231u8, - 246u8, - 174u8, - 205u8, - 190u8, - 176u8, - 171u8, - 113u8, - 33u8, - 37u8, - 155u8, - 203u8, - 251u8, - 34u8, - 25u8, - 120u8, - ], - ) - } - pub fn disapprove_proposal( - &self, - proposal_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Council", - "disapprove_proposal", - types::DisapproveProposal { - proposal_hash, - }, - [ - 26u8, - 140u8, - 111u8, - 193u8, - 229u8, - 59u8, - 53u8, - 196u8, - 230u8, - 60u8, - 7u8, - 155u8, - 168u8, - 7u8, - 201u8, - 177u8, - 70u8, - 103u8, - 190u8, - 57u8, - 244u8, - 156u8, - 67u8, - 101u8, - 228u8, - 6u8, - 213u8, - 83u8, - 225u8, - 95u8, - 148u8, - 96u8, - ], - ) - } - pub fn close( - &self, - proposal_hash: ::subxt::utils::H256, - index: ::core::primitive::u32, - proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Council", - "close", - types::Close { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - }, - [ - 136u8, - 48u8, - 243u8, - 34u8, - 60u8, - 109u8, - 186u8, - 158u8, - 72u8, - 48u8, - 62u8, - 34u8, - 167u8, - 46u8, - 33u8, - 142u8, - 239u8, - 43u8, - 238u8, - 125u8, - 94u8, - 80u8, - 157u8, - 245u8, - 220u8, - 126u8, - 58u8, - 244u8, - 186u8, - 195u8, - 30u8, - 127u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_collective::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Proposed { - pub account: ::subxt::utils::AccountId32, - pub proposal_index: ::core::primitive::u32, - pub proposal_hash: ::subxt::utils::H256, - pub threshold: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Proposed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Proposed { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proposed::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proposed::proposal_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proposed::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - threshold: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proposed::threshold`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Proposed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.threshold), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.threshold, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Proposed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Proposed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Proposed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Proposed { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - proposal_index: { - let val = *vals - .get(&Some("proposal_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(Proposed { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - proposal_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Proposed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Proposed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Proposed { - account, - proposal_index, - proposal_hash, - threshold, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Proposed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Proposed { - account, - proposal_index, - proposal_hash, - threshold, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Proposed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Proposed", - "account", - &self.account, - "proposal_index", - &self.proposal_index, - "proposal_hash", - &self.proposal_hash, - "threshold", - &&self.threshold, - ) - } - } - impl ::subxt::events::StaticEvent for Proposed { - const PALLET: &'static str = "Council"; - const EVENT: &'static str = "Proposed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Voted { - pub account: ::subxt::utils::AccountId32, - pub proposal_hash: ::subxt::utils::H256, - pub voted: ::core::primitive::bool, - pub yes: ::core::primitive::u32, - pub no: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Voted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Voted { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voted::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voted::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - voted: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voted::voted`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - yes: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voted::yes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - no: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voted::no`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Voted { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.voted), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.yes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.no), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.voted, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.yes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.no, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Voted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Voted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Voted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Voted { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - voted: { - let val = *vals - .get(&Some("voted")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "voted".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("voted"))? - }, - yes: { - let val = *vals - .get(&Some("yes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "yes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("yes"))? - }, - no: { - let val = *vals - .get(&Some("no")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "no".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("no"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(Voted { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - voted: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("voted"))? - }, - yes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("yes"))? - }, - no: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("no"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Voted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Voted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Voted { account, proposal_hash, voted, yes, no } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("voted"), - voted as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("yes"), - yes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("no"), - no as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Voted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Voted { account, proposal_hash, voted, yes, no } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("voted"), - voted as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("yes"), - yes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("no"), - no as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Voted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "Voted", - "account", - &self.account, - "proposal_hash", - &self.proposal_hash, - "voted", - &self.voted, - "yes", - &self.yes, - "no", - &&self.no, - ) - } - } - impl ::subxt::events::StaticEvent for Voted { - const PALLET: &'static str = "Council"; - const EVENT: &'static str = "Voted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Approved { - pub proposal_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Approved { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Approved { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Approved::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Approved { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.proposal_hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.proposal_hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.proposal_hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.proposal_hash, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Approved {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Approved { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Approved; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Approved { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Approved { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Approved { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Approved { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Approved { proposal_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Approved { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Approved { proposal_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Approved { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Approved", - "proposal_hash", - &&self.proposal_hash, - ) - } - } - impl ::subxt::events::StaticEvent for Approved { - const PALLET: &'static str = "Council"; - const EVENT: &'static str = "Approved"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Disapproved { - pub proposal_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Disapproved { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Disapproved { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Disapproved::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Disapproved { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.proposal_hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.proposal_hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.proposal_hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.proposal_hash, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Disapproved {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Disapproved { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Disapproved; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Disapproved { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Disapproved { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Disapproved { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Disapproved { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Disapproved { proposal_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Disapproved { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Disapproved { proposal_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Disapproved { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Disapproved", - "proposal_hash", - &&self.proposal_hash, - ) - } - } - impl ::subxt::events::StaticEvent for Disapproved { - const PALLET: &'static str = "Council"; - const EVENT: &'static str = "Disapproved"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Executed { - pub proposal_hash: ::subxt::utils::H256, - pub result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Executed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Executed { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Executed::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Executed::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Executed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.result), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.result, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Executed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Executed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Executed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Executed { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Executed { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Executed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Executed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Executed { proposal_hash, result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Executed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Executed { proposal_hash, result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Executed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Executed", - "proposal_hash", - &self.proposal_hash, - "result", - &&self.result, - ) - } - } - impl ::subxt::events::StaticEvent for Executed { - const PALLET: &'static str = "Council"; - const EVENT: &'static str = "Executed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MemberExecuted { - pub proposal_hash: ::subxt::utils::H256, - pub result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MemberExecuted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MemberExecuted { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MemberExecuted::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MemberExecuted::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MemberExecuted { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.result), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.result, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MemberExecuted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MemberExecuted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MemberExecuted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MemberExecuted { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(MemberExecuted { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for MemberExecuted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MemberExecuted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MemberExecuted { proposal_hash, result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MemberExecuted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MemberExecuted { proposal_hash, result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MemberExecuted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MemberExecuted", - "proposal_hash", - &self.proposal_hash, - "result", - &&self.result, - ) - } - } - impl ::subxt::events::StaticEvent for MemberExecuted { - const PALLET: &'static str = "Council"; - const EVENT: &'static str = "MemberExecuted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Closed { - pub proposal_hash: ::subxt::utils::H256, - pub yes: ::core::primitive::u32, - pub no: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Closed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Closed { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Closed::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - yes: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Closed::yes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - no: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Closed::no`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Closed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.yes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.no), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.yes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.no, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Closed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Closed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Closed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Closed { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - yes: { - let val = *vals - .get(&Some("yes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "yes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("yes"))? - }, - no: { - let val = *vals - .get(&Some("no")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "no".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("no"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Closed { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - yes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("yes"))? - }, - no: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("no"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Closed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Closed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Closed { proposal_hash, yes, no } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("yes"), - yes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("no"), - no as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Closed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Closed { proposal_hash, yes, no } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("yes"), - yes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("no"), - no as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Closed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Closed", - "proposal_hash", - &self.proposal_hash, - "yes", - &self.yes, - "no", - &&self.no, - ) - } - } - impl ::subxt::events::StaticEvent for Closed { - const PALLET: &'static str = "Council"; - const EVENT: &'static str = "Closed"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn proposals( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::subxt::utils::H256, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Council", - "Proposals", - ::alloc::vec::Vec::new(), - [ - 210u8, - 234u8, - 7u8, - 29u8, - 231u8, - 80u8, - 17u8, - 36u8, - 189u8, - 34u8, - 175u8, - 147u8, - 56u8, - 92u8, - 201u8, - 104u8, - 207u8, - 150u8, - 58u8, - 110u8, - 90u8, - 28u8, - 198u8, - 79u8, - 236u8, - 245u8, - 19u8, - 38u8, - 68u8, - 59u8, - 215u8, - 74u8, - ], - ) - } - pub fn proposal_of_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime::RuntimeCall, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Council", - "ProposalOf", - ::alloc::vec::Vec::new(), - [ - 171u8, - 23u8, - 148u8, - 102u8, - 126u8, - 171u8, - 7u8, - 15u8, - 90u8, - 246u8, - 143u8, - 125u8, - 45u8, - 113u8, - 59u8, - 154u8, - 62u8, - 110u8, - 136u8, - 25u8, - 157u8, - 31u8, - 42u8, - 178u8, - 213u8, - 151u8, - 73u8, - 4u8, - 117u8, - 27u8, - 62u8, - 232u8, - ], - ) - } - pub fn proposal_of( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime::RuntimeCall, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Council", - "ProposalOf", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 171u8, - 23u8, - 148u8, - 102u8, - 126u8, - 171u8, - 7u8, - 15u8, - 90u8, - 246u8, - 143u8, - 125u8, - 45u8, - 113u8, - 59u8, - 154u8, - 62u8, - 110u8, - 136u8, - 25u8, - 157u8, - 31u8, - 42u8, - 178u8, - 213u8, - 151u8, - 73u8, - 4u8, - 117u8, - 27u8, - 62u8, - 232u8, - ], - ) - } - pub fn voting_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_collective::Votes< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Council", - "Voting", - ::alloc::vec::Vec::new(), - [ - 109u8, - 198u8, - 2u8, - 13u8, - 29u8, - 14u8, - 241u8, - 217u8, - 55u8, - 147u8, - 147u8, - 4u8, - 176u8, - 69u8, - 132u8, - 228u8, - 158u8, - 203u8, - 110u8, - 239u8, - 158u8, - 137u8, - 97u8, - 46u8, - 228u8, - 118u8, - 251u8, - 201u8, - 88u8, - 208u8, - 94u8, - 132u8, - ], - ) - } - pub fn voting( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_collective::Votes< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Council", - "Voting", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 109u8, - 198u8, - 2u8, - 13u8, - 29u8, - 14u8, - 241u8, - 217u8, - 55u8, - 147u8, - 147u8, - 4u8, - 176u8, - 69u8, - 132u8, - 228u8, - 158u8, - 203u8, - 110u8, - 239u8, - 158u8, - 137u8, - 97u8, - 46u8, - 228u8, - 118u8, - 251u8, - 201u8, - 88u8, - 208u8, - 94u8, - 132u8, - ], - ) - } - pub fn proposal_count( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Council", - "ProposalCount", - ::alloc::vec::Vec::new(), - [ - 91u8, - 238u8, - 246u8, - 106u8, - 95u8, - 66u8, - 83u8, - 134u8, - 1u8, - 225u8, - 164u8, - 216u8, - 113u8, - 101u8, - 203u8, - 200u8, - 113u8, - 97u8, - 246u8, - 228u8, - 140u8, - 29u8, - 29u8, - 48u8, - 176u8, - 137u8, - 93u8, - 230u8, - 56u8, - 75u8, - 51u8, - 149u8, - ], - ) - } - pub fn members( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::subxt::utils::AccountId32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Council", - "Members", - ::alloc::vec::Vec::new(), - [ - 16u8, - 29u8, - 32u8, - 222u8, - 175u8, - 136u8, - 111u8, - 101u8, - 43u8, - 74u8, - 209u8, - 81u8, - 47u8, - 97u8, - 129u8, - 39u8, - 225u8, - 243u8, - 110u8, - 229u8, - 237u8, - 21u8, - 90u8, - 127u8, - 80u8, - 239u8, - 156u8, - 32u8, - 90u8, - 109u8, - 179u8, - 0u8, - ], - ) - } - pub fn prime( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::AccountId32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Council", - "Prime", - ::alloc::vec::Vec::new(), - [ - 72u8, - 128u8, - 214u8, - 72u8, - 78u8, - 80u8, - 100u8, - 198u8, - 114u8, - 215u8, - 59u8, - 3u8, - 103u8, - 14u8, - 152u8, - 202u8, - 12u8, - 165u8, - 224u8, - 10u8, - 41u8, - 154u8, - 77u8, - 95u8, - 116u8, - 143u8, - 250u8, - 250u8, - 176u8, - 92u8, - 238u8, - 154u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn max_proposal_weight( - &self, - ) -> ::subxt::constants::Address< - runtime_types::sp_weights::weight_v2::Weight, - > { - ::subxt::constants::Address::new_static( - "Council", - "MaxProposalWeight", - [ - 149u8, - 252u8, - 129u8, - 80u8, - 169u8, - 36u8, - 79u8, - 127u8, - 240u8, - 156u8, - 56u8, - 202u8, - 219u8, - 86u8, - 5u8, - 65u8, - 245u8, - 148u8, - 138u8, - 243u8, - 210u8, - 128u8, - 234u8, - 216u8, - 240u8, - 219u8, - 123u8, - 235u8, - 21u8, - 158u8, - 237u8, - 112u8, - ], - ) - } - } - } - } - pub mod technical_committee { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_collective::pallet::Error2; - pub type Call = runtime_types::pallet_collective::pallet::Call2; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMembers { - pub new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub prime: ::core::option::Option<::subxt::utils::AccountId32>, - pub old_count: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetMembers { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMembers { - new_members: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMembers::new_members`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - prime: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMembers::prime`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - old_count: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMembers::old_count`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetMembers { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new_members), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.prime), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.old_count), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.new_members, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.prime, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.old_count, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetMembers {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetMembers { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMembers; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMembers { - new_members: { - let val = *vals - .get(&Some("new_members")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_members".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_members"))? - }, - prime: { - let val = *vals - .get(&Some("prime")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prime".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prime"))? - }, - old_count: { - let val = *vals - .get(&Some("old_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "old_count".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("old_count"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(SetMembers { - new_members: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_members"))? - }, - prime: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prime"))? - }, - old_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("old_count"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SetMembers { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetMembers { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMembers { new_members, prime, old_count } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new_members"), - new_members as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prime"), - prime as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("old_count"), - old_count as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetMembers { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMembers { new_members, prime, old_count } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new_members"), - new_members as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prime"), - prime as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("old_count"), - old_count as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMembers { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SetMembers", - "new_members", - &self.new_members, - "prime", - &self.prime, - "old_count", - &&self.old_count, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetMembers { - const PALLET: &'static str = "TechnicalCommittee"; - const CALL: &'static str = "set_members"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Execute { - pub proposal: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Execute { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Execute { - proposal: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Execute::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - length_bound: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Execute::length_bound`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Execute { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.length_bound), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.length_bound), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Execute {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Execute { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Execute; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Execute { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - length_bound: { - let val = *vals - .get(&Some("length_bound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "length_bound".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Execute { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - length_bound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Execute { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Execute { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Execute { proposal, length_bound } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Execute { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Execute { proposal, length_bound } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Execute { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Execute", - "proposal", - &self.proposal, - "length_bound", - &&self.length_bound, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Execute { - const PALLET: &'static str = "TechnicalCommittee"; - const CALL: &'static str = "execute"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Propose { - #[codec(compact)] - pub threshold: ::core::primitive::u32, - pub proposal: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Propose { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Propose { - threshold: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Propose::threshold`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - proposal: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Propose::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - length_bound: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Propose::length_bound`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Propose { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.threshold), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.length_bound), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.threshold), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.proposal, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.length_bound), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Propose {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Propose { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Propose; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Propose { - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - length_bound: { - let val = *vals - .get(&Some("length_bound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "length_bound".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Propose { - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - length_bound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Propose { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Propose { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Propose { threshold, proposal, length_bound } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Propose { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Propose { threshold, proposal, length_bound } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Propose { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Propose", - "threshold", - &self.threshold, - "proposal", - &self.proposal, - "length_bound", - &&self.length_bound, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Propose { - const PALLET: &'static str = "TechnicalCommittee"; - const CALL: &'static str = "propose"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote { - pub proposal: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - pub approve: ::core::primitive::bool, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Vote { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Vote { - proposal: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Vote::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Vote::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - approve: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Vote::approve`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Vote { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.approve), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.approve, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Vote {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Vote { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Vote; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Vote { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - approve: { - let val = *vals - .get(&Some("approve")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "approve".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("approve"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Vote { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - approve: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("approve"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Vote { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Vote { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vote { proposal, index, approve } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("approve"), - approve as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Vote { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vote { proposal, index, approve } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("approve"), - approve as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Vote { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Vote", - "proposal", - &self.proposal, - "index", - &self.index, - "approve", - &&self.approve, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Vote { - const PALLET: &'static str = "TechnicalCommittee"; - const CALL: &'static str = "vote"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DisapproveProposal { - pub proposal_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DisapproveProposal { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(DisapproveProposal { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `DisapproveProposal::proposal_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DisapproveProposal { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.proposal_hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.proposal_hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.proposal_hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.proposal_hash, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DisapproveProposal {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for DisapproveProposal { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DisapproveProposal; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DisapproveProposal { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(DisapproveProposal { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for DisapproveProposal { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for DisapproveProposal { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DisapproveProposal { proposal_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for DisapproveProposal { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DisapproveProposal { proposal_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DisapproveProposal { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "DisapproveProposal", - "proposal_hash", - &&self.proposal_hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for DisapproveProposal { - const PALLET: &'static str = "TechnicalCommittee"; - const CALL: &'static str = "disapprove_proposal"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Close { - pub proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - pub proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Close { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Close { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Close::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Close::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - proposal_weight_bound: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Close::proposal_weight_bound`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - length_bound: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Close::length_bound`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Close { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.proposal_weight_bound, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.length_bound), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_hash, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_weight_bound, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.length_bound), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Close {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Close { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Close; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Close { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - proposal_weight_bound: { - let val = *vals - .get(&Some("proposal_weight_bound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_weight_bound".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_weight_bound"))? - }, - length_bound: { - let val = *vals - .get(&Some("length_bound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "length_bound".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(Close { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - proposal_weight_bound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_weight_bound"))? - }, - length_bound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Close { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Close { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Close { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_weight_bound"), - proposal_weight_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Close { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Close { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_weight_bound"), - proposal_weight_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Close { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Close", - "proposal_hash", - &self.proposal_hash, - "index", - &self.index, - "proposal_weight_bound", - &self.proposal_weight_bound, - "length_bound", - &&self.length_bound, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Close { - const PALLET: &'static str = "TechnicalCommittee"; - const CALL: &'static str = "close"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn set_members( - &self, - new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, - prime: ::core::option::Option<::subxt::utils::AccountId32>, - old_count: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalCommittee", - "set_members", - types::SetMembers { - new_members, - prime, - old_count, - }, - [ - 66u8, - 224u8, - 186u8, - 178u8, - 41u8, - 208u8, - 67u8, - 192u8, - 57u8, - 242u8, - 141u8, - 31u8, - 216u8, - 118u8, - 192u8, - 43u8, - 125u8, - 213u8, - 226u8, - 85u8, - 142u8, - 225u8, - 131u8, - 45u8, - 172u8, - 142u8, - 12u8, - 9u8, - 73u8, - 7u8, - 218u8, - 61u8, - ], - ) - } - pub fn execute( - &self, - proposal: runtime_types::polkadot_runtime::RuntimeCall, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalCommittee", - "execute", - types::Execute { - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }, - [ - 133u8, - 165u8, - 196u8, - 168u8, - 123u8, - 181u8, - 94u8, - 202u8, - 148u8, - 229u8, - 228u8, - 128u8, - 109u8, - 130u8, - 11u8, - 162u8, - 223u8, - 46u8, - 69u8, - 59u8, - 230u8, - 20u8, - 230u8, - 107u8, - 17u8, - 12u8, - 33u8, - 149u8, - 153u8, - 157u8, - 33u8, - 51u8, - ], - ) - } - pub fn propose( - &self, - threshold: ::core::primitive::u32, - proposal: runtime_types::polkadot_runtime::RuntimeCall, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalCommittee", - "propose", - types::Propose { - threshold, - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }, - [ - 25u8, - 57u8, - 92u8, - 114u8, - 27u8, - 54u8, - 48u8, - 110u8, - 212u8, - 40u8, - 3u8, - 205u8, - 62u8, - 245u8, - 179u8, - 78u8, - 17u8, - 165u8, - 1u8, - 228u8, - 98u8, - 17u8, - 32u8, - 55u8, - 225u8, - 239u8, - 19u8, - 11u8, - 60u8, - 44u8, - 101u8, - 25u8, - ], - ) - } - pub fn vote( - &self, - proposal: ::subxt::utils::H256, - index: ::core::primitive::u32, - approve: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalCommittee", - "vote", - types::Vote { - proposal, - index, - approve, - }, - [ - 110u8, - 141u8, - 24u8, - 33u8, - 91u8, - 7u8, - 89u8, - 198u8, - 54u8, - 10u8, - 76u8, - 129u8, - 45u8, - 20u8, - 216u8, - 104u8, - 231u8, - 246u8, - 174u8, - 205u8, - 190u8, - 176u8, - 171u8, - 113u8, - 33u8, - 37u8, - 155u8, - 203u8, - 251u8, - 34u8, - 25u8, - 120u8, - ], - ) - } - pub fn disapprove_proposal( - &self, - proposal_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalCommittee", - "disapprove_proposal", - types::DisapproveProposal { - proposal_hash, - }, - [ - 26u8, - 140u8, - 111u8, - 193u8, - 229u8, - 59u8, - 53u8, - 196u8, - 230u8, - 60u8, - 7u8, - 155u8, - 168u8, - 7u8, - 201u8, - 177u8, - 70u8, - 103u8, - 190u8, - 57u8, - 244u8, - 156u8, - 67u8, - 101u8, - 228u8, - 6u8, - 213u8, - 83u8, - 225u8, - 95u8, - 148u8, - 96u8, - ], - ) - } - pub fn close( - &self, - proposal_hash: ::subxt::utils::H256, - index: ::core::primitive::u32, - proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalCommittee", - "close", - types::Close { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - }, - [ - 136u8, - 48u8, - 243u8, - 34u8, - 60u8, - 109u8, - 186u8, - 158u8, - 72u8, - 48u8, - 62u8, - 34u8, - 167u8, - 46u8, - 33u8, - 142u8, - 239u8, - 43u8, - 238u8, - 125u8, - 94u8, - 80u8, - 157u8, - 245u8, - 220u8, - 126u8, - 58u8, - 244u8, - 186u8, - 195u8, - 30u8, - 127u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_collective::pallet::Event2; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Proposed { - pub account: ::subxt::utils::AccountId32, - pub proposal_index: ::core::primitive::u32, - pub proposal_hash: ::subxt::utils::H256, - pub threshold: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Proposed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Proposed { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proposed::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proposed::proposal_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proposed::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - threshold: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proposed::threshold`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Proposed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.threshold), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.threshold, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Proposed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Proposed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Proposed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Proposed { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - proposal_index: { - let val = *vals - .get(&Some("proposal_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(Proposed { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - proposal_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Proposed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Proposed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Proposed { - account, - proposal_index, - proposal_hash, - threshold, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Proposed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Proposed { - account, - proposal_index, - proposal_hash, - threshold, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Proposed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Proposed", - "account", - &self.account, - "proposal_index", - &self.proposal_index, - "proposal_hash", - &self.proposal_hash, - "threshold", - &&self.threshold, - ) - } - } - impl ::subxt::events::StaticEvent for Proposed { - const PALLET: &'static str = "TechnicalCommittee"; - const EVENT: &'static str = "Proposed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Voted { - pub account: ::subxt::utils::AccountId32, - pub proposal_hash: ::subxt::utils::H256, - pub voted: ::core::primitive::bool, - pub yes: ::core::primitive::u32, - pub no: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Voted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Voted { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voted::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voted::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - voted: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voted::voted`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - yes: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voted::yes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - no: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voted::no`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Voted { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.voted), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.yes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.no), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.voted, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.yes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.no, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Voted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Voted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Voted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Voted { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - voted: { - let val = *vals - .get(&Some("voted")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "voted".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("voted"))? - }, - yes: { - let val = *vals - .get(&Some("yes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "yes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("yes"))? - }, - no: { - let val = *vals - .get(&Some("no")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "no".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("no"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(Voted { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - voted: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("voted"))? - }, - yes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("yes"))? - }, - no: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("no"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Voted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Voted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Voted { account, proposal_hash, voted, yes, no } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("voted"), - voted as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("yes"), - yes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("no"), - no as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Voted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Voted { account, proposal_hash, voted, yes, no } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("voted"), - voted as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("yes"), - yes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("no"), - no as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Voted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "Voted", - "account", - &self.account, - "proposal_hash", - &self.proposal_hash, - "voted", - &self.voted, - "yes", - &self.yes, - "no", - &&self.no, - ) - } - } - impl ::subxt::events::StaticEvent for Voted { - const PALLET: &'static str = "TechnicalCommittee"; - const EVENT: &'static str = "Voted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Approved { - pub proposal_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Approved { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Approved { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Approved::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Approved { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.proposal_hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.proposal_hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.proposal_hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.proposal_hash, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Approved {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Approved { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Approved; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Approved { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Approved { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Approved { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Approved { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Approved { proposal_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Approved { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Approved { proposal_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Approved { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Approved", - "proposal_hash", - &&self.proposal_hash, - ) - } - } - impl ::subxt::events::StaticEvent for Approved { - const PALLET: &'static str = "TechnicalCommittee"; - const EVENT: &'static str = "Approved"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Disapproved { - pub proposal_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Disapproved { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Disapproved { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Disapproved::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Disapproved { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.proposal_hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.proposal_hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.proposal_hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.proposal_hash, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Disapproved {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Disapproved { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Disapproved; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Disapproved { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Disapproved { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Disapproved { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Disapproved { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Disapproved { proposal_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Disapproved { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Disapproved { proposal_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Disapproved { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Disapproved", - "proposal_hash", - &&self.proposal_hash, - ) - } - } - impl ::subxt::events::StaticEvent for Disapproved { - const PALLET: &'static str = "TechnicalCommittee"; - const EVENT: &'static str = "Disapproved"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Executed { - pub proposal_hash: ::subxt::utils::H256, - pub result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Executed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Executed { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Executed::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Executed::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Executed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.result), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.result, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Executed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Executed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Executed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Executed { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Executed { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Executed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Executed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Executed { proposal_hash, result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Executed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Executed { proposal_hash, result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Executed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Executed", - "proposal_hash", - &self.proposal_hash, - "result", - &&self.result, - ) - } - } - impl ::subxt::events::StaticEvent for Executed { - const PALLET: &'static str = "TechnicalCommittee"; - const EVENT: &'static str = "Executed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MemberExecuted { - pub proposal_hash: ::subxt::utils::H256, - pub result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MemberExecuted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MemberExecuted { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MemberExecuted::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MemberExecuted::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MemberExecuted { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.result), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.result, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MemberExecuted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MemberExecuted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MemberExecuted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MemberExecuted { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(MemberExecuted { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for MemberExecuted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MemberExecuted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MemberExecuted { proposal_hash, result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MemberExecuted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MemberExecuted { proposal_hash, result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MemberExecuted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MemberExecuted", - "proposal_hash", - &self.proposal_hash, - "result", - &&self.result, - ) - } - } - impl ::subxt::events::StaticEvent for MemberExecuted { - const PALLET: &'static str = "TechnicalCommittee"; - const EVENT: &'static str = "MemberExecuted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Closed { - pub proposal_hash: ::subxt::utils::H256, - pub yes: ::core::primitive::u32, - pub no: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Closed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Closed { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Closed::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - yes: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Closed::yes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - no: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Closed::no`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Closed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.yes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.no), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.yes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.no, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Closed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Closed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Closed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Closed { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - yes: { - let val = *vals - .get(&Some("yes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "yes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("yes"))? - }, - no: { - let val = *vals - .get(&Some("no")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "no".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("no"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Closed { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - yes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("yes"))? - }, - no: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("no"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Closed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Closed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Closed { proposal_hash, yes, no } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("yes"), - yes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("no"), - no as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Closed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Closed { proposal_hash, yes, no } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("yes"), - yes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("no"), - no as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Closed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Closed", - "proposal_hash", - &self.proposal_hash, - "yes", - &self.yes, - "no", - &&self.no, - ) - } - } - impl ::subxt::events::StaticEvent for Closed { - const PALLET: &'static str = "TechnicalCommittee"; - const EVENT: &'static str = "Closed"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn proposals( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::subxt::utils::H256, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "TechnicalCommittee", - "Proposals", - ::alloc::vec::Vec::new(), - [ - 210u8, - 234u8, - 7u8, - 29u8, - 231u8, - 80u8, - 17u8, - 36u8, - 189u8, - 34u8, - 175u8, - 147u8, - 56u8, - 92u8, - 201u8, - 104u8, - 207u8, - 150u8, - 58u8, - 110u8, - 90u8, - 28u8, - 198u8, - 79u8, - 236u8, - 245u8, - 19u8, - 38u8, - 68u8, - 59u8, - 215u8, - 74u8, - ], - ) - } - pub fn proposal_of_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime::RuntimeCall, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "TechnicalCommittee", - "ProposalOf", - ::alloc::vec::Vec::new(), - [ - 171u8, - 23u8, - 148u8, - 102u8, - 126u8, - 171u8, - 7u8, - 15u8, - 90u8, - 246u8, - 143u8, - 125u8, - 45u8, - 113u8, - 59u8, - 154u8, - 62u8, - 110u8, - 136u8, - 25u8, - 157u8, - 31u8, - 42u8, - 178u8, - 213u8, - 151u8, - 73u8, - 4u8, - 117u8, - 27u8, - 62u8, - 232u8, - ], - ) - } - pub fn proposal_of( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime::RuntimeCall, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "TechnicalCommittee", - "ProposalOf", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 171u8, - 23u8, - 148u8, - 102u8, - 126u8, - 171u8, - 7u8, - 15u8, - 90u8, - 246u8, - 143u8, - 125u8, - 45u8, - 113u8, - 59u8, - 154u8, - 62u8, - 110u8, - 136u8, - 25u8, - 157u8, - 31u8, - 42u8, - 178u8, - 213u8, - 151u8, - 73u8, - 4u8, - 117u8, - 27u8, - 62u8, - 232u8, - ], - ) - } - pub fn voting_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_collective::Votes< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "TechnicalCommittee", - "Voting", - ::alloc::vec::Vec::new(), - [ - 109u8, - 198u8, - 2u8, - 13u8, - 29u8, - 14u8, - 241u8, - 217u8, - 55u8, - 147u8, - 147u8, - 4u8, - 176u8, - 69u8, - 132u8, - 228u8, - 158u8, - 203u8, - 110u8, - 239u8, - 158u8, - 137u8, - 97u8, - 46u8, - 228u8, - 118u8, - 251u8, - 201u8, - 88u8, - 208u8, - 94u8, - 132u8, - ], - ) - } - pub fn voting( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_collective::Votes< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "TechnicalCommittee", - "Voting", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 109u8, - 198u8, - 2u8, - 13u8, - 29u8, - 14u8, - 241u8, - 217u8, - 55u8, - 147u8, - 147u8, - 4u8, - 176u8, - 69u8, - 132u8, - 228u8, - 158u8, - 203u8, - 110u8, - 239u8, - 158u8, - 137u8, - 97u8, - 46u8, - 228u8, - 118u8, - 251u8, - 201u8, - 88u8, - 208u8, - 94u8, - 132u8, - ], - ) - } - pub fn proposal_count( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "TechnicalCommittee", - "ProposalCount", - ::alloc::vec::Vec::new(), - [ - 91u8, - 238u8, - 246u8, - 106u8, - 95u8, - 66u8, - 83u8, - 134u8, - 1u8, - 225u8, - 164u8, - 216u8, - 113u8, - 101u8, - 203u8, - 200u8, - 113u8, - 97u8, - 246u8, - 228u8, - 140u8, - 29u8, - 29u8, - 48u8, - 176u8, - 137u8, - 93u8, - 230u8, - 56u8, - 75u8, - 51u8, - 149u8, - ], - ) - } - pub fn members( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::subxt::utils::AccountId32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "TechnicalCommittee", - "Members", - ::alloc::vec::Vec::new(), - [ - 16u8, - 29u8, - 32u8, - 222u8, - 175u8, - 136u8, - 111u8, - 101u8, - 43u8, - 74u8, - 209u8, - 81u8, - 47u8, - 97u8, - 129u8, - 39u8, - 225u8, - 243u8, - 110u8, - 229u8, - 237u8, - 21u8, - 90u8, - 127u8, - 80u8, - 239u8, - 156u8, - 32u8, - 90u8, - 109u8, - 179u8, - 0u8, - ], - ) - } - pub fn prime( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::AccountId32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "TechnicalCommittee", - "Prime", - ::alloc::vec::Vec::new(), - [ - 72u8, - 128u8, - 214u8, - 72u8, - 78u8, - 80u8, - 100u8, - 198u8, - 114u8, - 215u8, - 59u8, - 3u8, - 103u8, - 14u8, - 152u8, - 202u8, - 12u8, - 165u8, - 224u8, - 10u8, - 41u8, - 154u8, - 77u8, - 95u8, - 116u8, - 143u8, - 250u8, - 250u8, - 176u8, - 92u8, - 238u8, - 154u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn max_proposal_weight( - &self, - ) -> ::subxt::constants::Address< - runtime_types::sp_weights::weight_v2::Weight, - > { - ::subxt::constants::Address::new_static( - "TechnicalCommittee", - "MaxProposalWeight", - [ - 149u8, - 252u8, - 129u8, - 80u8, - 169u8, - 36u8, - 79u8, - 127u8, - 240u8, - 156u8, - 56u8, - 202u8, - 219u8, - 86u8, - 5u8, - 65u8, - 245u8, - 148u8, - 138u8, - 243u8, - 210u8, - 128u8, - 234u8, - 216u8, - 240u8, - 219u8, - 123u8, - 235u8, - 21u8, - 158u8, - 237u8, - 112u8, - ], - ) - } - } - } - } - pub mod phragmen_election { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_elections_phragmen::pallet::Error; - pub type Call = runtime_types::pallet_elections_phragmen::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote { - pub votes: ::std::vec::Vec<::subxt::utils::AccountId32>, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Vote { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Vote { - votes: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Vote::votes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Vote::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Vote { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.votes, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Vote {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Vote { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Vote; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Vote { - votes: { - let val = *vals - .get(&Some("votes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Vote { - votes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Vote { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Vote { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vote { votes, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("votes"), - votes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Vote { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vote { votes, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("votes"), - votes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Vote { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Vote", - "votes", - &self.votes, - "value", - &&self.value, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Vote { - const PALLET: &'static str = "PhragmenElection"; - const CALL: &'static str = "vote"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveVoter; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RemoveVoter { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RemoveVoter) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RemoveVoter { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RemoveVoter {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RemoveVoter { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RemoveVoter; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(RemoveVoter) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for RemoveVoter { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RemoveVoter { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveVoter = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RemoveVoter { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveVoter = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RemoveVoter { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "RemoveVoter") - } - } - impl ::subxt::blocks::StaticExtrinsic for RemoveVoter { - const PALLET: &'static str = "PhragmenElection"; - const CALL: &'static str = "remove_voter"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SubmitCandidacy { - #[codec(compact)] - pub candidate_count: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SubmitCandidacy { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SubmitCandidacy { - candidate_count: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SubmitCandidacy::candidate_count`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SubmitCandidacy { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.candidate_count) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.candidate_count) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.candidate_count) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.candidate_count) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SubmitCandidacy {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SubmitCandidacy { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SubmitCandidacy; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SubmitCandidacy { - candidate_count: { - let val = *vals - .get(&Some("candidate_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "candidate_count".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("candidate_count"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SubmitCandidacy { - candidate_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("candidate_count"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SubmitCandidacy { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SubmitCandidacy { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SubmitCandidacy { candidate_count } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("candidate_count"), - candidate_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SubmitCandidacy { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SubmitCandidacy { candidate_count } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("candidate_count"), - candidate_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SubmitCandidacy { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SubmitCandidacy", - "candidate_count", - &&self.candidate_count, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SubmitCandidacy { - const PALLET: &'static str = "PhragmenElection"; - const CALL: &'static str = "submit_candidacy"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RenounceCandidacy { - pub renouncing: runtime_types::pallet_elections_phragmen::Renouncing, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RenounceCandidacy { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RenounceCandidacy { - renouncing: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RenounceCandidacy::renouncing`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RenounceCandidacy { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.renouncing) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.renouncing, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.renouncing) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.renouncing, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RenounceCandidacy {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for RenounceCandidacy { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RenounceCandidacy; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RenounceCandidacy { - renouncing: { - let val = *vals - .get(&Some("renouncing")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "renouncing".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("renouncing"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(RenounceCandidacy { - renouncing: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("renouncing"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for RenounceCandidacy { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RenounceCandidacy { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RenounceCandidacy { renouncing } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("renouncing"), - renouncing as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for RenounceCandidacy { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RenounceCandidacy { renouncing } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("renouncing"), - renouncing as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RenounceCandidacy { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "RenounceCandidacy", - "renouncing", - &&self.renouncing, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RenounceCandidacy { - const PALLET: &'static str = "PhragmenElection"; - const CALL: &'static str = "renounce_candidacy"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveMember { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub slash_bond: ::core::primitive::bool, - pub rerun_election: ::core::primitive::bool, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RemoveMember { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RemoveMember { - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveMember::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - slash_bond: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveMember::slash_bond`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - rerun_election: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveMember::rerun_election`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RemoveMember { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.slash_bond), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.rerun_election), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.slash_bond, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.rerun_election, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RemoveMember {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RemoveMember { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RemoveMember; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RemoveMember { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - slash_bond: { - let val = *vals - .get(&Some("slash_bond")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "slash_bond".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("slash_bond"))? - }, - rerun_election: { - let val = *vals - .get(&Some("rerun_election")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "rerun_election".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("rerun_election"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(RemoveMember { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - slash_bond: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("slash_bond"))? - }, - rerun_election: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("rerun_election"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for RemoveMember { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RemoveMember { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveMember { who, slash_bond, rerun_election } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slash_bond"), - slash_bond as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("rerun_election"), - rerun_election - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RemoveMember { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveMember { who, slash_bond, rerun_election } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slash_bond"), - slash_bond as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("rerun_election"), - rerun_election - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RemoveMember { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "RemoveMember", - "who", - &self.who, - "slash_bond", - &self.slash_bond, - "rerun_election", - &&self.rerun_election, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RemoveMember { - const PALLET: &'static str = "PhragmenElection"; - const CALL: &'static str = "remove_member"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CleanDefunctVoters { - pub num_voters: ::core::primitive::u32, - pub num_defunct: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CleanDefunctVoters { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CleanDefunctVoters { - num_voters: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CleanDefunctVoters::num_voters`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - num_defunct: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `CleanDefunctVoters::num_defunct`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CleanDefunctVoters { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.num_voters), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.num_defunct), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.num_voters, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.num_defunct, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CleanDefunctVoters {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for CleanDefunctVoters { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CleanDefunctVoters; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CleanDefunctVoters { - num_voters: { - let val = *vals - .get(&Some("num_voters")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "num_voters".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("num_voters"))? - }, - num_defunct: { - let val = *vals - .get(&Some("num_defunct")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "num_defunct".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("num_defunct"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(CleanDefunctVoters { - num_voters: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("num_voters"))? - }, - num_defunct: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("num_defunct"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CleanDefunctVoters { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for CleanDefunctVoters { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CleanDefunctVoters { num_voters, num_defunct } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("num_voters"), - num_voters as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("num_defunct"), - num_defunct as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for CleanDefunctVoters { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CleanDefunctVoters { num_voters, num_defunct } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("num_voters"), - num_voters as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("num_defunct"), - num_defunct as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CleanDefunctVoters { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "CleanDefunctVoters", - "num_voters", - &self.num_voters, - "num_defunct", - &&self.num_defunct, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for CleanDefunctVoters { - const PALLET: &'static str = "PhragmenElection"; - const CALL: &'static str = "clean_defunct_voters"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn vote( - &self, - votes: ::std::vec::Vec<::subxt::utils::AccountId32>, - value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "PhragmenElection", - "vote", - types::Vote { votes, value }, - [ - 229u8, - 163u8, - 1u8, - 49u8, - 26u8, - 130u8, - 7u8, - 228u8, - 34u8, - 80u8, - 17u8, - 125u8, - 32u8, - 180u8, - 174u8, - 69u8, - 17u8, - 171u8, - 163u8, - 54u8, - 42u8, - 139u8, - 201u8, - 205u8, - 196u8, - 18u8, - 16u8, - 211u8, - 252u8, - 64u8, - 73u8, - 5u8, - ], - ) - } - pub fn remove_voter( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "PhragmenElection", - "remove_voter", - types::RemoveVoter {}, - [ - 89u8, - 43u8, - 70u8, - 117u8, - 76u8, - 84u8, - 230u8, - 114u8, - 229u8, - 91u8, - 75u8, - 213u8, - 47u8, - 143u8, - 233u8, - 47u8, - 108u8, - 120u8, - 171u8, - 167u8, - 14u8, - 62u8, - 52u8, - 20u8, - 227u8, - 106u8, - 249u8, - 239u8, - 33u8, - 115u8, - 155u8, - 106u8, - ], - ) - } - pub fn submit_candidacy( - &self, - candidate_count: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "PhragmenElection", - "submit_candidacy", - types::SubmitCandidacy { - candidate_count, - }, - [ - 229u8, - 169u8, - 247u8, - 102u8, - 33u8, - 7u8, - 9u8, - 125u8, - 190u8, - 179u8, - 241u8, - 220u8, - 205u8, - 242u8, - 168u8, - 112u8, - 197u8, - 169u8, - 135u8, - 133u8, - 102u8, - 173u8, - 168u8, - 203u8, - 17u8, - 135u8, - 224u8, - 145u8, - 101u8, - 204u8, - 253u8, - 4u8, - ], - ) - } - pub fn renounce_candidacy( - &self, - renouncing: runtime_types::pallet_elections_phragmen::Renouncing, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "PhragmenElection", - "renounce_candidacy", - types::RenounceCandidacy { - renouncing, - }, - [ - 230u8, - 140u8, - 205u8, - 240u8, - 110u8, - 247u8, - 242u8, - 185u8, - 228u8, - 135u8, - 243u8, - 73u8, - 71u8, - 200u8, - 88u8, - 134u8, - 132u8, - 174u8, - 190u8, - 251u8, - 81u8, - 85u8, - 174u8, - 230u8, - 94u8, - 97u8, - 96u8, - 230u8, - 15u8, - 204u8, - 247u8, - 214u8, - ], - ) - } - pub fn remove_member( - &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - slash_bond: ::core::primitive::bool, - rerun_election: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "PhragmenElection", - "remove_member", - types::RemoveMember { - who, - slash_bond, - rerun_election, - }, - [ - 230u8, - 64u8, - 250u8, - 74u8, - 77u8, - 87u8, - 67u8, - 109u8, - 160u8, - 123u8, - 236u8, - 144u8, - 158u8, - 95u8, - 32u8, - 80u8, - 151u8, - 10u8, - 217u8, - 128u8, - 233u8, - 254u8, - 255u8, - 229u8, - 57u8, - 191u8, - 56u8, - 29u8, - 23u8, - 11u8, - 45u8, - 194u8, - ], - ) - } - pub fn clean_defunct_voters( - &self, - num_voters: ::core::primitive::u32, - num_defunct: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "PhragmenElection", - "clean_defunct_voters", - types::CleanDefunctVoters { - num_voters, - num_defunct, - }, - [ - 99u8, - 129u8, - 198u8, - 141u8, - 41u8, - 90u8, - 151u8, - 167u8, - 50u8, - 236u8, - 88u8, - 57u8, - 25u8, - 26u8, - 130u8, - 61u8, - 123u8, - 177u8, - 98u8, - 57u8, - 39u8, - 204u8, - 29u8, - 24u8, - 191u8, - 229u8, - 224u8, - 110u8, - 223u8, - 248u8, - 191u8, - 177u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_elections_phragmen::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NewTerm { - pub new_members: ::std::vec::Vec< - (::subxt::utils::AccountId32, ::core::primitive::u128), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NewTerm { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(NewTerm { - new_members: { - let __codec_res_edqy = <::std::vec::Vec< - (::subxt::utils::AccountId32, ::core::primitive::u128), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NewTerm::new_members`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NewTerm { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new_members) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new_members, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new_members) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.new_members, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NewTerm {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for NewTerm { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NewTerm; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(NewTerm { - new_members: { - let val = *vals - .get(&Some("new_members")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_members".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_members"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(NewTerm { - new_members: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_members"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for NewTerm { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NewTerm { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewTerm { new_members } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new_members"), - new_members as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for NewTerm { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewTerm { new_members } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new_members"), - new_members as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NewTerm { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "NewTerm", - "new_members", - &&self.new_members, - ) - } - } - impl ::subxt::events::StaticEvent for NewTerm { - const PALLET: &'static str = "PhragmenElection"; - const EVENT: &'static str = "NewTerm"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct EmptyTerm; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for EmptyTerm { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(EmptyTerm) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for EmptyTerm { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for EmptyTerm {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for EmptyTerm { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = EmptyTerm; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(EmptyTerm) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for EmptyTerm { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for EmptyTerm { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EmptyTerm = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for EmptyTerm { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EmptyTerm = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for EmptyTerm { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "EmptyTerm") - } - } - impl ::subxt::events::StaticEvent for EmptyTerm { - const PALLET: &'static str = "PhragmenElection"; - const EVENT: &'static str = "EmptyTerm"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ElectionError; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ElectionError { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ElectionError) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ElectionError { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ElectionError {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ElectionError { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ElectionError; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(ElectionError) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ElectionError { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ElectionError { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ElectionError = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ElectionError { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ElectionError = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ElectionError { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "ElectionError") - } - } - impl ::subxt::events::StaticEvent for ElectionError { - const PALLET: &'static str = "PhragmenElection"; - const EVENT: &'static str = "ElectionError"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MemberKicked { - pub member: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MemberKicked { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MemberKicked { - member: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MemberKicked::member`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MemberKicked { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.member) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.member, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.member) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.member, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MemberKicked {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MemberKicked { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MemberKicked; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MemberKicked { - member: { - let val = *vals - .get(&Some("member")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(MemberKicked { - member: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for MemberKicked { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MemberKicked { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MemberKicked { member } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MemberKicked { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MemberKicked { member } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MemberKicked { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "MemberKicked", - "member", - &&self.member, - ) - } - } - impl ::subxt::events::StaticEvent for MemberKicked { - const PALLET: &'static str = "PhragmenElection"; - const EVENT: &'static str = "MemberKicked"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Renounced { - pub candidate: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Renounced { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Renounced { - candidate: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Renounced::candidate`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Renounced { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.candidate) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.candidate, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.candidate) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.candidate, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Renounced {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Renounced { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Renounced; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Renounced { - candidate: { - let val = *vals - .get(&Some("candidate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "candidate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("candidate"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Renounced { - candidate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("candidate"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Renounced { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Renounced { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Renounced { candidate } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("candidate"), - candidate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Renounced { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Renounced { candidate } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("candidate"), - candidate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Renounced { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Renounced", - "candidate", - &&self.candidate, - ) - } - } - impl ::subxt::events::StaticEvent for Renounced { - const PALLET: &'static str = "PhragmenElection"; - const EVENT: &'static str = "Renounced"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CandidateSlashed { - pub candidate: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CandidateSlashed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(CandidateSlashed { - candidate: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateSlashed::candidate`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateSlashed::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CandidateSlashed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.candidate), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.candidate, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CandidateSlashed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CandidateSlashed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CandidateSlashed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CandidateSlashed { - candidate: { - let val = *vals - .get(&Some("candidate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "candidate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("candidate"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(CandidateSlashed { - candidate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("candidate"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CandidateSlashed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CandidateSlashed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidateSlashed { candidate, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("candidate"), - candidate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CandidateSlashed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidateSlashed { candidate, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("candidate"), - candidate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CandidateSlashed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "CandidateSlashed", - "candidate", - &self.candidate, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for CandidateSlashed { - const PALLET: &'static str = "PhragmenElection"; - const EVENT: &'static str = "CandidateSlashed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SeatHolderSlashed { - pub seat_holder: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SeatHolderSlashed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(SeatHolderSlashed { - seat_holder: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SeatHolderSlashed::seat_holder`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SeatHolderSlashed::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SeatHolderSlashed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.seat_holder), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.seat_holder, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SeatHolderSlashed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SeatHolderSlashed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SeatHolderSlashed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SeatHolderSlashed { - seat_holder: { - let val = *vals - .get(&Some("seat_holder")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "seat_holder".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("seat_holder"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SeatHolderSlashed { - seat_holder: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("seat_holder"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SeatHolderSlashed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SeatHolderSlashed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SeatHolderSlashed { seat_holder, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("seat_holder"), - seat_holder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SeatHolderSlashed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SeatHolderSlashed { seat_holder, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("seat_holder"), - seat_holder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SeatHolderSlashed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SeatHolderSlashed", - "seat_holder", - &self.seat_holder, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for SeatHolderSlashed { - const PALLET: &'static str = "PhragmenElection"; - const EVENT: &'static str = "SeatHolderSlashed"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn members( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "PhragmenElection", - "Members", - ::alloc::vec::Vec::new(), - [ - 121u8, - 128u8, - 120u8, - 242u8, - 54u8, - 127u8, - 90u8, - 113u8, - 74u8, - 54u8, - 181u8, - 207u8, - 213u8, - 130u8, - 123u8, - 238u8, - 66u8, - 247u8, - 177u8, - 209u8, - 47u8, - 106u8, - 3u8, - 130u8, - 57u8, - 217u8, - 190u8, - 164u8, - 92u8, - 223u8, - 53u8, - 8u8, - ], - ) - } - pub fn runners_up( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "PhragmenElection", - "RunnersUp", - ::alloc::vec::Vec::new(), - [ - 252u8, - 213u8, - 152u8, - 58u8, - 93u8, - 84u8, - 170u8, - 162u8, - 180u8, - 51u8, - 52u8, - 156u8, - 18u8, - 58u8, - 210u8, - 150u8, - 76u8, - 159u8, - 75u8, - 43u8, - 103u8, - 21u8, - 181u8, - 184u8, - 155u8, - 198u8, - 236u8, - 173u8, - 245u8, - 49u8, - 134u8, - 153u8, - ], - ) - } - pub fn candidates( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - (::subxt::utils::AccountId32, ::core::primitive::u128), - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "PhragmenElection", - "Candidates", - ::alloc::vec::Vec::new(), - [ - 220u8, - 219u8, - 115u8, - 204u8, - 15u8, - 0u8, - 135u8, - 72u8, - 241u8, - 89u8, - 10u8, - 105u8, - 106u8, - 93u8, - 18u8, - 63u8, - 43u8, - 117u8, - 120u8, - 73u8, - 8u8, - 143u8, - 244u8, - 144u8, - 223u8, - 155u8, - 217u8, - 132u8, - 246u8, - 228u8, - 210u8, - 53u8, - ], - ) - } - pub fn election_rounds( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "PhragmenElection", - "ElectionRounds", - ::alloc::vec::Vec::new(), - [ - 97u8, - 151u8, - 159u8, - 133u8, - 59u8, - 215u8, - 12u8, - 178u8, - 203u8, - 24u8, - 138u8, - 36u8, - 108u8, - 134u8, - 217u8, - 137u8, - 24u8, - 6u8, - 126u8, - 87u8, - 49u8, - 90u8, - 198u8, - 16u8, - 36u8, - 109u8, - 223u8, - 190u8, - 81u8, - 7u8, - 239u8, - 243u8, - ], - ) - } - pub fn voting_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_elections_phragmen::Voter< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "PhragmenElection", - "Voting", - ::alloc::vec::Vec::new(), - [ - 37u8, - 74u8, - 221u8, - 188u8, - 168u8, - 43u8, - 125u8, - 246u8, - 191u8, - 21u8, - 85u8, - 87u8, - 124u8, - 180u8, - 218u8, - 43u8, - 186u8, - 170u8, - 140u8, - 186u8, - 88u8, - 71u8, - 111u8, - 22u8, - 46u8, - 207u8, - 178u8, - 96u8, - 55u8, - 203u8, - 21u8, - 92u8, - ], - ) - } - pub fn voting( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_elections_phragmen::Voter< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "PhragmenElection", - "Voting", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 37u8, - 74u8, - 221u8, - 188u8, - 168u8, - 43u8, - 125u8, - 246u8, - 191u8, - 21u8, - 85u8, - 87u8, - 124u8, - 180u8, - 218u8, - 43u8, - 186u8, - 170u8, - 140u8, - 186u8, - 88u8, - 71u8, - 111u8, - 22u8, - 46u8, - 207u8, - 178u8, - 96u8, - 55u8, - 203u8, - 21u8, - 92u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn pallet_id( - &self, - ) -> ::subxt::constants::Address<[::core::primitive::u8; 8usize]> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "PalletId", - [ - 157u8, - 118u8, - 79u8, - 88u8, - 241u8, - 22u8, - 185u8, - 37u8, - 42u8, - 20u8, - 133u8, - 240u8, - 11u8, - 25u8, - 66u8, - 154u8, - 84u8, - 163u8, - 78u8, - 92u8, - 171u8, - 82u8, - 248u8, - 76u8, - 189u8, - 70u8, - 142u8, - 249u8, - 153u8, - 84u8, - 180u8, - 60u8, - ], - ) - } - pub fn candidacy_bond( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "CandidacyBond", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn voting_bond_base( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "VotingBondBase", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn voting_bond_factor( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "VotingBondFactor", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn desired_members( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "DesiredMembers", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn desired_runners_up( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "DesiredRunnersUp", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn term_duration( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "TermDuration", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn max_candidates( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "MaxCandidates", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn max_voters( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "MaxVoters", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn max_votes_per_voter( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "PhragmenElection", - "MaxVotesPerVoter", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod technical_membership { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_membership::pallet::Error; - pub type Call = runtime_types::pallet_membership::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddMember { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AddMember { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AddMember { - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AddMember::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AddMember { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.who) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.who, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.who) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.who, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AddMember {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AddMember { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AddMember; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AddMember { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(AddMember { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for AddMember { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AddMember { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddMember { who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AddMember { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddMember { who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AddMember { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "AddMember", - "who", - &&self.who, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for AddMember { - const PALLET: &'static str = "TechnicalMembership"; - const CALL: &'static str = "add_member"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveMember { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RemoveMember { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RemoveMember { - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveMember::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RemoveMember { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.who) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.who, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.who) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.who, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RemoveMember {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RemoveMember { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RemoveMember; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RemoveMember { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(RemoveMember { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for RemoveMember { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RemoveMember { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveMember { who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RemoveMember { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveMember { who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RemoveMember { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "RemoveMember", - "who", - &&self.who, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RemoveMember { - const PALLET: &'static str = "TechnicalMembership"; - const CALL: &'static str = "remove_member"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SwapMember { - pub remove: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub add: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SwapMember { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SwapMember { - remove: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SwapMember::remove`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - add: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SwapMember::add`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SwapMember { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.remove), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.add), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.remove, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.add, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SwapMember {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SwapMember { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SwapMember; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SwapMember { - remove: { - let val = *vals - .get(&Some("remove")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "remove".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("remove"))? - }, - add: { - let val = *vals - .get(&Some("add")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "add".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("add"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SwapMember { - remove: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("remove"))? - }, - add: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("add"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SwapMember { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SwapMember { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SwapMember { remove, add } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("remove"), - remove as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("add"), - add as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SwapMember { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SwapMember { remove, add } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("remove"), - remove as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("add"), - add as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SwapMember { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SwapMember", - "remove", - &self.remove, - "add", - &&self.add, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SwapMember { - const PALLET: &'static str = "TechnicalMembership"; - const CALL: &'static str = "swap_member"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ResetMembers { - pub members: ::std::vec::Vec<::subxt::utils::AccountId32>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ResetMembers { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ResetMembers { - members: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ResetMembers::members`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ResetMembers { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.members) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.members, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.members) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.members, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ResetMembers {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ResetMembers { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ResetMembers; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ResetMembers { - members: { - let val = *vals - .get(&Some("members")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "members".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("members"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ResetMembers { - members: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("members"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ResetMembers { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ResetMembers { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ResetMembers { members } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("members"), - members as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ResetMembers { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ResetMembers { members } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("members"), - members as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ResetMembers { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ResetMembers", - "members", - &&self.members, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ResetMembers { - const PALLET: &'static str = "TechnicalMembership"; - const CALL: &'static str = "reset_members"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ChangeKey { - pub new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ChangeKey { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ChangeKey { - new: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ChangeKey::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ChangeKey { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ChangeKey {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ChangeKey { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ChangeKey; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ChangeKey { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ChangeKey { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ChangeKey { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ChangeKey { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ChangeKey { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ChangeKey { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ChangeKey { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ChangeKey { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ChangeKey", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ChangeKey { - const PALLET: &'static str = "TechnicalMembership"; - const CALL: &'static str = "change_key"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetPrime { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetPrime { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetPrime { - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetPrime::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetPrime { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.who) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.who, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.who) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.who, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetPrime {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetPrime { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetPrime; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetPrime { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetPrime { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SetPrime { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetPrime { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetPrime { who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetPrime { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetPrime { who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetPrime { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetPrime", - "who", - &&self.who, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetPrime { - const PALLET: &'static str = "TechnicalMembership"; - const CALL: &'static str = "set_prime"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearPrime; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ClearPrime { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ClearPrime) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ClearPrime { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ClearPrime {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ClearPrime { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ClearPrime; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(ClearPrime) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ClearPrime { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ClearPrime { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClearPrime = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ClearPrime { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClearPrime = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ClearPrime { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "ClearPrime") - } - } - impl ::subxt::blocks::StaticExtrinsic for ClearPrime { - const PALLET: &'static str = "TechnicalMembership"; - const CALL: &'static str = "clear_prime"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn add_member( - &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalMembership", - "add_member", - types::AddMember { who }, - [ - 2u8, - 131u8, - 37u8, - 217u8, - 112u8, - 46u8, - 86u8, - 165u8, - 248u8, - 244u8, - 33u8, - 236u8, - 155u8, - 28u8, - 163u8, - 169u8, - 213u8, - 32u8, - 70u8, - 217u8, - 97u8, - 194u8, - 138u8, - 77u8, - 133u8, - 97u8, - 188u8, - 49u8, - 49u8, - 31u8, - 177u8, - 206u8, - ], - ) - } - pub fn remove_member( - &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalMembership", - "remove_member", - types::RemoveMember { who }, - [ - 78u8, - 153u8, - 97u8, - 110u8, - 121u8, - 242u8, - 112u8, - 56u8, - 195u8, - 217u8, - 10u8, - 202u8, - 114u8, - 134u8, - 220u8, - 237u8, - 198u8, - 109u8, - 247u8, - 85u8, - 156u8, - 88u8, - 138u8, - 79u8, - 189u8, - 37u8, - 230u8, - 55u8, - 1u8, - 27u8, - 89u8, - 80u8, - ], - ) - } - pub fn swap_member( - &self, - remove: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - add: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalMembership", - "swap_member", - types::SwapMember { remove, add }, - [ - 170u8, - 68u8, - 212u8, - 185u8, - 186u8, - 38u8, - 222u8, - 227u8, - 255u8, - 119u8, - 187u8, - 170u8, - 247u8, - 101u8, - 138u8, - 167u8, - 232u8, - 33u8, - 116u8, - 1u8, - 229u8, - 171u8, - 94u8, - 150u8, - 193u8, - 51u8, - 254u8, - 106u8, - 44u8, - 96u8, - 28u8, - 88u8, - ], - ) - } - pub fn reset_members( - &self, - members: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalMembership", - "reset_members", - types::ResetMembers { members }, - [ - 212u8, - 144u8, - 99u8, - 156u8, - 70u8, - 4u8, - 219u8, - 227u8, - 150u8, - 25u8, - 86u8, - 8u8, - 215u8, - 128u8, - 193u8, - 206u8, - 33u8, - 193u8, - 71u8, - 15u8, - 20u8, - 92u8, - 99u8, - 89u8, - 174u8, - 236u8, - 102u8, - 82u8, - 164u8, - 234u8, - 12u8, - 45u8, - ], - ) - } - pub fn change_key( - &self, - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalMembership", - "change_key", - types::ChangeKey { new }, - [ - 129u8, - 233u8, - 205u8, - 107u8, - 5u8, - 50u8, - 160u8, - 60u8, - 161u8, - 248u8, - 44u8, - 53u8, - 50u8, - 141u8, - 169u8, - 36u8, - 182u8, - 195u8, - 173u8, - 142u8, - 121u8, - 153u8, - 249u8, - 234u8, - 253u8, - 64u8, - 110u8, - 51u8, - 207u8, - 127u8, - 166u8, - 108u8, - ], - ) - } - pub fn set_prime( - &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalMembership", - "set_prime", - types::SetPrime { who }, - [ - 213u8, - 60u8, - 220u8, - 4u8, - 28u8, - 111u8, - 6u8, - 128u8, - 228u8, - 150u8, - 14u8, - 182u8, - 183u8, - 94u8, - 120u8, - 238u8, - 15u8, - 241u8, - 107u8, - 152u8, - 182u8, - 33u8, - 154u8, - 203u8, - 172u8, - 217u8, - 31u8, - 212u8, - 112u8, - 158u8, - 17u8, - 188u8, - ], - ) - } - pub fn clear_prime( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TechnicalMembership", - "clear_prime", - types::ClearPrime {}, - [ - 71u8, - 213u8, - 34u8, - 23u8, - 186u8, - 63u8, - 240u8, - 216u8, - 190u8, - 251u8, - 84u8, - 109u8, - 140u8, - 137u8, - 210u8, - 211u8, - 242u8, - 231u8, - 212u8, - 133u8, - 151u8, - 125u8, - 25u8, - 46u8, - 210u8, - 53u8, - 133u8, - 222u8, - 21u8, - 107u8, - 120u8, - 52u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_membership::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MemberAdded; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MemberAdded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MemberAdded) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MemberAdded { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MemberAdded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MemberAdded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MemberAdded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(MemberAdded) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for MemberAdded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MemberAdded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MemberAdded = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MemberAdded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MemberAdded = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MemberAdded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "MemberAdded") - } - } - impl ::subxt::events::StaticEvent for MemberAdded { - const PALLET: &'static str = "TechnicalMembership"; - const EVENT: &'static str = "MemberAdded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MemberRemoved; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MemberRemoved { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MemberRemoved) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MemberRemoved { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MemberRemoved {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MemberRemoved { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MemberRemoved; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(MemberRemoved) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for MemberRemoved { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MemberRemoved { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MemberRemoved = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MemberRemoved { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MemberRemoved = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MemberRemoved { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "MemberRemoved") - } - } - impl ::subxt::events::StaticEvent for MemberRemoved { - const PALLET: &'static str = "TechnicalMembership"; - const EVENT: &'static str = "MemberRemoved"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MembersSwapped; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MembersSwapped { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MembersSwapped) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MembersSwapped { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MembersSwapped {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MembersSwapped { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MembersSwapped; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(MembersSwapped) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for MembersSwapped { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MembersSwapped { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MembersSwapped = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MembersSwapped { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MembersSwapped = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MembersSwapped { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "MembersSwapped") - } - } - impl ::subxt::events::StaticEvent for MembersSwapped { - const PALLET: &'static str = "TechnicalMembership"; - const EVENT: &'static str = "MembersSwapped"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MembersReset; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MembersReset { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MembersReset) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MembersReset { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MembersReset {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MembersReset { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MembersReset; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(MembersReset) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for MembersReset { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MembersReset { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MembersReset = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MembersReset { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MembersReset = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MembersReset { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "MembersReset") - } - } - impl ::subxt::events::StaticEvent for MembersReset { - const PALLET: &'static str = "TechnicalMembership"; - const EVENT: &'static str = "MembersReset"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct KeyChanged; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for KeyChanged { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(KeyChanged) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for KeyChanged { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for KeyChanged {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for KeyChanged { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = KeyChanged; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(KeyChanged) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for KeyChanged { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for KeyChanged { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let KeyChanged = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for KeyChanged { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let KeyChanged = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for KeyChanged { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "KeyChanged") - } - } - impl ::subxt::events::StaticEvent for KeyChanged { - const PALLET: &'static str = "TechnicalMembership"; - const EVENT: &'static str = "KeyChanged"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Dummy; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Dummy { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Dummy) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Dummy { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Dummy {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Dummy { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Dummy; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(Dummy) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Dummy { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Dummy { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Dummy = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Dummy { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Dummy = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Dummy { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "Dummy") - } - } - impl ::subxt::events::StaticEvent for Dummy { - const PALLET: &'static str = "TechnicalMembership"; - const EVENT: &'static str = "Dummy"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn members( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "TechnicalMembership", - "Members", - ::alloc::vec::Vec::new(), - [ - 109u8, - 100u8, - 14u8, - 195u8, - 213u8, - 67u8, - 44u8, - 218u8, - 84u8, - 254u8, - 76u8, - 80u8, - 210u8, - 155u8, - 155u8, - 30u8, - 18u8, - 169u8, - 195u8, - 92u8, - 208u8, - 223u8, - 242u8, - 97u8, - 147u8, - 20u8, - 168u8, - 145u8, - 254u8, - 115u8, - 225u8, - 193u8, - ], - ) - } - pub fn prime( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::AccountId32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "TechnicalMembership", - "Prime", - ::alloc::vec::Vec::new(), - [ - 72u8, - 128u8, - 214u8, - 72u8, - 78u8, - 80u8, - 100u8, - 198u8, - 114u8, - 215u8, - 59u8, - 3u8, - 103u8, - 14u8, - 152u8, - 202u8, - 12u8, - 165u8, - 224u8, - 10u8, - 41u8, - 154u8, - 77u8, - 95u8, - 116u8, - 143u8, - 250u8, - 250u8, - 176u8, - 92u8, - 238u8, - 154u8, - ], - ) - } - } - } - } - pub mod treasury { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_treasury::pallet::Error; - pub type Call = runtime_types::pallet_treasury::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProposeSpend { - #[codec(compact)] - pub value: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ProposeSpend { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ProposeSpend { - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProposeSpend::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProposeSpend::beneficiary`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ProposeSpend { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.beneficiary), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.beneficiary, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ProposeSpend {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ProposeSpend { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ProposeSpend; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ProposeSpend { - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ProposeSpend { - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ProposeSpend { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ProposeSpend { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProposeSpend { value, beneficiary } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ProposeSpend { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProposeSpend { value, beneficiary } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ProposeSpend { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ProposeSpend", - "value", - &self.value, - "beneficiary", - &&self.beneficiary, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ProposeSpend { - const PALLET: &'static str = "Treasury"; - const CALL: &'static str = "propose_spend"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RejectProposal { - #[codec(compact)] - pub proposal_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RejectProposal { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RejectProposal { - proposal_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RejectProposal::proposal_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RejectProposal { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.proposal_id) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.proposal_id) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.proposal_id) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.proposal_id) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RejectProposal {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RejectProposal { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RejectProposal; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RejectProposal { - proposal_id: { - let val = *vals - .get(&Some("proposal_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(RejectProposal { - proposal_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for RejectProposal { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RejectProposal { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RejectProposal { proposal_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_id"), - proposal_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RejectProposal { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RejectProposal { proposal_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_id"), - proposal_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RejectProposal { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "RejectProposal", - "proposal_id", - &&self.proposal_id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RejectProposal { - const PALLET: &'static str = "Treasury"; - const CALL: &'static str = "reject_proposal"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ApproveProposal { - #[codec(compact)] - pub proposal_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ApproveProposal { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ApproveProposal { - proposal_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ApproveProposal::proposal_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ApproveProposal { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.proposal_id) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.proposal_id) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.proposal_id) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.proposal_id) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ApproveProposal {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ApproveProposal { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ApproveProposal; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ApproveProposal { - proposal_id: { - let val = *vals - .get(&Some("proposal_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ApproveProposal { - proposal_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ApproveProposal { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ApproveProposal { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ApproveProposal { proposal_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_id"), - proposal_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ApproveProposal { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ApproveProposal { proposal_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_id"), - proposal_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ApproveProposal { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ApproveProposal", - "proposal_id", - &&self.proposal_id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ApproveProposal { - const PALLET: &'static str = "Treasury"; - const CALL: &'static str = "approve_proposal"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Spend { - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Spend { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Spend { - amount: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Spend::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Spend::beneficiary`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Spend { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.amount), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.beneficiary), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.amount), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.beneficiary, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Spend {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Spend { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Spend; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Spend { - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Spend { - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Spend { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Spend { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Spend { amount, beneficiary } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Spend { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Spend { amount, beneficiary } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Spend { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Spend", - "amount", - &self.amount, - "beneficiary", - &&self.beneficiary, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Spend { - const PALLET: &'static str = "Treasury"; - const CALL: &'static str = "spend"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveApproval { - #[codec(compact)] - pub proposal_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RemoveApproval { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RemoveApproval { - proposal_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveApproval::proposal_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RemoveApproval { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.proposal_id) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.proposal_id) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.proposal_id) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.proposal_id) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RemoveApproval {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RemoveApproval { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RemoveApproval; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RemoveApproval { - proposal_id: { - let val = *vals - .get(&Some("proposal_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(RemoveApproval { - proposal_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for RemoveApproval { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RemoveApproval { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveApproval { proposal_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_id"), - proposal_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RemoveApproval { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveApproval { proposal_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_id"), - proposal_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RemoveApproval { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "RemoveApproval", - "proposal_id", - &&self.proposal_id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RemoveApproval { - const PALLET: &'static str = "Treasury"; - const CALL: &'static str = "remove_approval"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn propose_spend( - &self, - value: ::core::primitive::u128, - beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Treasury", - "propose_spend", - types::ProposeSpend { - value, - beneficiary, - }, - [ - 250u8, - 230u8, - 64u8, - 10u8, - 93u8, - 132u8, - 194u8, - 69u8, - 91u8, - 50u8, - 98u8, - 212u8, - 72u8, - 218u8, - 29u8, - 149u8, - 2u8, - 190u8, - 219u8, - 4u8, - 25u8, - 110u8, - 5u8, - 199u8, - 196u8, - 37u8, - 64u8, - 57u8, - 207u8, - 235u8, - 164u8, - 226u8, - ], - ) - } - pub fn reject_proposal( - &self, - proposal_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Treasury", - "reject_proposal", - types::RejectProposal { - proposal_id, - }, - [ - 18u8, - 166u8, - 80u8, - 141u8, - 222u8, - 230u8, - 4u8, - 36u8, - 7u8, - 76u8, - 12u8, - 40u8, - 145u8, - 114u8, - 12u8, - 43u8, - 223u8, - 78u8, - 189u8, - 222u8, - 120u8, - 80u8, - 225u8, - 215u8, - 119u8, - 68u8, - 200u8, - 15u8, - 25u8, - 172u8, - 192u8, - 173u8, - ], - ) - } - pub fn approve_proposal( - &self, - proposal_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Treasury", - "approve_proposal", - types::ApproveProposal { - proposal_id, - }, - [ - 154u8, - 176u8, - 152u8, - 97u8, - 167u8, - 177u8, - 78u8, - 9u8, - 235u8, - 229u8, - 199u8, - 193u8, - 214u8, - 3u8, - 16u8, - 30u8, - 4u8, - 104u8, - 27u8, - 184u8, - 100u8, - 65u8, - 179u8, - 13u8, - 91u8, - 62u8, - 115u8, - 5u8, - 219u8, - 211u8, - 251u8, - 153u8, - ], - ) - } - pub fn spend( - &self, - amount: ::core::primitive::u128, - beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Treasury", - "spend", - types::Spend { - amount, - beneficiary, - }, - [ - 67u8, - 164u8, - 134u8, - 175u8, - 103u8, - 211u8, - 117u8, - 233u8, - 164u8, - 176u8, - 180u8, - 84u8, - 147u8, - 120u8, - 81u8, - 75u8, - 167u8, - 98u8, - 218u8, - 173u8, - 67u8, - 0u8, - 21u8, - 190u8, - 134u8, - 18u8, - 183u8, - 6u8, - 161u8, - 43u8, - 50u8, - 83u8, - ], - ) - } - pub fn remove_approval( - &self, - proposal_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Treasury", - "remove_approval", - types::RemoveApproval { - proposal_id, - }, - [ - 180u8, - 20u8, - 39u8, - 227u8, - 29u8, - 228u8, - 234u8, - 36u8, - 155u8, - 114u8, - 197u8, - 135u8, - 185u8, - 31u8, - 56u8, - 247u8, - 224u8, - 168u8, - 254u8, - 233u8, - 250u8, - 134u8, - 186u8, - 155u8, - 108u8, - 84u8, - 94u8, - 226u8, - 207u8, - 130u8, - 196u8, - 100u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_treasury::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Proposed { - pub proposal_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Proposed { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.proposal_index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - Proposed, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Proposed { proposal_index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Proposed { - fn from(x: ::subxt::ext::codec::Compact) -> Proposed { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Proposed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Proposed { - proposal_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proposed::proposal_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Proposed { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.proposal_index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.proposal_index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.proposal_index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.proposal_index, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Proposed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Proposed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Proposed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Proposed { - proposal_index: { - let val = *vals - .get(&Some("proposal_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Proposed { - proposal_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Proposed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Proposed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Proposed { proposal_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Proposed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Proposed { proposal_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Proposed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Proposed", - "proposal_index", - &&self.proposal_index, - ) - } - } - impl ::subxt::events::StaticEvent for Proposed { - const PALLET: &'static str = "Treasury"; - const EVENT: &'static str = "Proposed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Spending { - pub budget_remaining: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Spending { - type As = ::core::primitive::u128; - fn encode_as(&self) -> &::core::primitive::u128 { - &self.budget_remaining - } - fn decode_from( - x: ::core::primitive::u128, - ) -> ::core::result::Result< - Spending, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Spending { budget_remaining: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Spending { - fn from(x: ::subxt::ext::codec::Compact) -> Spending { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Spending { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Spending { - budget_remaining: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Spending::budget_remaining`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Spending { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &&self.budget_remaining, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.budget_remaining, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.budget_remaining) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.budget_remaining, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Spending {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Spending { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Spending; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Spending { - budget_remaining: { - let val = *vals - .get(&Some("budget_remaining")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "budget_remaining".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("budget_remaining"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Spending { - budget_remaining: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("budget_remaining"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Spending { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Spending { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Spending { budget_remaining } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("budget_remaining"), - budget_remaining - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Spending { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Spending { budget_remaining } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("budget_remaining"), - budget_remaining - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Spending { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Spending", - "budget_remaining", - &&self.budget_remaining, - ) - } - } - impl ::subxt::events::StaticEvent for Spending { - const PALLET: &'static str = "Treasury"; - const EVENT: &'static str = "Spending"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Awarded { - pub proposal_index: ::core::primitive::u32, - pub award: ::core::primitive::u128, - pub account: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Awarded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Awarded { - proposal_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Awarded::proposal_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - award: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Awarded::award`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Awarded::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Awarded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.award), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.account), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.award, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.account, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Awarded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Awarded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Awarded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Awarded { - proposal_index: { - let val = *vals - .get(&Some("proposal_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - award: { - let val = *vals - .get(&Some("award")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "award".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("award"))? - }, - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Awarded { - proposal_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - award: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("award"))? - }, - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Awarded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Awarded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Awarded { proposal_index, award, account } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("award"), - award as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Awarded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Awarded { proposal_index, award, account } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("award"), - award as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Awarded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Awarded", - "proposal_index", - &self.proposal_index, - "award", - &self.award, - "account", - &&self.account, - ) - } - } - impl ::subxt::events::StaticEvent for Awarded { - const PALLET: &'static str = "Treasury"; - const EVENT: &'static str = "Awarded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Rejected { - pub proposal_index: ::core::primitive::u32, - pub slashed: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Rejected { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Rejected { - proposal_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Rejected::proposal_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - slashed: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Rejected::slashed`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Rejected { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.slashed), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.slashed, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Rejected {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Rejected { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Rejected; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Rejected { - proposal_index: { - let val = *vals - .get(&Some("proposal_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - slashed: { - let val = *vals - .get(&Some("slashed")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "slashed".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("slashed"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Rejected { - proposal_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - slashed: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("slashed"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Rejected { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Rejected { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rejected { proposal_index, slashed } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slashed"), - slashed as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Rejected { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rejected { proposal_index, slashed } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slashed"), - slashed as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Rejected { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Rejected", - "proposal_index", - &self.proposal_index, - "slashed", - &&self.slashed, - ) - } - } - impl ::subxt::events::StaticEvent for Rejected { - const PALLET: &'static str = "Treasury"; - const EVENT: &'static str = "Rejected"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Burnt { - pub burnt_funds: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Burnt { - type As = ::core::primitive::u128; - fn encode_as(&self) -> &::core::primitive::u128 { - &self.burnt_funds - } - fn decode_from( - x: ::core::primitive::u128, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Burnt { burnt_funds: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Burnt { - fn from(x: ::subxt::ext::codec::Compact) -> Burnt { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Burnt { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Burnt { - burnt_funds: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Burnt::burnt_funds`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Burnt { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.burnt_funds) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.burnt_funds, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.burnt_funds) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.burnt_funds, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Burnt {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Burnt { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Burnt; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Burnt { - burnt_funds: { - let val = *vals - .get(&Some("burnt_funds")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "burnt_funds".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("burnt_funds"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Burnt { - burnt_funds: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("burnt_funds"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Burnt { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Burnt { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Burnt { burnt_funds } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("burnt_funds"), - burnt_funds as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Burnt { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Burnt { burnt_funds } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("burnt_funds"), - burnt_funds as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Burnt { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Burnt", - "burnt_funds", - &&self.burnt_funds, - ) - } - } - impl ::subxt::events::StaticEvent for Burnt { - const PALLET: &'static str = "Treasury"; - const EVENT: &'static str = "Burnt"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Rollover { - pub rollover_balance: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Rollover { - type As = ::core::primitive::u128; - fn encode_as(&self) -> &::core::primitive::u128 { - &self.rollover_balance - } - fn decode_from( - x: ::core::primitive::u128, - ) -> ::core::result::Result< - Rollover, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Rollover { rollover_balance: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Rollover { - fn from(x: ::subxt::ext::codec::Compact) -> Rollover { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Rollover { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Rollover { - rollover_balance: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Rollover::rollover_balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Rollover { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &&self.rollover_balance, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.rollover_balance, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.rollover_balance) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.rollover_balance, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Rollover {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Rollover { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Rollover; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Rollover { - rollover_balance: { - let val = *vals - .get(&Some("rollover_balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "rollover_balance".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("rollover_balance"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Rollover { - rollover_balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("rollover_balance"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Rollover { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Rollover { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rollover { rollover_balance } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("rollover_balance"), - rollover_balance - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Rollover { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rollover { rollover_balance } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("rollover_balance"), - rollover_balance - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Rollover { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Rollover", - "rollover_balance", - &&self.rollover_balance, - ) - } - } - impl ::subxt::events::StaticEvent for Rollover { - const PALLET: &'static str = "Treasury"; - const EVENT: &'static str = "Rollover"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Deposit { - pub value: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Deposit { - type As = ::core::primitive::u128; - fn encode_as(&self) -> &::core::primitive::u128 { - &self.value - } - fn decode_from( - x: ::core::primitive::u128, - ) -> ::core::result::Result< - Deposit, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Deposit { value: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Deposit { - fn from(x: ::subxt::ext::codec::Compact) -> Deposit { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Deposit { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Deposit { - value: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Deposit::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Deposit { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.value) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.value, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.value) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.value, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Deposit {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Deposit { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Deposit; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Deposit { - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Deposit { - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Deposit { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Deposit { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Deposit { value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Deposit { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Deposit { value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Deposit { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Deposit", - "value", - &&self.value, - ) - } - } - impl ::subxt::events::StaticEvent for Deposit { - const PALLET: &'static str = "Treasury"; - const EVENT: &'static str = "Deposit"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SpendApproved { - pub proposal_index: ::core::primitive::u32, - pub amount: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SpendApproved { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(SpendApproved { - proposal_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SpendApproved::proposal_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SpendApproved::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SpendApproved::beneficiary`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SpendApproved { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.beneficiary), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.beneficiary, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SpendApproved {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SpendApproved { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SpendApproved; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SpendApproved { - proposal_index: { - let val = *vals - .get(&Some("proposal_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(SpendApproved { - proposal_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SpendApproved { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SpendApproved { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SpendApproved { proposal_index, amount, beneficiary } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SpendApproved { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SpendApproved { proposal_index, amount, beneficiary } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SpendApproved { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SpendApproved", - "proposal_index", - &self.proposal_index, - "amount", - &self.amount, - "beneficiary", - &&self.beneficiary, - ) - } - } - impl ::subxt::events::StaticEvent for SpendApproved { - const PALLET: &'static str = "Treasury"; - const EVENT: &'static str = "SpendApproved"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UpdatedInactive { - pub reactivated: ::core::primitive::u128, - pub deactivated: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for UpdatedInactive { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(UpdatedInactive { - reactivated: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UpdatedInactive::reactivated`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deactivated: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UpdatedInactive::deactivated`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for UpdatedInactive { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.reactivated), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deactivated), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.reactivated, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deactivated, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for UpdatedInactive {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for UpdatedInactive { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UpdatedInactive; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(UpdatedInactive { - reactivated: { - let val = *vals - .get(&Some("reactivated")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reactivated".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reactivated"))? - }, - deactivated: { - let val = *vals - .get(&Some("deactivated")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deactivated".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deactivated"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(UpdatedInactive { - reactivated: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reactivated"))? - }, - deactivated: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deactivated"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for UpdatedInactive { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for UpdatedInactive { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UpdatedInactive { reactivated, deactivated } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reactivated"), - reactivated as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deactivated"), - deactivated as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for UpdatedInactive { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UpdatedInactive { reactivated, deactivated } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reactivated"), - reactivated as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deactivated"), - deactivated as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for UpdatedInactive { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "UpdatedInactive", - "reactivated", - &self.reactivated, - "deactivated", - &&self.deactivated, - ) - } - } - impl ::subxt::events::StaticEvent for UpdatedInactive { - const PALLET: &'static str = "Treasury"; - const EVENT: &'static str = "UpdatedInactive"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn proposal_count( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Treasury", - "ProposalCount", - ::alloc::vec::Vec::new(), - [ - 91u8, - 238u8, - 246u8, - 106u8, - 95u8, - 66u8, - 83u8, - 134u8, - 1u8, - 225u8, - 164u8, - 216u8, - 113u8, - 101u8, - 203u8, - 200u8, - 113u8, - 97u8, - 246u8, - 228u8, - 140u8, - 29u8, - 29u8, - 48u8, - 176u8, - 137u8, - 93u8, - 230u8, - 56u8, - 75u8, - 51u8, - 149u8, - ], - ) - } - pub fn proposals_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_treasury::Proposal< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Treasury", - "Proposals", - ::alloc::vec::Vec::new(), - [ - 207u8, - 135u8, - 145u8, - 146u8, - 48u8, - 10u8, - 252u8, - 40u8, - 20u8, - 115u8, - 205u8, - 41u8, - 173u8, - 83u8, - 115u8, - 46u8, - 106u8, - 40u8, - 130u8, - 157u8, - 213u8, - 87u8, - 45u8, - 23u8, - 14u8, - 167u8, - 99u8, - 208u8, - 153u8, - 163u8, - 141u8, - 55u8, - ], - ) - } - pub fn proposals( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_treasury::Proposal< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Treasury", - "Proposals", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 207u8, - 135u8, - 145u8, - 146u8, - 48u8, - 10u8, - 252u8, - 40u8, - 20u8, - 115u8, - 205u8, - 41u8, - 173u8, - 83u8, - 115u8, - 46u8, - 106u8, - 40u8, - 130u8, - 157u8, - 213u8, - 87u8, - 45u8, - 23u8, - 14u8, - 167u8, - 99u8, - 208u8, - 153u8, - 163u8, - 141u8, - 55u8, - ], - ) - } - pub fn deactivated( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Treasury", - "Deactivated", - ::alloc::vec::Vec::new(), - [ - 120u8, - 221u8, - 159u8, - 56u8, - 161u8, - 44u8, - 54u8, - 233u8, - 47u8, - 114u8, - 170u8, - 150u8, - 52u8, - 24u8, - 137u8, - 212u8, - 122u8, - 247u8, - 40u8, - 17u8, - 208u8, - 130u8, - 42u8, - 154u8, - 33u8, - 222u8, - 59u8, - 116u8, - 0u8, - 15u8, - 79u8, - 123u8, - ], - ) - } - pub fn approvals( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Treasury", - "Approvals", - ::alloc::vec::Vec::new(), - [ - 78u8, - 147u8, - 186u8, - 235u8, - 17u8, - 40u8, - 247u8, - 235u8, - 67u8, - 222u8, - 3u8, - 14u8, - 248u8, - 17u8, - 67u8, - 180u8, - 93u8, - 161u8, - 64u8, - 35u8, - 119u8, - 194u8, - 187u8, - 226u8, - 135u8, - 162u8, - 147u8, - 174u8, - 139u8, - 72u8, - 99u8, - 212u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn proposal_bond( - &self, - ) -> ::subxt::constants::Address< - runtime_types::sp_arithmetic::per_things::Permill, - > { - ::subxt::constants::Address::new_static( - "Treasury", - "ProposalBond", - [ - 65u8, - 93u8, - 120u8, - 165u8, - 204u8, - 81u8, - 159u8, - 163u8, - 93u8, - 135u8, - 114u8, - 121u8, - 147u8, - 35u8, - 215u8, - 213u8, - 4u8, - 223u8, - 83u8, - 37u8, - 225u8, - 200u8, - 189u8, - 156u8, - 140u8, - 36u8, - 58u8, - 46u8, - 42u8, - 232u8, - 155u8, - 0u8, - ], - ) - } - pub fn proposal_bond_minimum( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Treasury", - "ProposalBondMinimum", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn proposal_bond_maximum( - &self, - ) -> ::subxt::constants::Address< - ::core::option::Option<::core::primitive::u128>, - > { - ::subxt::constants::Address::new_static( - "Treasury", - "ProposalBondMaximum", - [ - 198u8, - 51u8, - 89u8, - 159u8, - 124u8, - 251u8, - 51u8, - 80u8, - 167u8, - 193u8, - 44u8, - 199u8, - 80u8, - 36u8, - 41u8, - 130u8, - 137u8, - 229u8, - 178u8, - 208u8, - 37u8, - 215u8, - 169u8, - 183u8, - 180u8, - 191u8, - 140u8, - 240u8, - 250u8, - 61u8, - 42u8, - 147u8, - ], - ) - } - pub fn spend_period( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Treasury", - "SpendPeriod", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn burn( - &self, - ) -> ::subxt::constants::Address< - runtime_types::sp_arithmetic::per_things::Permill, - > { - ::subxt::constants::Address::new_static( - "Treasury", - "Burn", - [ - 65u8, - 93u8, - 120u8, - 165u8, - 204u8, - 81u8, - 159u8, - 163u8, - 93u8, - 135u8, - 114u8, - 121u8, - 147u8, - 35u8, - 215u8, - 213u8, - 4u8, - 223u8, - 83u8, - 37u8, - 225u8, - 200u8, - 189u8, - 156u8, - 140u8, - 36u8, - 58u8, - 46u8, - 42u8, - 232u8, - 155u8, - 0u8, - ], - ) - } - pub fn pallet_id( - &self, - ) -> ::subxt::constants::Address< - runtime_types::frame_support::PalletId, - > { - ::subxt::constants::Address::new_static( - "Treasury", - "PalletId", - [ - 56u8, - 243u8, - 53u8, - 83u8, - 154u8, - 179u8, - 170u8, - 80u8, - 133u8, - 173u8, - 61u8, - 161u8, - 47u8, - 225u8, - 146u8, - 21u8, - 50u8, - 229u8, - 248u8, - 27u8, - 104u8, - 58u8, - 129u8, - 197u8, - 102u8, - 160u8, - 168u8, - 205u8, - 154u8, - 42u8, - 217u8, - 53u8, - ], - ) - } - pub fn max_approvals( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Treasury", - "MaxApprovals", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod conviction_voting { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_conviction_voting::pallet::Error; - pub type Call = runtime_types::pallet_conviction_voting::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote { - #[codec(compact)] - pub poll_index: ::core::primitive::u32, - pub vote: runtime_types::pallet_conviction_voting::vote::AccountVote< - ::core::primitive::u128, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Vote { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Vote { - poll_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Vote::poll_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - vote: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Vote::vote`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Vote { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.poll_index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.vote), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.poll_index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.vote, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Vote {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Vote { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Vote; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Vote { - poll_index: { - let val = *vals - .get(&Some("poll_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "poll_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("poll_index"))? - }, - vote: { - let val = *vals - .get(&Some("vote")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "vote".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("vote"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Vote { - poll_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("poll_index"))? - }, - vote: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("vote"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Vote { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Vote { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vote { poll_index, vote } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("poll_index"), - poll_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("vote"), - vote as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Vote { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vote { poll_index, vote } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("poll_index"), - poll_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("vote"), - vote as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Vote { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Vote", - "poll_index", - &self.poll_index, - "vote", - &&self.vote, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Vote { - const PALLET: &'static str = "ConvictionVoting"; - const CALL: &'static str = "vote"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Delegate { - pub class: ::core::primitive::u16, - pub to: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub conviction: runtime_types::pallet_conviction_voting::conviction::Conviction, - pub balance: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Delegate { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Delegate { - class: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegate::class`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - to: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegate::to`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - conviction: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegate::conviction`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - balance: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegate::balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Delegate { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.class), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.to), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.conviction), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.balance), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.class, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.to, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.conviction, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.balance, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Delegate {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Delegate { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Delegate; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Delegate { - class: { - let val = *vals - .get(&Some("class")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "class".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - to: { - let val = *vals - .get(&Some("to")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "to".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - conviction: { - let val = *vals - .get(&Some("conviction")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "conviction".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("conviction"))? - }, - balance: { - let val = *vals - .get(&Some("balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "balance".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(Delegate { - class: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - to: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - conviction: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("conviction"))? - }, - balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Delegate { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Delegate { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Delegate { class, to, conviction, balance } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("class"), - class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("conviction"), - conviction as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Delegate { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Delegate { class, to, conviction, balance } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("class"), - class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("conviction"), - conviction as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Delegate { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Delegate", - "class", - &self.class, - "to", - &self.to, - "conviction", - &self.conviction, - "balance", - &&self.balance, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Delegate { - const PALLET: &'static str = "ConvictionVoting"; - const CALL: &'static str = "delegate"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Undelegate { - pub class: ::core::primitive::u16, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Undelegate { - type As = ::core::primitive::u16; - fn encode_as(&self) -> &::core::primitive::u16 { - &self.class - } - fn decode_from( - x: ::core::primitive::u16, - ) -> ::core::result::Result< - Undelegate, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Undelegate { class: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for Undelegate { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> Undelegate { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Undelegate { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Undelegate { - class: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Undelegate::class`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Undelegate { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.class) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.class, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.class) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.class, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Undelegate {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Undelegate { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Undelegate; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Undelegate { - class: { - let val = *vals - .get(&Some("class")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "class".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Undelegate { - class: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Undelegate { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Undelegate { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Undelegate { class } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("class"), - class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Undelegate { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Undelegate { class } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("class"), - class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Undelegate { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Undelegate", - "class", - &&self.class, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Undelegate { - const PALLET: &'static str = "ConvictionVoting"; - const CALL: &'static str = "undelegate"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Unlock { - pub class: ::core::primitive::u16, - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Unlock { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Unlock { - class: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unlock::class`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unlock::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Unlock { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.class), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.target), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.class, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.target, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Unlock {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Unlock { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Unlock; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Unlock { - class: { - let val = *vals - .get(&Some("class")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "class".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Unlock { - class: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Unlock { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Unlock { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unlock { class, target } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("class"), - class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Unlock { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unlock { class, target } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("class"), - class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Unlock { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Unlock", - "class", - &self.class, - "target", - &&self.target, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Unlock { - const PALLET: &'static str = "ConvictionVoting"; - const CALL: &'static str = "unlock"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveVote { - pub class: ::core::option::Option<::core::primitive::u16>, - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RemoveVote { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RemoveVote { - class: { - let __codec_res_edqy = <::core::option::Option< - ::core::primitive::u16, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveVote::class`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveVote::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RemoveVote { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.class), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.class, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RemoveVote {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RemoveVote { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RemoveVote; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RemoveVote { - class: { - let val = *vals - .get(&Some("class")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "class".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(RemoveVote { - class: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for RemoveVote { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RemoveVote { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveVote { class, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("class"), - class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RemoveVote { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveVote { class, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("class"), - class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RemoveVote { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "RemoveVote", - "class", - &self.class, - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RemoveVote { - const PALLET: &'static str = "ConvictionVoting"; - const CALL: &'static str = "remove_vote"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveOtherVote { - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub class: ::core::primitive::u16, - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RemoveOtherVote { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RemoveOtherVote { - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveOtherVote::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - class: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveOtherVote::class`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveOtherVote::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RemoveOtherVote { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.target), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.class), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.target, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.class, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RemoveOtherVote {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for RemoveOtherVote { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RemoveOtherVote; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RemoveOtherVote { - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - class: { - let val = *vals - .get(&Some("class")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "class".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(RemoveOtherVote { - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - class: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for RemoveOtherVote { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RemoveOtherVote { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveOtherVote { target, class, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("class"), - class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RemoveOtherVote { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveOtherVote { target, class, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("class"), - class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RemoveOtherVote { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "RemoveOtherVote", - "target", - &self.target, - "class", - &self.class, - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RemoveOtherVote { - const PALLET: &'static str = "ConvictionVoting"; - const CALL: &'static str = "remove_other_vote"; - } - } - pub struct TransactionApi; - impl TransactionApi { - 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", - types::Vote { poll_index, vote }, - [ - 57u8, - 170u8, - 177u8, - 168u8, - 158u8, - 43u8, - 87u8, - 242u8, - 176u8, - 85u8, - 230u8, - 64u8, - 103u8, - 239u8, - 190u8, - 6u8, - 228u8, - 165u8, - 248u8, - 77u8, - 231u8, - 221u8, - 186u8, - 107u8, - 249u8, - 201u8, - 226u8, - 52u8, - 129u8, - 90u8, - 142u8, - 159u8, - ], - ) - } - pub fn delegate( - &self, - class: ::core::primitive::u16, - to: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - conviction: runtime_types::pallet_conviction_voting::conviction::Conviction, - balance: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ConvictionVoting", - "delegate", - types::Delegate { - class, - to, - conviction, - balance, - }, - [ - 223u8, - 143u8, - 33u8, - 94u8, - 32u8, - 156u8, - 43u8, - 40u8, - 142u8, - 134u8, - 209u8, - 134u8, - 255u8, - 179u8, - 97u8, - 46u8, - 8u8, - 140u8, - 5u8, - 29u8, - 76u8, - 22u8, - 36u8, - 7u8, - 108u8, - 190u8, - 220u8, - 151u8, - 10u8, - 47u8, - 89u8, - 55u8, - ], - ) - } - pub fn undelegate( - &self, - class: ::core::primitive::u16, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ConvictionVoting", - "undelegate", - types::Undelegate { class }, - [ - 140u8, - 232u8, - 6u8, - 53u8, - 228u8, - 8u8, - 131u8, - 144u8, - 65u8, - 66u8, - 245u8, - 247u8, - 147u8, - 135u8, - 198u8, - 57u8, - 82u8, - 212u8, - 89u8, - 46u8, - 236u8, - 168u8, - 200u8, - 220u8, - 93u8, - 168u8, - 101u8, - 29u8, - 110u8, - 76u8, - 67u8, - 181u8, - ], - ) - } - pub fn unlock( - &self, - class: ::core::primitive::u16, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ConvictionVoting", - "unlock", - types::Unlock { class, target }, - [ - 79u8, - 5u8, - 252u8, - 237u8, - 109u8, - 238u8, - 157u8, - 237u8, - 125u8, - 171u8, - 65u8, - 160u8, - 102u8, - 192u8, - 5u8, - 141u8, - 179u8, - 249u8, - 253u8, - 213u8, - 105u8, - 251u8, - 241u8, - 145u8, - 186u8, - 177u8, - 244u8, - 139u8, - 71u8, - 140u8, - 173u8, - 108u8, - ], - ) - } - 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", - types::RemoveVote { class, index }, - [ - 255u8, - 108u8, - 211u8, - 146u8, - 168u8, - 231u8, - 207u8, - 44u8, - 76u8, - 24u8, - 235u8, - 60u8, - 23u8, - 79u8, - 192u8, - 192u8, - 46u8, - 40u8, - 134u8, - 27u8, - 125u8, - 114u8, - 125u8, - 247u8, - 85u8, - 102u8, - 76u8, - 159u8, - 34u8, - 167u8, - 152u8, - 148u8, - ], - ) - } - pub fn remove_other_vote( - &self, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - class: ::core::primitive::u16, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ConvictionVoting", - "remove_other_vote", - types::RemoveOtherVote { - target, - class, - index, - }, - [ - 165u8, - 26u8, - 166u8, - 37u8, - 10u8, - 174u8, - 243u8, - 10u8, - 73u8, - 93u8, - 213u8, - 69u8, - 200u8, - 16u8, - 48u8, - 146u8, - 160u8, - 92u8, - 28u8, - 26u8, - 158u8, - 55u8, - 6u8, - 251u8, - 36u8, - 132u8, - 46u8, - 195u8, - 107u8, - 34u8, - 0u8, - 100u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_conviction_voting::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Delegated( - pub ::subxt::utils::AccountId32, - pub ::subxt::utils::AccountId32, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Delegated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - Delegated( - { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegated.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegated.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Delegated { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Delegated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Delegated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Delegated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - Delegated( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Delegated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Delegated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Delegated(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Delegated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Delegated(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Delegated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "Delegated", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for Delegated { - const PALLET: &'static str = "ConvictionVoting"; - const EVENT: &'static str = "Delegated"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Undelegated(pub ::subxt::utils::AccountId32); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Undelegated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - Undelegated({ - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Undelegated.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Undelegated { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Undelegated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Undelegated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Undelegated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Undelegated({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Undelegated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Undelegated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Undelegated(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Undelegated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Undelegated(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Undelegated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Undelegated", - &&self.0, - ) - } - } - impl ::subxt::events::StaticEvent for Undelegated { - const PALLET: &'static str = "ConvictionVoting"; - const EVENT: &'static str = "Undelegated"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn voting_for_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_conviction_voting::vote::Voting< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - ::core::primitive::u32, - ::core::primitive::u32, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ConvictionVoting", - "VotingFor", - ::alloc::vec::Vec::new(), - [ - 76u8, - 63u8, - 153u8, - 193u8, - 39u8, - 137u8, - 186u8, - 29u8, - 202u8, - 56u8, - 169u8, - 56u8, - 103u8, - 138u8, - 192u8, - 18u8, - 179u8, - 114u8, - 56u8, - 121u8, - 197u8, - 12u8, - 29u8, - 239u8, - 220u8, - 231u8, - 24u8, - 46u8, - 134u8, - 99u8, - 53u8, - 206u8, - ], - ) - } - pub fn voting_for_iter1( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_conviction_voting::vote::Voting< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - ::core::primitive::u32, - ::core::primitive::u32, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ConvictionVoting", - "VotingFor", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 76u8, - 63u8, - 153u8, - 193u8, - 39u8, - 137u8, - 186u8, - 29u8, - 202u8, - 56u8, - 169u8, - 56u8, - 103u8, - 138u8, - 192u8, - 18u8, - 179u8, - 114u8, - 56u8, - 121u8, - 197u8, - 12u8, - 29u8, - 239u8, - 220u8, - 231u8, - 24u8, - 46u8, - 134u8, - 99u8, - 53u8, - 206u8, - ], - ) - } - pub fn voting_for( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u16>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_conviction_voting::vote::Voting< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - ::core::primitive::u32, - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ConvictionVoting", - "VotingFor", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 76u8, - 63u8, - 153u8, - 193u8, - 39u8, - 137u8, - 186u8, - 29u8, - 202u8, - 56u8, - 169u8, - 56u8, - 103u8, - 138u8, - 192u8, - 18u8, - 179u8, - 114u8, - 56u8, - 121u8, - 197u8, - 12u8, - 29u8, - 239u8, - 220u8, - 231u8, - 24u8, - 46u8, - 134u8, - 99u8, - 53u8, - 206u8, - ], - ) - } - pub fn class_locks_for_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - (::core::primitive::u16, ::core::primitive::u128), - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ConvictionVoting", - "ClassLocksFor", - ::alloc::vec::Vec::new(), - [ - 74u8, - 74u8, - 8u8, - 82u8, - 215u8, - 61u8, - 13u8, - 9u8, - 44u8, - 222u8, - 33u8, - 245u8, - 195u8, - 124u8, - 6u8, - 174u8, - 65u8, - 245u8, - 71u8, - 42u8, - 47u8, - 46u8, - 164u8, - 231u8, - 11u8, - 245u8, - 115u8, - 207u8, - 209u8, - 137u8, - 90u8, - 6u8, - ], - ) - } - pub fn class_locks_for( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - (::core::primitive::u16, ::core::primitive::u128), - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ConvictionVoting", - "ClassLocksFor", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 74u8, - 74u8, - 8u8, - 82u8, - 215u8, - 61u8, - 13u8, - 9u8, - 44u8, - 222u8, - 33u8, - 245u8, - 195u8, - 124u8, - 6u8, - 174u8, - 65u8, - 245u8, - 71u8, - 42u8, - 47u8, - 46u8, - 164u8, - 231u8, - 11u8, - 245u8, - 115u8, - 207u8, - 209u8, - 137u8, - 90u8, - 6u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn max_votes( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ConvictionVoting", - "MaxVotes", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn vote_locking_period( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "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 referenda { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_referenda::pallet::Error; - pub type Call = runtime_types::pallet_referenda::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Submit { - pub proposal_origin: ::std::boxed::Box< - runtime_types::polkadot_runtime::OriginCaller, - >, - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - pub enactment_moment: runtime_types::frame_support::traits::schedule::DispatchTime< - ::core::primitive::u32, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Submit { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Submit { - proposal_origin: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::OriginCaller, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Submit::proposal_origin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Submit::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - enactment_moment: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Submit::enactment_moment`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Submit { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.proposal_origin, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.enactment_moment, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposal_origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proposal, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.enactment_moment, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Submit {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Submit { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Submit; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Submit { - proposal_origin: { - let val = *vals - .get(&Some("proposal_origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_origin".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_origin"))? - }, - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - enactment_moment: { - let val = *vals - .get(&Some("enactment_moment")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "enactment_moment".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("enactment_moment"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Submit { - proposal_origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_origin"))? - }, - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - enactment_moment: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("enactment_moment"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Submit { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Submit { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Submit { proposal_origin, proposal, enactment_moment } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_origin"), - proposal_origin - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("enactment_moment"), - enactment_moment - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Submit { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Submit { proposal_origin, proposal, enactment_moment } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_origin"), - proposal_origin - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("enactment_moment"), - enactment_moment - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Submit { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Submit", - "proposal_origin", - &self.proposal_origin, - "proposal", - &self.proposal, - "enactment_moment", - &&self.enactment_moment, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Submit { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "submit"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PlaceDecisionDeposit { - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for PlaceDecisionDeposit { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - PlaceDecisionDeposit, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(PlaceDecisionDeposit { - index: x, - }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for PlaceDecisionDeposit { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> PlaceDecisionDeposit { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PlaceDecisionDeposit { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(PlaceDecisionDeposit { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PlaceDecisionDeposit::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PlaceDecisionDeposit { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PlaceDecisionDeposit {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for PlaceDecisionDeposit { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PlaceDecisionDeposit; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PlaceDecisionDeposit { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(PlaceDecisionDeposit { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PlaceDecisionDeposit { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for PlaceDecisionDeposit { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PlaceDecisionDeposit { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for PlaceDecisionDeposit { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PlaceDecisionDeposit { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PlaceDecisionDeposit { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "PlaceDecisionDeposit", - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for PlaceDecisionDeposit { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "place_decision_deposit"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RefundDecisionDeposit { - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for RefundDecisionDeposit { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - RefundDecisionDeposit, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RefundDecisionDeposit { - index: x, - }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for RefundDecisionDeposit { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> RefundDecisionDeposit { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RefundDecisionDeposit { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RefundDecisionDeposit { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RefundDecisionDeposit::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RefundDecisionDeposit { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RefundDecisionDeposit {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for RefundDecisionDeposit { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RefundDecisionDeposit; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RefundDecisionDeposit { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(RefundDecisionDeposit { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for RefundDecisionDeposit { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for RefundDecisionDeposit { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RefundDecisionDeposit { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for RefundDecisionDeposit { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RefundDecisionDeposit { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RefundDecisionDeposit { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "RefundDecisionDeposit", - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RefundDecisionDeposit { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "refund_decision_deposit"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Cancel { - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Cancel { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - Cancel, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Cancel { index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Cancel { - fn from(x: ::subxt::ext::codec::Compact) -> Cancel { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Cancel { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Cancel { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Cancel::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Cancel { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Cancel {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Cancel { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Cancel; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Cancel { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Cancel { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Cancel { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Cancel { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Cancel { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Cancel { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Cancel { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Cancel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Cancel", - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Cancel { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "cancel"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Kill { - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Kill { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - Kill, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Kill { index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Kill { - fn from(x: ::subxt::ext::codec::Compact) -> Kill { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Kill { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Kill { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Kill::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Kill { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Kill {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Kill { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Kill; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Kill { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Kill { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Kill { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Kill { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Kill { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Kill { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Kill { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Kill { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Kill", - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Kill { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "kill"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NudgeReferendum { - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for NudgeReferendum { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - NudgeReferendum, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(NudgeReferendum { index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for NudgeReferendum { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> NudgeReferendum { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NudgeReferendum { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(NudgeReferendum { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NudgeReferendum::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NudgeReferendum { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NudgeReferendum {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for NudgeReferendum { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NudgeReferendum; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(NudgeReferendum { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(NudgeReferendum { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for NudgeReferendum { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NudgeReferendum { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NudgeReferendum { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for NudgeReferendum { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NudgeReferendum { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NudgeReferendum { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "NudgeReferendum", - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for NudgeReferendum { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "nudge_referendum"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OneFewerDeciding { - pub track: ::core::primitive::u16, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for OneFewerDeciding { - type As = ::core::primitive::u16; - fn encode_as(&self) -> &::core::primitive::u16 { - &self.track - } - fn decode_from( - x: ::core::primitive::u16, - ) -> ::core::result::Result< - OneFewerDeciding, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(OneFewerDeciding { track: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for OneFewerDeciding { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> OneFewerDeciding { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for OneFewerDeciding { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(OneFewerDeciding { - track: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OneFewerDeciding::track`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for OneFewerDeciding { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.track) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.track, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.track) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.track, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for OneFewerDeciding {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for OneFewerDeciding { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = OneFewerDeciding; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(OneFewerDeciding { - track: { - let val = *vals - .get(&Some("track")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "track".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("track"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(OneFewerDeciding { - track: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("track"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for OneFewerDeciding { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for OneFewerDeciding { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OneFewerDeciding { track } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("track"), - track as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for OneFewerDeciding { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OneFewerDeciding { track } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("track"), - track as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for OneFewerDeciding { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "OneFewerDeciding", - "track", - &&self.track, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for OneFewerDeciding { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "one_fewer_deciding"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RefundSubmissionDeposit { - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for RefundSubmissionDeposit { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - RefundSubmissionDeposit, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RefundSubmissionDeposit { - index: x, - }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for RefundSubmissionDeposit { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> RefundSubmissionDeposit { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RefundSubmissionDeposit { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RefundSubmissionDeposit { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RefundSubmissionDeposit::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RefundSubmissionDeposit { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for RefundSubmissionDeposit {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for RefundSubmissionDeposit { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RefundSubmissionDeposit; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RefundSubmissionDeposit { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(RefundSubmissionDeposit { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for RefundSubmissionDeposit { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for RefundSubmissionDeposit { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RefundSubmissionDeposit { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for RefundSubmissionDeposit { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RefundSubmissionDeposit { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RefundSubmissionDeposit { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "RefundSubmissionDeposit", - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RefundSubmissionDeposit { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "refund_submission_deposit"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMetadata { - pub index: ::core::primitive::u32, - pub maybe_hash: ::core::option::Option<::subxt::utils::H256>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetMetadata { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMetadata { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMetadata::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_hash: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::H256, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMetadata::maybe_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetMetadata { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.maybe_hash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.maybe_hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetMetadata {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetMetadata { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMetadata; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMetadata { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - maybe_hash: { - let val = *vals - .get(&Some("maybe_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("maybe_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SetMetadata { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - maybe_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("maybe_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SetMetadata { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetMetadata { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMetadata { index, maybe_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_hash"), - maybe_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetMetadata { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMetadata { index, maybe_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_hash"), - maybe_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMetadata { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SetMetadata", - "index", - &self.index, - "maybe_hash", - &&self.maybe_hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetMetadata { - const PALLET: &'static str = "Referenda"; - const CALL: &'static str = "set_metadata"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn submit( - &self, - proposal_origin: runtime_types::polkadot_runtime::OriginCaller, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - enactment_moment: runtime_types::frame_support::traits::schedule::DispatchTime< - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Referenda", - "submit", - types::Submit { - proposal_origin: ::std::boxed::Box::new(proposal_origin), - proposal, - enactment_moment, - }, - [ - 27u8, - 68u8, - 3u8, - 170u8, - 74u8, - 43u8, - 11u8, - 147u8, - 35u8, - 174u8, - 234u8, - 118u8, - 27u8, - 235u8, - 186u8, - 21u8, - 31u8, - 242u8, - 224u8, - 26u8, - 179u8, - 169u8, - 177u8, - 186u8, - 16u8, - 147u8, - 222u8, - 159u8, - 249u8, - 70u8, - 7u8, - 248u8, - ], - ) - } - pub fn place_decision_deposit( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Referenda", - "place_decision_deposit", - types::PlaceDecisionDeposit { - index, - }, - [ - 247u8, - 158u8, - 55u8, - 191u8, - 188u8, - 200u8, - 3u8, - 47u8, - 20u8, - 175u8, - 86u8, - 203u8, - 52u8, - 253u8, - 91u8, - 131u8, - 21u8, - 213u8, - 56u8, - 68u8, - 40u8, - 84u8, - 184u8, - 30u8, - 9u8, - 193u8, - 63u8, - 182u8, - 178u8, - 241u8, - 247u8, - 220u8, - ], - ) - } - pub fn refund_decision_deposit( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Referenda", - "refund_decision_deposit", - types::RefundDecisionDeposit { - index, - }, - [ - 159u8, - 19u8, - 35u8, - 216u8, - 114u8, - 105u8, - 18u8, - 42u8, - 148u8, - 151u8, - 136u8, - 92u8, - 117u8, - 30u8, - 29u8, - 41u8, - 238u8, - 58u8, - 195u8, - 91u8, - 115u8, - 135u8, - 96u8, - 99u8, - 154u8, - 233u8, - 8u8, - 249u8, - 145u8, - 165u8, - 77u8, - 164u8, - ], - ) - } - pub fn cancel( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Referenda", - "cancel", - types::Cancel { index }, - [ - 55u8, - 206u8, - 119u8, - 156u8, - 238u8, - 165u8, - 193u8, - 73u8, - 242u8, - 13u8, - 212u8, - 75u8, - 136u8, - 156u8, - 151u8, - 14u8, - 35u8, - 41u8, - 156u8, - 107u8, - 60u8, - 190u8, - 39u8, - 216u8, - 8u8, - 74u8, - 213u8, - 130u8, - 160u8, - 131u8, - 237u8, - 122u8, - ], - ) - } - pub fn kill( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Referenda", - "kill", - types::Kill { index }, - [ - 50u8, - 89u8, - 57u8, - 0u8, - 87u8, - 129u8, - 113u8, - 140u8, - 179u8, - 178u8, - 126u8, - 198u8, - 92u8, - 92u8, - 189u8, - 64u8, - 123u8, - 232u8, - 57u8, - 227u8, - 223u8, - 219u8, - 73u8, - 217u8, - 179u8, - 44u8, - 210u8, - 125u8, - 180u8, - 10u8, - 143u8, - 48u8, - ], - ) - } - pub fn nudge_referendum( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Referenda", - "nudge_referendum", - types::NudgeReferendum { index }, - [ - 75u8, - 99u8, - 172u8, - 30u8, - 170u8, - 150u8, - 211u8, - 229u8, - 249u8, - 128u8, - 194u8, - 246u8, - 100u8, - 142u8, - 193u8, - 184u8, - 232u8, - 81u8, - 29u8, - 17u8, - 99u8, - 91u8, - 236u8, - 85u8, - 230u8, - 226u8, - 57u8, - 115u8, - 45u8, - 170u8, - 54u8, - 213u8, - ], - ) - } - pub fn one_fewer_deciding( - &self, - track: ::core::primitive::u16, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Referenda", - "one_fewer_deciding", - types::OneFewerDeciding { track }, - [ - 15u8, - 84u8, - 79u8, - 231u8, - 21u8, - 239u8, - 244u8, - 143u8, - 183u8, - 215u8, - 181u8, - 25u8, - 225u8, - 195u8, - 95u8, - 171u8, - 17u8, - 156u8, - 182u8, - 128u8, - 111u8, - 40u8, - 151u8, - 102u8, - 196u8, - 55u8, - 36u8, - 212u8, - 89u8, - 190u8, - 131u8, - 167u8, - ], - ) - } - pub fn refund_submission_deposit( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Referenda", - "refund_submission_deposit", - types::RefundSubmissionDeposit { - index, - }, - [ - 20u8, - 217u8, - 115u8, - 6u8, - 1u8, - 60u8, - 54u8, - 136u8, - 35u8, - 41u8, - 38u8, - 23u8, - 85u8, - 100u8, - 141u8, - 126u8, - 30u8, - 160u8, - 61u8, - 46u8, - 134u8, - 98u8, - 82u8, - 38u8, - 211u8, - 124u8, - 208u8, - 222u8, - 210u8, - 10u8, - 155u8, - 122u8, - ], - ) - } - pub fn set_metadata( - &self, - index: ::core::primitive::u32, - maybe_hash: ::core::option::Option<::subxt::utils::H256>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Referenda", - "set_metadata", - types::SetMetadata { - index, - maybe_hash, - }, - [ - 207u8, - 29u8, - 146u8, - 233u8, - 219u8, - 205u8, - 88u8, - 118u8, - 106u8, - 61u8, - 124u8, - 101u8, - 2u8, - 41u8, - 169u8, - 70u8, - 114u8, - 189u8, - 162u8, - 118u8, - 1u8, - 108u8, - 234u8, - 98u8, - 245u8, - 245u8, - 183u8, - 126u8, - 89u8, - 13u8, - 112u8, - 88u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_referenda::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Submitted { - pub index: ::core::primitive::u32, - pub track: ::core::primitive::u16, - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Submitted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Submitted { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Submitted::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - track: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Submitted::track`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Submitted::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Submitted { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.track), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.track, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proposal, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Submitted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Submitted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Submitted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Submitted { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - track: { - let val = *vals - .get(&Some("track")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "track".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("track"))? - }, - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Submitted { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - track: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("track"))? - }, - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Submitted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Submitted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Submitted { index, track, proposal } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("track"), - track as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Submitted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Submitted { index, track, proposal } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("track"), - track as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Submitted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Submitted", - "index", - &self.index, - "track", - &self.track, - "proposal", - &&self.proposal, - ) - } - } - impl ::subxt::events::StaticEvent for Submitted { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Submitted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DecisionDepositPlaced { - pub index: ::core::primitive::u32, - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DecisionDepositPlaced { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(DecisionDepositPlaced { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DecisionDepositPlaced::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DecisionDepositPlaced::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DecisionDepositPlaced::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DecisionDepositPlaced { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DecisionDepositPlaced {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for DecisionDepositPlaced { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DecisionDepositPlaced; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DecisionDepositPlaced { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(DecisionDepositPlaced { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for DecisionDepositPlaced { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DecisionDepositPlaced { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DecisionDepositPlaced { index, who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for DecisionDepositPlaced { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DecisionDepositPlaced { index, who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DecisionDepositPlaced { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "DecisionDepositPlaced", - "index", - &self.index, - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for DecisionDepositPlaced { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "DecisionDepositPlaced"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DecisionDepositRefunded { - pub index: ::core::primitive::u32, - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DecisionDepositRefunded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(DecisionDepositRefunded { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DecisionDepositRefunded::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DecisionDepositRefunded::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `DecisionDepositRefunded::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DecisionDepositRefunded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DecisionDepositRefunded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for DecisionDepositRefunded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DecisionDepositRefunded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DecisionDepositRefunded { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(DecisionDepositRefunded { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for DecisionDepositRefunded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for DecisionDepositRefunded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DecisionDepositRefunded { index, who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for DecisionDepositRefunded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DecisionDepositRefunded { index, who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DecisionDepositRefunded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "DecisionDepositRefunded", - "index", - &self.index, - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for DecisionDepositRefunded { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "DecisionDepositRefunded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DepositSlashed { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DepositSlashed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(DepositSlashed { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DepositSlashed::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DepositSlashed::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DepositSlashed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DepositSlashed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for DepositSlashed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DepositSlashed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DepositSlashed { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(DepositSlashed { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for DepositSlashed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DepositSlashed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DepositSlashed { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for DepositSlashed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DepositSlashed { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DepositSlashed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "DepositSlashed", - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for DepositSlashed { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "DepositSlashed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DecisionStarted { - pub index: ::core::primitive::u32, - pub track: ::core::primitive::u16, - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - pub tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DecisionStarted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(DecisionStarted { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DecisionStarted::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - track: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DecisionStarted::track`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DecisionStarted::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tally: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DecisionStarted::tally`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DecisionStarted { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.track), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.tally), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.track, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proposal, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.tally, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DecisionStarted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for DecisionStarted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DecisionStarted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DecisionStarted { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - track: { - let val = *vals - .get(&Some("track")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "track".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("track"))? - }, - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - tally: { - let val = *vals - .get(&Some("tally")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tally".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(DecisionStarted { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - track: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("track"))? - }, - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - tally: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for DecisionStarted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DecisionStarted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DecisionStarted { index, track, proposal, tally } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("track"), - track as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for DecisionStarted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DecisionStarted { index, track, proposal, tally } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("track"), - track as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DecisionStarted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "DecisionStarted", - "index", - &self.index, - "track", - &self.track, - "proposal", - &self.proposal, - "tally", - &&self.tally, - ) - } - } - impl ::subxt::events::StaticEvent for DecisionStarted { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "DecisionStarted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for ConfirmStarted { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - ConfirmStarted, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ConfirmStarted { index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for ConfirmStarted { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> ConfirmStarted { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ConfirmStarted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ConfirmStarted { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ConfirmStarted::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ConfirmStarted { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ConfirmStarted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ConfirmStarted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ConfirmStarted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ConfirmStarted { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ConfirmStarted { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ConfirmStarted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ConfirmStarted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ConfirmStarted { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ConfirmStarted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ConfirmStarted { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ConfirmStarted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ConfirmStarted", - "index", - &&self.index, - ) - } - } - impl ::subxt::events::StaticEvent for ConfirmStarted { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "ConfirmStarted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for ConfirmAborted { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - ConfirmAborted, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ConfirmAborted { index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for ConfirmAborted { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> ConfirmAborted { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ConfirmAborted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ConfirmAborted { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ConfirmAborted::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ConfirmAborted { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ConfirmAborted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ConfirmAborted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ConfirmAborted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ConfirmAborted { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ConfirmAborted { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ConfirmAborted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ConfirmAborted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ConfirmAborted { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ConfirmAborted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ConfirmAborted { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ConfirmAborted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ConfirmAborted", - "index", - &&self.index, - ) - } - } - impl ::subxt::events::StaticEvent for ConfirmAborted { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "ConfirmAborted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Confirmed { - pub index: ::core::primitive::u32, - pub tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Confirmed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Confirmed { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Confirmed::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tally: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Confirmed::tally`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Confirmed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.tally), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.tally, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Confirmed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Confirmed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Confirmed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Confirmed { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = *vals - .get(&Some("tally")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tally".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Confirmed { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Confirmed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Confirmed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Confirmed { index, tally } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Confirmed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Confirmed { index, tally } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Confirmed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Confirmed", - "index", - &self.index, - "tally", - &&self.tally, - ) - } - } - impl ::subxt::events::StaticEvent for Confirmed { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Confirmed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Approved { - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Approved { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - Approved, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Approved { index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Approved { - fn from(x: ::subxt::ext::codec::Compact) -> Approved { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Approved { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Approved { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Approved::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Approved { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Approved {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Approved { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Approved; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Approved { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Approved { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Approved { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Approved { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Approved { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Approved { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Approved { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Approved { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Approved", - "index", - &&self.index, - ) - } - } - impl ::subxt::events::StaticEvent for Approved { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Approved"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Rejected { - pub index: ::core::primitive::u32, - pub tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Rejected { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Rejected { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Rejected::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tally: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Rejected::tally`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Rejected { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.tally), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.tally, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Rejected {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Rejected { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Rejected; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Rejected { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = *vals - .get(&Some("tally")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tally".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Rejected { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Rejected { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Rejected { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rejected { index, tally } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Rejected { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rejected { index, tally } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Rejected { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Rejected", - "index", - &self.index, - "tally", - &&self.tally, - ) - } - } - impl ::subxt::events::StaticEvent for Rejected { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Rejected"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TimedOut { - pub index: ::core::primitive::u32, - pub tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for TimedOut { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(TimedOut { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TimedOut::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tally: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TimedOut::tally`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for TimedOut { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.tally), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.tally, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for TimedOut {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for TimedOut { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = TimedOut; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(TimedOut { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = *vals - .get(&Some("tally")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tally".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(TimedOut { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for TimedOut { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for TimedOut { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TimedOut { index, tally } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for TimedOut { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TimedOut { index, tally } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for TimedOut { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "TimedOut", - "index", - &self.index, - "tally", - &&self.tally, - ) - } - } - impl ::subxt::events::StaticEvent for TimedOut { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "TimedOut"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Cancelled { - pub index: ::core::primitive::u32, - pub tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Cancelled { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Cancelled { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Cancelled::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tally: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Cancelled::tally`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Cancelled { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.tally), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.tally, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Cancelled {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Cancelled { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Cancelled; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Cancelled { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = *vals - .get(&Some("tally")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tally".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Cancelled { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Cancelled { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Cancelled { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Cancelled { index, tally } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Cancelled { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Cancelled { index, tally } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Cancelled { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Cancelled", - "index", - &self.index, - "tally", - &&self.tally, - ) - } - } - impl ::subxt::events::StaticEvent for Cancelled { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Cancelled"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Killed { - pub index: ::core::primitive::u32, - pub tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Killed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Killed { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Killed::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tally: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Killed::tally`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Killed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.tally), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.tally, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Killed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Killed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Killed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Killed { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = *vals - .get(&Some("tally")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tally".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Killed { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Killed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Killed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Killed { index, tally } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Killed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Killed { index, tally } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Killed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Killed", - "index", - &self.index, - "tally", - &&self.tally, - ) - } - } - impl ::subxt::events::StaticEvent for Killed { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Killed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SubmissionDepositRefunded { - pub index: ::core::primitive::u32, - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SubmissionDepositRefunded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(SubmissionDepositRefunded { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SubmissionDepositRefunded::index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SubmissionDepositRefunded::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SubmissionDepositRefunded::amount`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SubmissionDepositRefunded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SubmissionDepositRefunded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SubmissionDepositRefunded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SubmissionDepositRefunded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SubmissionDepositRefunded { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(SubmissionDepositRefunded { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SubmissionDepositRefunded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SubmissionDepositRefunded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SubmissionDepositRefunded { index, who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SubmissionDepositRefunded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SubmissionDepositRefunded { index, who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SubmissionDepositRefunded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SubmissionDepositRefunded", - "index", - &self.index, - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for SubmissionDepositRefunded { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "SubmissionDepositRefunded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MetadataSet { - pub index: ::core::primitive::u32, - pub hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MetadataSet { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MetadataSet { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MetadataSet::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MetadataSet::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MetadataSet { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.hash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MetadataSet {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MetadataSet { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MetadataSet; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MetadataSet { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(MetadataSet { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for MetadataSet { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MetadataSet { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MetadataSet { index, hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MetadataSet { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MetadataSet { index, hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MetadataSet { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MetadataSet", - "index", - &self.index, - "hash", - &&self.hash, - ) - } - } - impl ::subxt::events::StaticEvent for MetadataSet { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "MetadataSet"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MetadataCleared { - pub index: ::core::primitive::u32, - pub hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MetadataCleared { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MetadataCleared { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MetadataCleared::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MetadataCleared::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MetadataCleared { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.hash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MetadataCleared {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MetadataCleared { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MetadataCleared; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MetadataCleared { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(MetadataCleared { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for MetadataCleared { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MetadataCleared { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MetadataCleared { index, hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MetadataCleared { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MetadataCleared { index, hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MetadataCleared { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MetadataCleared", - "index", - &self.index, - "hash", - &&self.hash, - ) - } - } - impl ::subxt::events::StaticEvent for MetadataCleared { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "MetadataCleared"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn referendum_count( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Referenda", - "ReferendumCount", - ::alloc::vec::Vec::new(), - [ - 64u8, - 145u8, - 232u8, - 153u8, - 121u8, - 87u8, - 128u8, - 253u8, - 170u8, - 192u8, - 139u8, - 18u8, - 0u8, - 33u8, - 243u8, - 11u8, - 238u8, - 222u8, - 244u8, - 5u8, - 247u8, - 198u8, - 149u8, - 31u8, - 122u8, - 208u8, - 86u8, - 179u8, - 166u8, - 167u8, - 93u8, - 67u8, - ], - ) - } - pub fn referendum_info_for_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_referenda::types::ReferendumInfo< - ::core::primitive::u16, - runtime_types::polkadot_runtime::OriginCaller, - ::core::primitive::u32, - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - ::core::primitive::u128, - runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - ::subxt::utils::AccountId32, - (::core::primitive::u32, ::core::primitive::u32), - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Referenda", - "ReferendumInfoFor", - ::alloc::vec::Vec::new(), - [ - 213u8, - 12u8, - 72u8, - 151u8, - 25u8, - 196u8, - 73u8, - 199u8, - 83u8, - 109u8, - 28u8, - 164u8, - 121u8, - 236u8, - 136u8, - 242u8, - 124u8, - 45u8, - 112u8, - 158u8, - 132u8, - 152u8, - 217u8, - 84u8, - 241u8, - 115u8, - 146u8, - 203u8, - 225u8, - 186u8, - 116u8, - 80u8, - ], - ) - } - pub fn referendum_info_for( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_referenda::types::ReferendumInfo< - ::core::primitive::u16, - runtime_types::polkadot_runtime::OriginCaller, - ::core::primitive::u32, - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - ::core::primitive::u128, - runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - ::subxt::utils::AccountId32, - (::core::primitive::u32, ::core::primitive::u32), - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Referenda", - "ReferendumInfoFor", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 213u8, - 12u8, - 72u8, - 151u8, - 25u8, - 196u8, - 73u8, - 199u8, - 83u8, - 109u8, - 28u8, - 164u8, - 121u8, - 236u8, - 136u8, - 242u8, - 124u8, - 45u8, - 112u8, - 158u8, - 132u8, - 152u8, - 217u8, - 84u8, - 241u8, - 115u8, - 146u8, - 203u8, - 225u8, - 186u8, - 116u8, - 80u8, - ], - ) - } - pub fn track_queue_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - (::core::primitive::u32, ::core::primitive::u128), - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Referenda", - "TrackQueue", - ::alloc::vec::Vec::new(), - [ - 125u8, - 59u8, - 111u8, - 68u8, - 27u8, - 236u8, - 82u8, - 55u8, - 83u8, - 159u8, - 105u8, - 20u8, - 241u8, - 118u8, - 58u8, - 141u8, - 103u8, - 60u8, - 246u8, - 49u8, - 121u8, - 183u8, - 7u8, - 203u8, - 225u8, - 67u8, - 132u8, - 79u8, - 150u8, - 107u8, - 71u8, - 89u8, - ], - ) - } - pub fn track_queue( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u16>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - (::core::primitive::u32, ::core::primitive::u128), - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Referenda", - "TrackQueue", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 125u8, - 59u8, - 111u8, - 68u8, - 27u8, - 236u8, - 82u8, - 55u8, - 83u8, - 159u8, - 105u8, - 20u8, - 241u8, - 118u8, - 58u8, - 141u8, - 103u8, - 60u8, - 246u8, - 49u8, - 121u8, - 183u8, - 7u8, - 203u8, - 225u8, - 67u8, - 132u8, - 79u8, - 150u8, - 107u8, - 71u8, - 89u8, - ], - ) - } - pub fn deciding_count_iter( - &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( - "Referenda", - "DecidingCount", - ::alloc::vec::Vec::new(), - [ - 203u8, - 89u8, - 158u8, - 179u8, - 194u8, - 82u8, - 248u8, - 162u8, - 93u8, - 140u8, - 146u8, - 51u8, - 110u8, - 232u8, - 51u8, - 1u8, - 128u8, - 212u8, - 199u8, - 14u8, - 182u8, - 103u8, - 47u8, - 252u8, - 126u8, - 108u8, - 166u8, - 69u8, - 252u8, - 179u8, - 126u8, - 245u8, - ], - ) - } - pub fn deciding_count( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u16>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Referenda", - "DecidingCount", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 203u8, - 89u8, - 158u8, - 179u8, - 194u8, - 82u8, - 248u8, - 162u8, - 93u8, - 140u8, - 146u8, - 51u8, - 110u8, - 232u8, - 51u8, - 1u8, - 128u8, - 212u8, - 199u8, - 14u8, - 182u8, - 103u8, - 47u8, - 252u8, - 126u8, - 108u8, - 166u8, - 69u8, - 252u8, - 179u8, - 126u8, - 245u8, - ], - ) - } - pub fn metadata_of_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::H256, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Referenda", - "MetadataOf", - ::alloc::vec::Vec::new(), - [ - 159u8, - 250u8, - 56u8, - 189u8, - 247u8, - 165u8, - 206u8, - 166u8, - 91u8, - 139u8, - 124u8, - 164u8, - 25u8, - 246u8, - 199u8, - 36u8, - 159u8, - 56u8, - 227u8, - 136u8, - 4u8, - 45u8, - 193u8, - 72u8, - 200u8, - 164u8, - 39u8, - 207u8, - 224u8, - 124u8, - 191u8, - 110u8, - ], - ) - } - pub fn metadata_of( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::H256, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Referenda", - "MetadataOf", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 159u8, - 250u8, - 56u8, - 189u8, - 247u8, - 165u8, - 206u8, - 166u8, - 91u8, - 139u8, - 124u8, - 164u8, - 25u8, - 246u8, - 199u8, - 36u8, - 159u8, - 56u8, - 227u8, - 136u8, - 4u8, - 45u8, - 193u8, - 72u8, - 200u8, - 164u8, - 39u8, - 207u8, - 224u8, - 124u8, - 191u8, - 110u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn submission_deposit( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "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 fn max_queued( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "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, - ], - ) - } - pub fn undeciding_timeout( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Referenda", - "UndecidingTimeout", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn alarm_interval( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "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, - ], - ) - } - pub fn tracks( - &self, - ) -> ::subxt::constants::Address< - ::std::vec::Vec< - ( - ::core::primitive::u16, - runtime_types::pallet_referenda::types::TrackInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - ), - >, - > { - ::subxt::constants::Address::new_static( - "Referenda", - "Tracks", - [ - 35u8, - 226u8, - 207u8, - 234u8, - 184u8, - 139u8, - 187u8, - 184u8, - 128u8, - 199u8, - 227u8, - 15u8, - 31u8, - 196u8, - 5u8, - 207u8, - 138u8, - 174u8, - 130u8, - 201u8, - 200u8, - 113u8, - 86u8, - 93u8, - 221u8, - 243u8, - 229u8, - 24u8, - 18u8, - 150u8, - 56u8, - 159u8, - ], - ) - } - } - } - } - pub mod whitelist { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_whitelist::pallet::Error; - pub type Call = runtime_types::pallet_whitelist::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct WhitelistCall { - pub call_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for WhitelistCall { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(WhitelistCall { - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WhitelistCall::call_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for WhitelistCall { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.call_hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.call_hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.call_hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.call_hash, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for WhitelistCall {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for WhitelistCall { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = WhitelistCall; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(WhitelistCall { - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(WhitelistCall { - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for WhitelistCall { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for WhitelistCall { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WhitelistCall { call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for WhitelistCall { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WhitelistCall { call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for WhitelistCall { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "WhitelistCall", - "call_hash", - &&self.call_hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for WhitelistCall { - const PALLET: &'static str = "Whitelist"; - const CALL: &'static str = "whitelist_call"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveWhitelistedCall { - pub call_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RemoveWhitelistedCall { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RemoveWhitelistedCall { - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RemoveWhitelistedCall::call_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RemoveWhitelistedCall { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.call_hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.call_hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.call_hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.call_hash, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RemoveWhitelistedCall {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for RemoveWhitelistedCall { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RemoveWhitelistedCall; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RemoveWhitelistedCall { - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(RemoveWhitelistedCall { - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for RemoveWhitelistedCall { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for RemoveWhitelistedCall { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveWhitelistedCall { call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for RemoveWhitelistedCall { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveWhitelistedCall { call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RemoveWhitelistedCall { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "RemoveWhitelistedCall", - "call_hash", - &&self.call_hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RemoveWhitelistedCall { - const PALLET: &'static str = "Whitelist"; - const CALL: &'static str = "remove_whitelisted_call"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DispatchWhitelistedCall { - pub call_hash: ::subxt::utils::H256, - pub call_encoded_len: ::core::primitive::u32, - pub call_weight_witness: runtime_types::sp_weights::weight_v2::Weight, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DispatchWhitelistedCall { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(DispatchWhitelistedCall { - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `DispatchWhitelistedCall::call_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_encoded_len: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `DispatchWhitelistedCall::call_encoded_len`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_weight_witness: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `DispatchWhitelistedCall::call_weight_witness`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DispatchWhitelistedCall { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.call_encoded_len, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.call_weight_witness, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.call_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call_encoded_len, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call_weight_witness, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for DispatchWhitelistedCall {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for DispatchWhitelistedCall { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DispatchWhitelistedCall; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DispatchWhitelistedCall { - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - call_encoded_len: { - let val = *vals - .get(&Some("call_encoded_len")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_encoded_len".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("call_encoded_len"))? - }, - call_weight_witness: { - let val = *vals - .get(&Some("call_weight_witness")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_weight_witness".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("call_weight_witness"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(DispatchWhitelistedCall { - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - call_encoded_len: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("call_encoded_len"))? - }, - call_weight_witness: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("call_weight_witness"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for DispatchWhitelistedCall { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for DispatchWhitelistedCall { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DispatchWhitelistedCall { - call_hash, - call_encoded_len, - call_weight_witness, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_encoded_len"), - call_encoded_len - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_weight_witness"), - call_weight_witness - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for DispatchWhitelistedCall { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DispatchWhitelistedCall { - call_hash, - call_encoded_len, - call_weight_witness, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_encoded_len"), - call_encoded_len - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_weight_witness"), - call_weight_witness - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DispatchWhitelistedCall { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "DispatchWhitelistedCall", - "call_hash", - &self.call_hash, - "call_encoded_len", - &self.call_encoded_len, - "call_weight_witness", - &&self.call_weight_witness, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for DispatchWhitelistedCall { - const PALLET: &'static str = "Whitelist"; - const CALL: &'static str = "dispatch_whitelisted_call"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DispatchWhitelistedCallWithPreimage { - pub call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode - for DispatchWhitelistedCallWithPreimage { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(DispatchWhitelistedCallWithPreimage { - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `DispatchWhitelistedCallWithPreimage::call`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode - for DispatchWhitelistedCallWithPreimage { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.call) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.call, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.call) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.call, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for DispatchWhitelistedCallWithPreimage {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for DispatchWhitelistedCallWithPreimage { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DispatchWhitelistedCallWithPreimage; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DispatchWhitelistedCallWithPreimage { - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(DispatchWhitelistedCallWithPreimage { - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for DispatchWhitelistedCallWithPreimage { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for DispatchWhitelistedCallWithPreimage { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DispatchWhitelistedCallWithPreimage { call } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for DispatchWhitelistedCallWithPreimage { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DispatchWhitelistedCallWithPreimage { call } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DispatchWhitelistedCallWithPreimage { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "DispatchWhitelistedCallWithPreimage", - "call", - &&self.call, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for DispatchWhitelistedCallWithPreimage { - const PALLET: &'static str = "Whitelist"; - const CALL: &'static str = "dispatch_whitelisted_call_with_preimage"; - } - } - 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", - types::WhitelistCall { call_hash }, - [ - 121u8, - 165u8, - 49u8, - 37u8, - 127u8, - 38u8, - 126u8, - 213u8, - 115u8, - 148u8, - 122u8, - 211u8, - 24u8, - 91u8, - 147u8, - 27u8, - 87u8, - 210u8, - 84u8, - 104u8, - 229u8, - 155u8, - 133u8, - 30u8, - 34u8, - 249u8, - 107u8, - 110u8, - 31u8, - 191u8, - 128u8, - 28u8, - ], - ) - } - pub fn remove_whitelisted_call( - &self, - call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Whitelist", - "remove_whitelisted_call", - types::RemoveWhitelistedCall { - call_hash, - }, - [ - 30u8, - 47u8, - 13u8, - 231u8, - 165u8, - 219u8, - 246u8, - 210u8, - 11u8, - 38u8, - 219u8, - 218u8, - 151u8, - 226u8, - 101u8, - 175u8, - 0u8, - 239u8, - 35u8, - 46u8, - 156u8, - 104u8, - 145u8, - 173u8, - 105u8, - 100u8, - 21u8, - 189u8, - 123u8, - 227u8, - 196u8, - 40u8, - ], - ) - } - 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", - types::DispatchWhitelistedCall { - call_hash, - call_encoded_len, - call_weight_witness, - }, - [ - 112u8, - 67u8, - 72u8, - 26u8, - 3u8, - 214u8, - 86u8, - 102u8, - 29u8, - 96u8, - 222u8, - 24u8, - 115u8, - 15u8, - 124u8, - 160u8, - 148u8, - 184u8, - 56u8, - 162u8, - 188u8, - 123u8, - 213u8, - 234u8, - 208u8, - 123u8, - 133u8, - 253u8, - 43u8, - 226u8, - 66u8, - 116u8, - ], - ) - } - pub fn dispatch_whitelisted_call_with_preimage( - &self, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload< - types::DispatchWhitelistedCallWithPreimage, - > { - ::subxt::tx::Payload::new_static( - "Whitelist", - "dispatch_whitelisted_call_with_preimage", - types::DispatchWhitelistedCallWithPreimage { - call: ::std::boxed::Box::new(call), - }, - [ - 31u8, - 38u8, - 129u8, - 73u8, - 182u8, - 87u8, - 105u8, - 144u8, - 220u8, - 210u8, - 236u8, - 158u8, - 123u8, - 236u8, - 114u8, - 238u8, - 8u8, - 155u8, - 253u8, - 47u8, - 76u8, - 221u8, - 235u8, - 242u8, - 177u8, - 163u8, - 45u8, - 214u8, - 127u8, - 145u8, - 117u8, - 212u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_whitelist::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CallWhitelisted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(CallWhitelisted { - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CallWhitelisted::call_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CallWhitelisted { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.call_hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.call_hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.call_hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.call_hash, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CallWhitelisted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CallWhitelisted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CallWhitelisted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CallWhitelisted { - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(CallWhitelisted { - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for CallWhitelisted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CallWhitelisted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CallWhitelisted { call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CallWhitelisted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CallWhitelisted { call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CallWhitelisted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "CallWhitelisted", - "call_hash", - &&self.call_hash, - ) - } - } - impl ::subxt::events::StaticEvent for CallWhitelisted { - const PALLET: &'static str = "Whitelist"; - const EVENT: &'static str = "CallWhitelisted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for WhitelistedCallRemoved { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(WhitelistedCallRemoved { - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `WhitelistedCallRemoved::call_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for WhitelistedCallRemoved { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.call_hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.call_hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.call_hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.call_hash, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for WhitelistedCallRemoved {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for WhitelistedCallRemoved { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = WhitelistedCallRemoved; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(WhitelistedCallRemoved { - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(WhitelistedCallRemoved { - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for WhitelistedCallRemoved { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for WhitelistedCallRemoved { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WhitelistedCallRemoved { call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for WhitelistedCallRemoved { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WhitelistedCallRemoved { call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for WhitelistedCallRemoved { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "WhitelistedCallRemoved", - "call_hash", - &&self.call_hash, - ) - } - } - impl ::subxt::events::StaticEvent for WhitelistedCallRemoved { - const PALLET: &'static str = "Whitelist"; - const EVENT: &'static str = "WhitelistedCallRemoved"; - } - #[codec(crate = ::subxt::ext::codec)] - #[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, - >, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for WhitelistedCallDispatched { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(WhitelistedCallDispatched { - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `WhitelistedCallDispatched::call_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - runtime_types::frame_support::dispatch::PostDispatchInfo, - runtime_types::sp_runtime::DispatchErrorWithPostInfo< - runtime_types::frame_support::dispatch::PostDispatchInfo, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `WhitelistedCallDispatched::result`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for WhitelistedCallDispatched { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.result), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.call_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.result, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for WhitelistedCallDispatched {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for WhitelistedCallDispatched { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = WhitelistedCallDispatched; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(WhitelistedCallDispatched { - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(WhitelistedCallDispatched { - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for WhitelistedCallDispatched { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for WhitelistedCallDispatched { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WhitelistedCallDispatched { call_hash, result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for WhitelistedCallDispatched { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WhitelistedCallDispatched { call_hash, result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for WhitelistedCallDispatched { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "WhitelistedCallDispatched", - "call_hash", - &self.call_hash, - "result", - &&self.result, - ) - } - } - 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_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - (), - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Whitelist", - "WhitelistedCall", - ::alloc::vec::Vec::new(), - [ - 82u8, - 208u8, - 214u8, - 72u8, - 225u8, - 35u8, - 51u8, - 212u8, - 25u8, - 138u8, - 30u8, - 87u8, - 54u8, - 232u8, - 72u8, - 132u8, - 4u8, - 9u8, - 28u8, - 143u8, - 251u8, - 106u8, - 167u8, - 218u8, - 130u8, - 185u8, - 253u8, - 185u8, - 113u8, - 154u8, - 202u8, - 66u8, - ], - ) - } - pub fn whitelisted_call( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - (), - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Whitelist", - "WhitelistedCall", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 82u8, - 208u8, - 214u8, - 72u8, - 225u8, - 35u8, - 51u8, - 212u8, - 25u8, - 138u8, - 30u8, - 87u8, - 54u8, - 232u8, - 72u8, - 132u8, - 4u8, - 9u8, - 28u8, - 143u8, - 251u8, - 106u8, - 167u8, - 218u8, - 130u8, - 185u8, - 253u8, - 185u8, - 113u8, - 154u8, - 202u8, - 66u8, - ], - ) - } - } - } - } - pub mod claims { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::polkadot_runtime_common::claims::pallet::Error; - pub type Call = runtime_types::polkadot_runtime_common::claims::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Claim { - pub dest: ::subxt::utils::AccountId32, - pub ethereum_signature: runtime_types::polkadot_runtime_common::claims::EcdsaSignature, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Claim { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Claim { - dest: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Claim::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ethereum_signature: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Claim::ethereum_signature`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Claim { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.ethereum_signature, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.ethereum_signature, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Claim {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Claim { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Claim; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Claim { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - ethereum_signature: { - let val = *vals - .get(&Some("ethereum_signature")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ethereum_signature".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("ethereum_signature"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Claim { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - ethereum_signature: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("ethereum_signature"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Claim { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Claim { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Claim { dest, ethereum_signature } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ethereum_signature"), - ethereum_signature - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Claim { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Claim { dest, ethereum_signature } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ethereum_signature"), - ethereum_signature - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Claim { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Claim", - "dest", - &self.dest, - "ethereum_signature", - &&self.ethereum_signature, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Claim { - const PALLET: &'static str = "Claims"; - const CALL: &'static str = "claim"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MintClaim { - pub who: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - pub value: ::core::primitive::u128, - pub vesting_schedule: ::core::option::Option< - ( - ::core::primitive::u128, - ::core::primitive::u128, - ::core::primitive::u32, - ), - >, - pub statement: ::core::option::Option< - runtime_types::polkadot_runtime_common::claims::StatementKind, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MintClaim { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(MintClaim { - who: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MintClaim::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MintClaim::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - vesting_schedule: { - let __codec_res_edqy = <::core::option::Option< - ( - ::core::primitive::u128, - ::core::primitive::u128, - ::core::primitive::u32, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MintClaim::vesting_schedule`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - statement: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::polkadot_runtime_common::claims::StatementKind, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MintClaim::statement`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MintClaim { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.value), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.vesting_schedule, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.statement), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.value, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.vesting_schedule, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.statement, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MintClaim {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MintClaim { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MintClaim; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MintClaim { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - vesting_schedule: { - let val = *vals - .get(&Some("vesting_schedule")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "vesting_schedule".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("vesting_schedule"))? - }, - statement: { - let val = *vals - .get(&Some("statement")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "statement".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("statement"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(MintClaim { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - vesting_schedule: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("vesting_schedule"))? - }, - statement: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("statement"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for MintClaim { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MintClaim { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MintClaim { who, value, vesting_schedule, statement } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("vesting_schedule"), - vesting_schedule - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("statement"), - statement as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MintClaim { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MintClaim { who, value, vesting_schedule, statement } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("vesting_schedule"), - vesting_schedule - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("statement"), - statement as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MintClaim { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "MintClaim", - "who", - &self.who, - "value", - &self.value, - "vesting_schedule", - &self.vesting_schedule, - "statement", - &&self.statement, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for MintClaim { - const PALLET: &'static str = "Claims"; - const CALL: &'static str = "mint_claim"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimAttest { - pub dest: ::subxt::utils::AccountId32, - pub ethereum_signature: runtime_types::polkadot_runtime_common::claims::EcdsaSignature, - pub statement: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ClaimAttest { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ClaimAttest { - dest: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ClaimAttest::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ethereum_signature: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `ClaimAttest::ethereum_signature`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - statement: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ClaimAttest::statement`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ClaimAttest { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.ethereum_signature, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.statement), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.ethereum_signature, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.statement, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ClaimAttest {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ClaimAttest { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ClaimAttest; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ClaimAttest { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - ethereum_signature: { - let val = *vals - .get(&Some("ethereum_signature")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ethereum_signature".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("ethereum_signature"))? - }, - statement: { - let val = *vals - .get(&Some("statement")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "statement".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("statement"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(ClaimAttest { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - ethereum_signature: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("ethereum_signature"))? - }, - statement: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("statement"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ClaimAttest { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ClaimAttest { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClaimAttest { dest, ethereum_signature, statement } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ethereum_signature"), - ethereum_signature - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("statement"), - statement as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ClaimAttest { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClaimAttest { dest, ethereum_signature, statement } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ethereum_signature"), - ethereum_signature - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("statement"), - statement as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ClaimAttest { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ClaimAttest", - "dest", - &self.dest, - "ethereum_signature", - &self.ethereum_signature, - "statement", - &&self.statement, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ClaimAttest { - const PALLET: &'static str = "Claims"; - const CALL: &'static str = "claim_attest"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Attest { - pub statement: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Attest { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Attest { - statement: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Attest::statement`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Attest { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.statement) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.statement, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.statement) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.statement, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Attest {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Attest { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Attest; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Attest { - statement: { - let val = *vals - .get(&Some("statement")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "statement".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("statement"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Attest { - statement: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("statement"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Attest { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Attest { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Attest { statement } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("statement"), - statement as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Attest { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Attest { statement } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("statement"), - statement as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Attest { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Attest", - "statement", - &&self.statement, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Attest { - const PALLET: &'static str = "Claims"; - const CALL: &'static str = "attest"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MoveClaim { - pub old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - pub new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - pub maybe_preclaim: ::core::option::Option< - ::subxt::utils::AccountId32, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MoveClaim { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(MoveClaim { - old: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MoveClaim::old`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MoveClaim::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_preclaim: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MoveClaim::maybe_preclaim`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MoveClaim { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.old), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.maybe_preclaim), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.old, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.new, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.maybe_preclaim, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MoveClaim {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MoveClaim { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MoveClaim; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MoveClaim { - old: { - let val = *vals - .get(&Some("old")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "old".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("old"))? - }, - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - maybe_preclaim: { - let val = *vals - .get(&Some("maybe_preclaim")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_preclaim".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_preclaim"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(MoveClaim { - old: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("old"))? - }, - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - maybe_preclaim: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_preclaim"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for MoveClaim { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MoveClaim { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MoveClaim { old, new, maybe_preclaim } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("old"), - old as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_preclaim"), - maybe_preclaim - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MoveClaim { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MoveClaim { old, new, maybe_preclaim } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("old"), - old as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_preclaim"), - maybe_preclaim - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MoveClaim { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "MoveClaim", - "old", - &self.old, - "new", - &self.new, - "maybe_preclaim", - &&self.maybe_preclaim, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for MoveClaim { - const PALLET: &'static str = "Claims"; - const CALL: &'static str = "move_claim"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn claim( - &self, - dest: ::subxt::utils::AccountId32, - ethereum_signature: runtime_types::polkadot_runtime_common::claims::EcdsaSignature, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Claims", - "claim", - types::Claim { - dest, - ethereum_signature, - }, - [ - 218u8, - 236u8, - 60u8, - 12u8, - 231u8, - 72u8, - 155u8, - 30u8, - 116u8, - 126u8, - 145u8, - 166u8, - 135u8, - 118u8, - 22u8, - 112u8, - 212u8, - 140u8, - 129u8, - 97u8, - 9u8, - 241u8, - 159u8, - 140u8, - 252u8, - 128u8, - 4u8, - 175u8, - 180u8, - 133u8, - 70u8, - 55u8, - ], - ) - } - pub fn mint_claim( - &self, - who: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - value: ::core::primitive::u128, - vesting_schedule: ::core::option::Option< - ( - ::core::primitive::u128, - ::core::primitive::u128, - ::core::primitive::u32, - ), - >, - statement: ::core::option::Option< - runtime_types::polkadot_runtime_common::claims::StatementKind, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Claims", - "mint_claim", - types::MintClaim { - who, - value, - vesting_schedule, - statement, - }, - [ - 59u8, - 71u8, - 27u8, - 16u8, - 177u8, - 189u8, - 53u8, - 54u8, - 86u8, - 157u8, - 122u8, - 182u8, - 246u8, - 113u8, - 225u8, - 10u8, - 31u8, - 253u8, - 15u8, - 48u8, - 182u8, - 198u8, - 38u8, - 211u8, - 90u8, - 75u8, - 10u8, - 68u8, - 70u8, - 152u8, - 141u8, - 222u8, - ], - ) - } - pub fn claim_attest( - &self, - 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( - "Claims", - "claim_attest", - types::ClaimAttest { - dest, - ethereum_signature, - statement, - }, - [ - 61u8, - 16u8, - 39u8, - 50u8, - 23u8, - 249u8, - 217u8, - 155u8, - 138u8, - 128u8, - 247u8, - 214u8, - 185u8, - 7u8, - 87u8, - 108u8, - 15u8, - 43u8, - 44u8, - 224u8, - 204u8, - 39u8, - 219u8, - 188u8, - 197u8, - 104u8, - 120u8, - 144u8, - 152u8, - 161u8, - 244u8, - 37u8, - ], - ) - } - pub fn attest( - &self, - statement: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Claims", - "attest", - types::Attest { statement }, - [ - 254u8, - 56u8, - 140u8, - 129u8, - 227u8, - 155u8, - 161u8, - 107u8, - 167u8, - 148u8, - 167u8, - 104u8, - 139u8, - 174u8, - 204u8, - 124u8, - 126u8, - 198u8, - 165u8, - 61u8, - 83u8, - 197u8, - 242u8, - 13u8, - 70u8, - 153u8, - 14u8, - 62u8, - 214u8, - 129u8, - 64u8, - 93u8, - ], - ) - } - pub fn move_claim( - &self, - old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - maybe_preclaim: ::core::option::Option< - ::subxt::utils::AccountId32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Claims", - "move_claim", - types::MoveClaim { - old, - new, - maybe_preclaim, - }, - [ - 187u8, - 200u8, - 222u8, - 83u8, - 110u8, - 49u8, - 60u8, - 134u8, - 91u8, - 215u8, - 67u8, - 18u8, - 187u8, - 241u8, - 191u8, - 127u8, - 222u8, - 171u8, - 151u8, - 245u8, - 161u8, - 196u8, - 123u8, - 99u8, - 206u8, - 110u8, - 55u8, - 82u8, - 210u8, - 151u8, - 116u8, - 230u8, - ], - ) - } - } - } - pub type Event = runtime_types::polkadot_runtime_common::claims::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Claimed { - pub who: ::subxt::utils::AccountId32, - pub ethereum_address: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Claimed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Claimed { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Claimed::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ethereum_address: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Claimed::ethereum_address`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Claimed::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Claimed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.ethereum_address, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.ethereum_address, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Claimed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Claimed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Claimed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Claimed { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - ethereum_address: { - let val = *vals - .get(&Some("ethereum_address")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ethereum_address".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("ethereum_address"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Claimed { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - ethereum_address: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("ethereum_address"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Claimed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Claimed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Claimed { who, ethereum_address, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ethereum_address"), - ethereum_address - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Claimed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Claimed { who, ethereum_address, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ethereum_address"), - ethereum_address - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Claimed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Claimed", - "who", - &self.who, - "ethereum_address", - &self.ethereum_address, - "amount", - &&self.amount, - ) - } - } - 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 { - pub fn claims_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Claims", - "Claims", - ::alloc::vec::Vec::new(), - [ - 148u8, - 115u8, - 159u8, - 169u8, - 36u8, - 116u8, - 15u8, - 108u8, - 57u8, - 195u8, - 226u8, - 180u8, - 187u8, - 112u8, - 114u8, - 63u8, - 3u8, - 205u8, - 113u8, - 141u8, - 149u8, - 149u8, - 118u8, - 246u8, - 45u8, - 245u8, - 148u8, - 108u8, - 22u8, - 184u8, - 152u8, - 132u8, - ], - ) - } - pub fn claims( - &self, - _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::Address::new_static( - "Claims", - "Claims", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 148u8, - 115u8, - 159u8, - 169u8, - 36u8, - 116u8, - 15u8, - 108u8, - 57u8, - 195u8, - 226u8, - 180u8, - 187u8, - 112u8, - 114u8, - 63u8, - 3u8, - 205u8, - 113u8, - 141u8, - 149u8, - 149u8, - 118u8, - 246u8, - 45u8, - 245u8, - 148u8, - 108u8, - 22u8, - 184u8, - 152u8, - 132u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 188u8, - 31u8, - 219u8, - 189u8, - 49u8, - 213u8, - 203u8, - 89u8, - 125u8, - 58u8, - 232u8, - 159u8, - 131u8, - 155u8, - 166u8, - 113u8, - 99u8, - 24u8, - 40u8, - 242u8, - 118u8, - 183u8, - 108u8, - 230u8, - 135u8, - 150u8, - 84u8, - 86u8, - 118u8, - 91u8, - 168u8, - 62u8, - ], - ) - } - pub fn vesting_iter( - &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::Address::new_static( - "Claims", - "Vesting", - ::alloc::vec::Vec::new(), - [ - 206u8, - 106u8, - 195u8, - 101u8, - 55u8, - 137u8, - 50u8, - 105u8, - 137u8, - 87u8, - 230u8, - 34u8, - 255u8, - 94u8, - 210u8, - 186u8, - 179u8, - 72u8, - 24u8, - 194u8, - 209u8, - 173u8, - 115u8, - 65u8, - 227u8, - 224u8, - 58u8, - 113u8, - 200u8, - 166u8, - 108u8, - 198u8, - ], - ) - } - 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::Address::new_static( - "Claims", - "Vesting", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 206u8, - 106u8, - 195u8, - 101u8, - 55u8, - 137u8, - 50u8, - 105u8, - 137u8, - 87u8, - 230u8, - 34u8, - 255u8, - 94u8, - 210u8, - 186u8, - 179u8, - 72u8, - 24u8, - 194u8, - 209u8, - 173u8, - 115u8, - 65u8, - 227u8, - 224u8, - 58u8, - 113u8, - 200u8, - 166u8, - 108u8, - 198u8, - ], - ) - } - pub fn signing_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_common::claims::StatementKind, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Claims", - "Signing", - ::alloc::vec::Vec::new(), - [ - 111u8, - 90u8, - 178u8, - 121u8, - 241u8, - 28u8, - 169u8, - 231u8, - 61u8, - 189u8, - 113u8, - 207u8, - 26u8, - 153u8, - 189u8, - 15u8, - 192u8, - 25u8, - 22u8, - 22u8, - 124u8, - 26u8, - 191u8, - 39u8, - 130u8, - 164u8, - 34u8, - 4u8, - 44u8, - 91u8, - 82u8, - 186u8, - ], - ) - } - pub fn signing( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_common::claims::StatementKind, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Claims", - "Signing", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 111u8, - 90u8, - 178u8, - 121u8, - 241u8, - 28u8, - 169u8, - 231u8, - 61u8, - 189u8, - 113u8, - 207u8, - 26u8, - 153u8, - 189u8, - 15u8, - 192u8, - 25u8, - 22u8, - 22u8, - 124u8, - 26u8, - 191u8, - 39u8, - 130u8, - 164u8, - 34u8, - 4u8, - 44u8, - 91u8, - 82u8, - 186u8, - ], - ) - } - pub fn preclaims_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Claims", - "Preclaims", - ::alloc::vec::Vec::new(), - [ - 197u8, - 114u8, - 147u8, - 235u8, - 203u8, - 255u8, - 94u8, - 113u8, - 151u8, - 119u8, - 224u8, - 147u8, - 48u8, - 246u8, - 124u8, - 38u8, - 190u8, - 237u8, - 226u8, - 65u8, - 91u8, - 163u8, - 129u8, - 40u8, - 71u8, - 137u8, - 220u8, - 242u8, - 51u8, - 75u8, - 3u8, - 204u8, - ], - ) - } - pub fn preclaims( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Claims", - "Preclaims", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 197u8, - 114u8, - 147u8, - 235u8, - 203u8, - 255u8, - 94u8, - 113u8, - 151u8, - 119u8, - 224u8, - 147u8, - 48u8, - 246u8, - 124u8, - 38u8, - 190u8, - 237u8, - 226u8, - 65u8, - 91u8, - 163u8, - 129u8, - 40u8, - 71u8, - 137u8, - 220u8, - 242u8, - 51u8, - 75u8, - 3u8, - 204u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn prefix( - &self, - ) -> ::subxt::constants::Address< - ::std::vec::Vec<::core::primitive::u8>, - > { - ::subxt::constants::Address::new_static( - "Claims", - "Prefix", - [ - 64u8, - 190u8, - 244u8, - 122u8, - 87u8, - 182u8, - 217u8, - 16u8, - 55u8, - 223u8, - 128u8, - 6u8, - 112u8, - 30u8, - 236u8, - 222u8, - 153u8, - 53u8, - 247u8, - 102u8, - 196u8, - 31u8, - 6u8, - 186u8, - 251u8, - 209u8, - 114u8, - 125u8, - 213u8, - 222u8, - 240u8, - 8u8, - ], - ) - } - } - } - } - pub mod vesting { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_vesting::pallet::Error; - pub type Call = runtime_types::pallet_vesting::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vest; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Vest { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Vest) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Vest { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Vest {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Vest { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Vest; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(Vest) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Vest { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Vest { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vest = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Vest { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vest = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Vest { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "Vest") - } - } - impl ::subxt::blocks::StaticExtrinsic for Vest { - const PALLET: &'static str = "Vesting"; - const CALL: &'static str = "vest"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VestOther { - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VestOther { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(VestOther { - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VestOther::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VestOther { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.target) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.target, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.target) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.target, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VestOther {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for VestOther { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VestOther; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(VestOther { - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(VestOther { - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for VestOther { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for VestOther { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VestOther { target } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for VestOther { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VestOther { target } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VestOther { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "VestOther", - "target", - &&self.target, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for VestOther { - const PALLET: &'static str = "Vesting"; - const CALL: &'static str = "vest_other"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VestedTransfer { - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VestedTransfer { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(VestedTransfer { - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VestedTransfer::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - schedule: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VestedTransfer::schedule`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VestedTransfer { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.target), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.schedule), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.target, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.schedule, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VestedTransfer {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for VestedTransfer { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VestedTransfer; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(VestedTransfer { - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - schedule: { - let val = *vals - .get(&Some("schedule")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "schedule".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("schedule"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(VestedTransfer { - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - schedule: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("schedule"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for VestedTransfer { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for VestedTransfer { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VestedTransfer { target, schedule } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("schedule"), - schedule as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for VestedTransfer { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VestedTransfer { target, schedule } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("schedule"), - schedule as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VestedTransfer { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "VestedTransfer", - "target", - &self.target, - "schedule", - &&self.schedule, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for VestedTransfer { - const PALLET: &'static str = "Vesting"; - const CALL: &'static str = "vested_transfer"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceVestedTransfer { - pub source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceVestedTransfer { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceVestedTransfer { - source: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceVestedTransfer::source`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceVestedTransfer::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - schedule: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceVestedTransfer::schedule`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceVestedTransfer { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.source), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.target), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.schedule), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.source, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.target, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.schedule, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceVestedTransfer {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ForceVestedTransfer { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceVestedTransfer; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceVestedTransfer { - source: { - let val = *vals - .get(&Some("source")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "source".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("source"))? - }, - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - schedule: { - let val = *vals - .get(&Some("schedule")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "schedule".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("schedule"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(ForceVestedTransfer { - source: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("source"))? - }, - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - schedule: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("schedule"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceVestedTransfer { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ForceVestedTransfer { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceVestedTransfer { source, target, schedule } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("source"), - source as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("schedule"), - schedule as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ForceVestedTransfer { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceVestedTransfer { source, target, schedule } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("source"), - source as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("schedule"), - schedule as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceVestedTransfer { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ForceVestedTransfer", - "source", - &self.source, - "target", - &self.target, - "schedule", - &&self.schedule, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceVestedTransfer { - const PALLET: &'static str = "Vesting"; - const CALL: &'static str = "force_vested_transfer"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MergeSchedules { - pub schedule1_index: ::core::primitive::u32, - pub schedule2_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MergeSchedules { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(MergeSchedules { - schedule1_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `MergeSchedules::schedule1_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - schedule2_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `MergeSchedules::schedule2_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MergeSchedules { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.schedule1_index, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.schedule2_index, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.schedule1_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.schedule2_index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MergeSchedules {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MergeSchedules { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MergeSchedules; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MergeSchedules { - schedule1_index: { - let val = *vals - .get(&Some("schedule1_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "schedule1_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("schedule1_index"))? - }, - schedule2_index: { - let val = *vals - .get(&Some("schedule2_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "schedule2_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("schedule2_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(MergeSchedules { - schedule1_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("schedule1_index"))? - }, - schedule2_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("schedule2_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for MergeSchedules { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MergeSchedules { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MergeSchedules { schedule1_index, schedule2_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("schedule1_index"), - schedule1_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("schedule2_index"), - schedule2_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MergeSchedules { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MergeSchedules { schedule1_index, schedule2_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("schedule1_index"), - schedule1_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("schedule2_index"), - schedule2_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MergeSchedules { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MergeSchedules", - "schedule1_index", - &self.schedule1_index, - "schedule2_index", - &&self.schedule2_index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for MergeSchedules { - const PALLET: &'static str = "Vesting"; - const CALL: &'static str = "merge_schedules"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn vest(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Vesting", - "vest", - types::Vest {}, - [ - 149u8, - 89u8, - 178u8, - 148u8, - 127u8, - 127u8, - 155u8, - 60u8, - 114u8, - 126u8, - 204u8, - 123u8, - 166u8, - 70u8, - 104u8, - 208u8, - 186u8, - 69u8, - 139u8, - 181u8, - 151u8, - 154u8, - 235u8, - 161u8, - 191u8, - 35u8, - 111u8, - 60u8, - 21u8, - 165u8, - 44u8, - 122u8, - ], - ) - } - pub fn vest_other( - &self, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Vesting", - "vest_other", - types::VestOther { target }, - [ - 238u8, - 92u8, - 25u8, - 149u8, - 27u8, - 211u8, - 196u8, - 31u8, - 211u8, - 28u8, - 241u8, - 30u8, - 128u8, - 35u8, - 0u8, - 227u8, - 202u8, - 215u8, - 186u8, - 69u8, - 216u8, - 110u8, - 199u8, - 120u8, - 134u8, - 141u8, - 176u8, - 224u8, - 234u8, - 42u8, - 152u8, - 128u8, - ], - ) - } - pub fn vested_transfer( - &self, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Vesting", - "vested_transfer", - types::VestedTransfer { - target, - schedule, - }, - [ - 198u8, - 133u8, - 254u8, - 5u8, - 22u8, - 170u8, - 205u8, - 79u8, - 218u8, - 30u8, - 81u8, - 207u8, - 227u8, - 121u8, - 132u8, - 14u8, - 217u8, - 43u8, - 66u8, - 206u8, - 15u8, - 80u8, - 173u8, - 208u8, - 128u8, - 72u8, - 223u8, - 175u8, - 93u8, - 69u8, - 128u8, - 88u8, - ], - ) - } - pub fn force_vested_transfer( - &self, - source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Vesting", - "force_vested_transfer", - types::ForceVestedTransfer { - source, - target, - schedule, - }, - [ - 112u8, - 17u8, - 176u8, - 133u8, - 169u8, - 192u8, - 155u8, - 217u8, - 153u8, - 36u8, - 230u8, - 45u8, - 9u8, - 192u8, - 2u8, - 201u8, - 165u8, - 60u8, - 206u8, - 226u8, - 95u8, - 86u8, - 239u8, - 196u8, - 109u8, - 62u8, - 224u8, - 237u8, - 88u8, - 74u8, - 209u8, - 251u8, - ], - ) - } - 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", - types::MergeSchedules { - schedule1_index, - schedule2_index, - }, - [ - 45u8, - 24u8, - 13u8, - 108u8, - 26u8, - 99u8, - 61u8, - 117u8, - 195u8, - 218u8, - 182u8, - 23u8, - 188u8, - 157u8, - 181u8, - 81u8, - 38u8, - 136u8, - 31u8, - 226u8, - 8u8, - 190u8, - 33u8, - 81u8, - 86u8, - 185u8, - 156u8, - 77u8, - 157u8, - 197u8, - 41u8, - 58u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_vesting::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VestingUpdated { - pub account: ::subxt::utils::AccountId32, - pub unvested: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VestingUpdated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(VestingUpdated { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VestingUpdated::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - unvested: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VestingUpdated::unvested`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VestingUpdated { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.unvested), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.unvested, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VestingUpdated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for VestingUpdated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VestingUpdated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(VestingUpdated { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - unvested: { - let val = *vals - .get(&Some("unvested")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "unvested".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("unvested"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(VestingUpdated { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - unvested: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("unvested"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for VestingUpdated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for VestingUpdated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VestingUpdated { account, unvested } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("unvested"), - unvested as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for VestingUpdated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VestingUpdated { account, unvested } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("unvested"), - unvested as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VestingUpdated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "VestingUpdated", - "account", - &self.account, - "unvested", - &&self.unvested, - ) - } - } - impl ::subxt::events::StaticEvent for VestingUpdated { - const PALLET: &'static str = "Vesting"; - const EVENT: &'static str = "VestingUpdated"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VestingCompleted { - pub account: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VestingCompleted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(VestingCompleted { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VestingCompleted::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VestingCompleted { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.account) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.account, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.account) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.account, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VestingCompleted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for VestingCompleted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VestingCompleted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(VestingCompleted { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(VestingCompleted { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for VestingCompleted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for VestingCompleted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VestingCompleted { account } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for VestingCompleted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VestingCompleted { account } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VestingCompleted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "VestingCompleted", - "account", - &&self.account, - ) - } - } - 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 { - pub fn vesting_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Vesting", - "Vesting", - ::alloc::vec::Vec::new(), - [ - 95u8, - 168u8, - 217u8, - 248u8, - 149u8, - 86u8, - 195u8, - 93u8, - 73u8, - 206u8, - 105u8, - 165u8, - 33u8, - 173u8, - 232u8, - 81u8, - 147u8, - 254u8, - 50u8, - 228u8, - 156u8, - 92u8, - 242u8, - 149u8, - 42u8, - 91u8, - 58u8, - 209u8, - 142u8, - 221u8, - 230u8, - 112u8, - ], - ) - } - pub fn vesting( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Vesting", - "Vesting", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 95u8, - 168u8, - 217u8, - 248u8, - 149u8, - 86u8, - 195u8, - 93u8, - 73u8, - 206u8, - 105u8, - 165u8, - 33u8, - 173u8, - 232u8, - 81u8, - 147u8, - 254u8, - 50u8, - 228u8, - 156u8, - 92u8, - 242u8, - 149u8, - 42u8, - 91u8, - 58u8, - 209u8, - 142u8, - 221u8, - 230u8, - 112u8, - ], - ) - } - pub fn storage_version( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_vesting::Releases, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Vesting", - "StorageVersion", - ::alloc::vec::Vec::new(), - [ - 230u8, - 137u8, - 180u8, - 133u8, - 142u8, - 124u8, - 231u8, - 234u8, - 223u8, - 10u8, - 154u8, - 98u8, - 158u8, - 253u8, - 228u8, - 80u8, - 5u8, - 9u8, - 91u8, - 210u8, - 252u8, - 9u8, - 13u8, - 195u8, - 193u8, - 164u8, - 129u8, - 113u8, - 128u8, - 218u8, - 8u8, - 40u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn min_vested_transfer( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Vesting", - "MinVestedTransfer", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn max_vesting_schedules( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Vesting", - "MaxVestingSchedules", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod utility { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_utility::pallet::Error; - pub type Call = runtime_types::pallet_utility::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Batch { - pub calls: ::std::vec::Vec< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Batch { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Batch { - calls: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Batch::calls`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Batch { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.calls) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.calls, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.calls) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.calls, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Batch {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Batch { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Batch; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Batch { - calls: { - let val = *vals - .get(&Some("calls")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "calls".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("calls"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Batch { - calls: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("calls"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Batch { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Batch { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Batch { calls } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("calls"), - calls as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Batch { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Batch { calls } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("calls"), - calls as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Batch { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Batch", - "calls", - &&self.calls, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Batch { - const PALLET: &'static str = "Utility"; - const CALL: &'static str = "batch"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AsDerivative { - pub index: ::core::primitive::u16, - pub call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AsDerivative { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AsDerivative { - index: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AsDerivative::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AsDerivative::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AsDerivative { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AsDerivative {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AsDerivative { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AsDerivative; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AsDerivative { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(AsDerivative { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for AsDerivative { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AsDerivative { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AsDerivative { index, call } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AsDerivative { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AsDerivative { index, call } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AsDerivative { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AsDerivative", - "index", - &self.index, - "call", - &&self.call, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for AsDerivative { - const PALLET: &'static str = "Utility"; - const CALL: &'static str = "as_derivative"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BatchAll { - pub calls: ::std::vec::Vec< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BatchAll { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(BatchAll { - calls: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BatchAll::calls`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BatchAll { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.calls) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.calls, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.calls) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.calls, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BatchAll {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BatchAll { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BatchAll; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BatchAll { - calls: { - let val = *vals - .get(&Some("calls")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "calls".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("calls"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(BatchAll { - calls: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("calls"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for BatchAll { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BatchAll { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BatchAll { calls } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("calls"), - calls as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BatchAll { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BatchAll { calls } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("calls"), - calls as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BatchAll { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "BatchAll", - "calls", - &&self.calls, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for BatchAll { - const PALLET: &'static str = "Utility"; - const CALL: &'static str = "batch_all"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DispatchAs { - pub as_origin: ::std::boxed::Box< - runtime_types::polkadot_runtime::OriginCaller, - >, - pub call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DispatchAs { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(DispatchAs { - as_origin: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::OriginCaller, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DispatchAs::as_origin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DispatchAs::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DispatchAs { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.as_origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.as_origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DispatchAs {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for DispatchAs { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DispatchAs; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DispatchAs { - as_origin: { - let val = *vals - .get(&Some("as_origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "as_origin".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("as_origin"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(DispatchAs { - as_origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("as_origin"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for DispatchAs { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DispatchAs { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DispatchAs { as_origin, call } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("as_origin"), - as_origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for DispatchAs { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DispatchAs { as_origin, call } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("as_origin"), - as_origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DispatchAs { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "DispatchAs", - "as_origin", - &self.as_origin, - "call", - &&self.call, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for DispatchAs { - const PALLET: &'static str = "Utility"; - const CALL: &'static str = "dispatch_as"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceBatch { - pub calls: ::std::vec::Vec< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceBatch { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceBatch { - calls: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceBatch::calls`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceBatch { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.calls) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.calls, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.calls) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.calls, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceBatch {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ForceBatch { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceBatch; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceBatch { - calls: { - let val = *vals - .get(&Some("calls")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "calls".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("calls"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ForceBatch { - calls: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("calls"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ForceBatch { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceBatch { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceBatch { calls } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("calls"), - calls as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ForceBatch { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceBatch { calls } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("calls"), - calls as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceBatch { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ForceBatch", - "calls", - &&self.calls, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceBatch { - const PALLET: &'static str = "Utility"; - const CALL: &'static str = "force_batch"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct WithWeight { - pub call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - pub weight: runtime_types::sp_weights::weight_v2::Weight, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for WithWeight { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(WithWeight { - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WithWeight::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - weight: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WithWeight::weight`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for WithWeight { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.weight), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.call, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.weight, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for WithWeight {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for WithWeight { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = WithWeight; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(WithWeight { - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - weight: { - let val = *vals - .get(&Some("weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "weight".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("weight"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(WithWeight { - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("weight"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for WithWeight { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for WithWeight { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WithWeight { call, weight } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight"), - weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for WithWeight { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WithWeight { call, weight } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight"), - weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for WithWeight { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "WithWeight", - "call", - &self.call, - "weight", - &&self.weight, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for WithWeight { - const PALLET: &'static str = "Utility"; - const CALL: &'static str = "with_weight"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn batch( - &self, - calls: ::std::vec::Vec< - runtime_types::polkadot_runtime::RuntimeCall, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Utility", - "batch", - types::Batch { calls }, - [ - 254u8, - 28u8, - 168u8, - 158u8, - 157u8, - 57u8, - 177u8, - 183u8, - 75u8, - 228u8, - 89u8, - 12u8, - 53u8, - 49u8, - 49u8, - 87u8, - 230u8, - 160u8, - 190u8, - 69u8, - 219u8, - 122u8, - 217u8, - 148u8, - 60u8, - 193u8, - 59u8, - 84u8, - 34u8, - 214u8, - 14u8, - 251u8, - ], - ) - } - pub fn as_derivative( - &self, - index: ::core::primitive::u16, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Utility", - "as_derivative", - types::AsDerivative { - index, - call: ::std::boxed::Box::new(call), - }, - [ - 95u8, - 224u8, - 158u8, - 73u8, - 134u8, - 34u8, - 14u8, - 125u8, - 112u8, - 86u8, - 161u8, - 237u8, - 166u8, - 56u8, - 69u8, - 7u8, - 79u8, - 214u8, - 155u8, - 243u8, - 251u8, - 26u8, - 82u8, - 114u8, - 1u8, - 73u8, - 7u8, - 151u8, - 123u8, - 25u8, - 25u8, - 174u8, - ], - ) - } - pub fn batch_all( - &self, - calls: ::std::vec::Vec< - runtime_types::polkadot_runtime::RuntimeCall, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Utility", - "batch_all", - types::BatchAll { calls }, - [ - 201u8, - 247u8, - 102u8, - 24u8, - 147u8, - 243u8, - 42u8, - 174u8, - 159u8, - 54u8, - 11u8, - 250u8, - 221u8, - 100u8, - 22u8, - 72u8, - 152u8, - 43u8, - 198u8, - 136u8, - 45u8, - 63u8, - 170u8, - 130u8, - 205u8, - 203u8, - 93u8, - 242u8, - 5u8, - 72u8, - 235u8, - 105u8, - ], - ) - } - pub fn dispatch_as( - &self, - as_origin: runtime_types::polkadot_runtime::OriginCaller, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Utility", - "dispatch_as", - types::DispatchAs { - as_origin: ::std::boxed::Box::new(as_origin), - call: ::std::boxed::Box::new(call), - }, - [ - 8u8, - 218u8, - 99u8, - 202u8, - 57u8, - 109u8, - 131u8, - 111u8, - 78u8, - 253u8, - 250u8, - 189u8, - 66u8, - 73u8, - 145u8, - 11u8, - 175u8, - 94u8, - 234u8, - 236u8, - 206u8, - 88u8, - 14u8, - 145u8, - 149u8, - 33u8, - 8u8, - 61u8, - 93u8, - 220u8, - 96u8, - 123u8, - ], - ) - } - pub fn force_batch( - &self, - calls: ::std::vec::Vec< - runtime_types::polkadot_runtime::RuntimeCall, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Utility", - "force_batch", - types::ForceBatch { calls }, - [ - 194u8, - 183u8, - 129u8, - 10u8, - 193u8, - 255u8, - 254u8, - 54u8, - 225u8, - 125u8, - 4u8, - 112u8, - 224u8, - 165u8, - 201u8, - 171u8, - 200u8, - 235u8, - 42u8, - 10u8, - 49u8, - 194u8, - 11u8, - 55u8, - 105u8, - 1u8, - 196u8, - 193u8, - 228u8, - 159u8, - 217u8, - 232u8, - ], - ) - } - pub fn with_weight( - &self, - call: runtime_types::polkadot_runtime::RuntimeCall, - weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Utility", - "with_weight", - types::WithWeight { - call: ::std::boxed::Box::new(call), - weight, - }, - [ - 132u8, - 124u8, - 231u8, - 227u8, - 18u8, - 187u8, - 183u8, - 19u8, - 203u8, - 250u8, - 83u8, - 80u8, - 250u8, - 189u8, - 62u8, - 198u8, - 212u8, - 6u8, - 189u8, - 225u8, - 173u8, - 241u8, - 225u8, - 19u8, - 89u8, - 248u8, - 52u8, - 18u8, - 145u8, - 177u8, - 194u8, - 114u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_utility::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BatchInterrupted { - pub index: ::core::primitive::u32, - pub error: runtime_types::sp_runtime::DispatchError, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BatchInterrupted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BatchInterrupted { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BatchInterrupted::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - error: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BatchInterrupted::error`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BatchInterrupted { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.error), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.error, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BatchInterrupted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BatchInterrupted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BatchInterrupted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BatchInterrupted { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - error: { - let val = *vals - .get(&Some("error")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "error".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("error"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(BatchInterrupted { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - error: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("error"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for BatchInterrupted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BatchInterrupted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BatchInterrupted { index, error } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("error"), - error as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BatchInterrupted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BatchInterrupted { index, error } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("error"), - error as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BatchInterrupted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "BatchInterrupted", - "index", - &self.index, - "error", - &&self.error, - ) - } - } - impl ::subxt::events::StaticEvent for BatchInterrupted { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "BatchInterrupted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BatchCompleted; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BatchCompleted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BatchCompleted) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BatchCompleted { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BatchCompleted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BatchCompleted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BatchCompleted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(BatchCompleted) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for BatchCompleted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BatchCompleted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BatchCompleted = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BatchCompleted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BatchCompleted = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BatchCompleted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "BatchCompleted") - } - } - impl ::subxt::events::StaticEvent for BatchCompleted { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "BatchCompleted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BatchCompletedWithErrors; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BatchCompletedWithErrors { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BatchCompletedWithErrors) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BatchCompletedWithErrors { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BatchCompletedWithErrors {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for BatchCompletedWithErrors { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BatchCompletedWithErrors; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(BatchCompletedWithErrors) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for BatchCompletedWithErrors { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for BatchCompletedWithErrors { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BatchCompletedWithErrors = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for BatchCompletedWithErrors { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BatchCompletedWithErrors = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BatchCompletedWithErrors { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "BatchCompletedWithErrors") - } - } - impl ::subxt::events::StaticEvent for BatchCompletedWithErrors { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "BatchCompletedWithErrors"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ItemCompleted; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ItemCompleted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ItemCompleted) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ItemCompleted { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ItemCompleted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ItemCompleted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ItemCompleted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(ItemCompleted) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ItemCompleted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ItemCompleted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ItemCompleted = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ItemCompleted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ItemCompleted = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ItemCompleted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "ItemCompleted") - } - } - impl ::subxt::events::StaticEvent for ItemCompleted { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "ItemCompleted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ItemFailed { - pub error: runtime_types::sp_runtime::DispatchError, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ItemFailed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ItemFailed { - error: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ItemFailed::error`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ItemFailed { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.error) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.error, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.error) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.error, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ItemFailed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ItemFailed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ItemFailed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ItemFailed { - error: { - let val = *vals - .get(&Some("error")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "error".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("error"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ItemFailed { - error: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("error"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ItemFailed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ItemFailed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ItemFailed { error } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("error"), - error as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ItemFailed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ItemFailed { error } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("error"), - error as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ItemFailed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ItemFailed", - "error", - &&self.error, - ) - } - } - impl ::subxt::events::StaticEvent for ItemFailed { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "ItemFailed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DispatchedAs { - pub result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DispatchedAs { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(DispatchedAs { - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DispatchedAs::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DispatchedAs { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.result) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.result, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.result) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.result, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DispatchedAs {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for DispatchedAs { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DispatchedAs; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DispatchedAs { - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(DispatchedAs { - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for DispatchedAs { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DispatchedAs { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DispatchedAs { result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for DispatchedAs { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DispatchedAs { result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DispatchedAs { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "DispatchedAs", - "result", - &&self.result, - ) - } - } - 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 { - pub fn batched_calls_limit( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Utility", - "batched_calls_limit", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod identity { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_identity::pallet::Error; - pub type Call = runtime_types::pallet_identity::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddRegistrar { - pub account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AddRegistrar { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AddRegistrar { - account: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AddRegistrar::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AddRegistrar { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.account) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.account, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.account) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.account, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AddRegistrar {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AddRegistrar { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AddRegistrar; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AddRegistrar { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(AddRegistrar { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for AddRegistrar { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AddRegistrar { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddRegistrar { account } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AddRegistrar { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddRegistrar { account } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AddRegistrar { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "AddRegistrar", - "account", - &&self.account, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for AddRegistrar { - const PALLET: &'static str = "Identity"; - const CALL: &'static str = "add_registrar"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetIdentity { - pub info: ::std::boxed::Box< - runtime_types::pallet_identity::types::IdentityInfo, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetIdentity { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetIdentity { - info: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::pallet_identity::types::IdentityInfo, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetIdentity::info`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetIdentity { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.info) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.info, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.info) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.info, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetIdentity {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetIdentity { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetIdentity; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetIdentity { - info: { - let val = *vals - .get(&Some("info")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "info".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("info"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetIdentity { - info: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("info"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SetIdentity { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetIdentity { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetIdentity { info } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("info"), - info as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetIdentity { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetIdentity { info } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("info"), - info as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetIdentity { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetIdentity", - "info", - &&self.info, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetIdentity { - const PALLET: &'static str = "Identity"; - const CALL: &'static str = "set_identity"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetSubs { - pub subs: ::std::vec::Vec< - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_identity::types::Data, - ), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetSubs { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetSubs { - subs: { - let __codec_res_edqy = <::std::vec::Vec< - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_identity::types::Data, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetSubs::subs`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetSubs { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.subs) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.subs, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.subs) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.subs, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetSubs {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetSubs { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetSubs; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetSubs { - subs: { - let val = *vals - .get(&Some("subs")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "subs".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("subs"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetSubs { - subs: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("subs"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SetSubs { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetSubs { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetSubs { subs } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("subs"), - subs as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetSubs { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetSubs { subs } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("subs"), - subs as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetSubs { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetSubs", - "subs", - &&self.subs, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetSubs { - const PALLET: &'static str = "Identity"; - const CALL: &'static str = "set_subs"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearIdentity; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ClearIdentity { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ClearIdentity) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ClearIdentity { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ClearIdentity {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ClearIdentity { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ClearIdentity; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(ClearIdentity) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ClearIdentity { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ClearIdentity { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClearIdentity = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ClearIdentity { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClearIdentity = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ClearIdentity { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "ClearIdentity") - } - } - impl ::subxt::blocks::StaticExtrinsic for ClearIdentity { - const PALLET: &'static str = "Identity"; - const CALL: &'static str = "clear_identity"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RequestJudgement { - #[codec(compact)] - pub reg_index: ::core::primitive::u32, - #[codec(compact)] - pub max_fee: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RequestJudgement { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RequestJudgement { - reg_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RequestJudgement::reg_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - max_fee: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RequestJudgement::max_fee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RequestJudgement { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.reg_index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.max_fee), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.reg_index), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.max_fee), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RequestJudgement {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for RequestJudgement { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RequestJudgement; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RequestJudgement { - reg_index: { - let val = *vals - .get(&Some("reg_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reg_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reg_index"))? - }, - max_fee: { - let val = *vals - .get(&Some("max_fee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_fee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_fee"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(RequestJudgement { - reg_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reg_index"))? - }, - max_fee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_fee"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for RequestJudgement { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RequestJudgement { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RequestJudgement { reg_index, max_fee } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reg_index"), - reg_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_fee"), - max_fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for RequestJudgement { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RequestJudgement { reg_index, max_fee } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reg_index"), - reg_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_fee"), - max_fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RequestJudgement { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "RequestJudgement", - "reg_index", - &self.reg_index, - "max_fee", - &&self.max_fee, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RequestJudgement { - const PALLET: &'static str = "Identity"; - const CALL: &'static str = "request_judgement"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelRequest { - pub reg_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for CancelRequest { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.reg_index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - CancelRequest, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CancelRequest { reg_index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for CancelRequest { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> CancelRequest { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CancelRequest { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CancelRequest { - reg_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CancelRequest::reg_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CancelRequest { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.reg_index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.reg_index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.reg_index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.reg_index, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CancelRequest {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CancelRequest { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CancelRequest; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CancelRequest { - reg_index: { - let val = *vals - .get(&Some("reg_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reg_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reg_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(CancelRequest { - reg_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reg_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CancelRequest { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CancelRequest { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CancelRequest { reg_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reg_index"), - reg_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CancelRequest { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CancelRequest { reg_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reg_index"), - reg_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CancelRequest { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "CancelRequest", - "reg_index", - &&self.reg_index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for CancelRequest { - const PALLET: &'static str = "Identity"; - const CALL: &'static str = "cancel_request"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetFee { - #[codec(compact)] - pub index: ::core::primitive::u32, - #[codec(compact)] - pub fee: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetFee { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetFee { - index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetFee::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - fee: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetFee::fee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetFee { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.fee), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.index), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.fee), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetFee {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetFee { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetFee; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetFee { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - fee: { - let val = *vals - .get(&Some("fee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SetFee { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - fee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SetFee { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetFee { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetFee { index, fee } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee"), - fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetFee { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetFee { index, fee } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee"), - fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetFee { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SetFee", - "index", - &self.index, - "fee", - &&self.fee, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetFee { - const PALLET: &'static str = "Identity"; - const CALL: &'static str = "set_fee"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetAccountId { - #[codec(compact)] - pub index: ::core::primitive::u32, - pub new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetAccountId { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetAccountId { - index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetAccountId::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - new: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetAccountId::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetAccountId { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.new, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetAccountId {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetAccountId { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetAccountId; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetAccountId { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SetAccountId { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetAccountId { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetAccountId { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetAccountId { index, new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetAccountId { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetAccountId { index, new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetAccountId { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SetAccountId", - "index", - &self.index, - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetAccountId { - const PALLET: &'static str = "Identity"; - const CALL: &'static str = "set_account_id"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetFields { - #[codec(compact)] - pub index: ::core::primitive::u32, - pub fields: runtime_types::pallet_identity::types::BitFlags< - runtime_types::pallet_identity::types::IdentityField, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetFields { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetFields { - index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetFields::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - fields: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetFields::fields`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetFields { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.fields), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.fields, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetFields {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetFields { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetFields; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetFields { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - fields: { - let val = *vals - .get(&Some("fields")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fields".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fields"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SetFields { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - fields: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fields"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SetFields { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetFields { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetFields { index, fields } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fields"), - fields as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetFields { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetFields { index, fields } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fields"), - fields as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetFields { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SetFields", - "index", - &self.index, - "fields", - &&self.fields, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetFields { - const PALLET: &'static str = "Identity"; - const CALL: &'static str = "set_fields"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProvideJudgement { - #[codec(compact)] - pub reg_index: ::core::primitive::u32, - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub judgement: runtime_types::pallet_identity::types::Judgement< - ::core::primitive::u128, - >, - pub identity: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ProvideJudgement { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ProvideJudgement { - reg_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProvideJudgement::reg_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProvideJudgement::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - judgement: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProvideJudgement::judgement`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - identity: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProvideJudgement::identity`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ProvideJudgement { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.reg_index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.target), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.judgement), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.identity), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.reg_index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.target, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.judgement, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.identity, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ProvideJudgement {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ProvideJudgement { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ProvideJudgement; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ProvideJudgement { - reg_index: { - let val = *vals - .get(&Some("reg_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reg_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reg_index"))? - }, - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - judgement: { - let val = *vals - .get(&Some("judgement")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "judgement".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("judgement"))? - }, - identity: { - let val = *vals - .get(&Some("identity")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "identity".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("identity"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(ProvideJudgement { - reg_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reg_index"))? - }, - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - judgement: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("judgement"))? - }, - identity: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("identity"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ProvideJudgement { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ProvideJudgement { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProvideJudgement { - reg_index, - target, - judgement, - identity, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reg_index"), - reg_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("judgement"), - judgement as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("identity"), - identity as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ProvideJudgement { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProvideJudgement { - reg_index, - target, - judgement, - identity, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reg_index"), - reg_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("judgement"), - judgement as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("identity"), - identity as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ProvideJudgement { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "ProvideJudgement", - "reg_index", - &self.reg_index, - "target", - &self.target, - "judgement", - &self.judgement, - "identity", - &&self.identity, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ProvideJudgement { - const PALLET: &'static str = "Identity"; - const CALL: &'static str = "provide_judgement"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct KillIdentity { - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for KillIdentity { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(KillIdentity { - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `KillIdentity::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for KillIdentity { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.target) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.target, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.target) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.target, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for KillIdentity {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for KillIdentity { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = KillIdentity; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(KillIdentity { - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(KillIdentity { - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for KillIdentity { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for KillIdentity { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let KillIdentity { target } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for KillIdentity { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let KillIdentity { target } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for KillIdentity { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "KillIdentity", - "target", - &&self.target, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for KillIdentity { - const PALLET: &'static str = "Identity"; - const CALL: &'static str = "kill_identity"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddSub { - pub sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub data: runtime_types::pallet_identity::types::Data, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AddSub { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AddSub { - sub: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AddSub::sub`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - data: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AddSub::data`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AddSub { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.sub), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.data), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.sub, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.data, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AddSub {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AddSub { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AddSub; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AddSub { - sub: { - let val = *vals - .get(&Some("sub")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sub".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - data: { - let val = *vals - .get(&Some("data")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "data".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(AddSub { - sub: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - data: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for AddSub { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AddSub { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddSub { sub, data } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("data"), - data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AddSub { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddSub { sub, data } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("data"), - data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AddSub { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AddSub", - "sub", - &self.sub, - "data", - &&self.data, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for AddSub { - const PALLET: &'static str = "Identity"; - const CALL: &'static str = "add_sub"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RenameSub { - pub sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub data: runtime_types::pallet_identity::types::Data, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RenameSub { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RenameSub { - sub: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RenameSub::sub`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - data: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RenameSub::data`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RenameSub { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.sub), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.data), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.sub, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.data, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RenameSub {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RenameSub { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RenameSub; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RenameSub { - sub: { - let val = *vals - .get(&Some("sub")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sub".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - data: { - let val = *vals - .get(&Some("data")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "data".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(RenameSub { - sub: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - data: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for RenameSub { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RenameSub { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RenameSub { sub, data } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("data"), - data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RenameSub { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RenameSub { sub, data } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("data"), - data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RenameSub { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "RenameSub", - "sub", - &self.sub, - "data", - &&self.data, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RenameSub { - const PALLET: &'static str = "Identity"; - const CALL: &'static str = "rename_sub"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveSub { - pub sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RemoveSub { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RemoveSub { - sub: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveSub::sub`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RemoveSub { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.sub) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.sub, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.sub) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.sub, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RemoveSub {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RemoveSub { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RemoveSub; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RemoveSub { - sub: { - let val = *vals - .get(&Some("sub")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sub".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(RemoveSub { - sub: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for RemoveSub { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RemoveSub { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveSub { sub } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RemoveSub { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveSub { sub } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RemoveSub { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "RemoveSub", - "sub", - &&self.sub, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RemoveSub { - const PALLET: &'static str = "Identity"; - const CALL: &'static str = "remove_sub"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct QuitSub; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for QuitSub { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(QuitSub) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for QuitSub { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for QuitSub {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for QuitSub { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = QuitSub; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(QuitSub) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for QuitSub { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for QuitSub { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let QuitSub = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for QuitSub { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let QuitSub = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for QuitSub { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "QuitSub") - } - } - impl ::subxt::blocks::StaticExtrinsic for QuitSub { - const PALLET: &'static str = "Identity"; - const CALL: &'static str = "quit_sub"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn add_registrar( - &self, - account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "add_registrar", - types::AddRegistrar { account }, - [ - 6u8, - 131u8, - 82u8, - 191u8, - 37u8, - 240u8, - 158u8, - 187u8, - 247u8, - 98u8, - 175u8, - 200u8, - 147u8, - 78u8, - 88u8, - 176u8, - 227u8, - 179u8, - 184u8, - 194u8, - 91u8, - 1u8, - 1u8, - 20u8, - 121u8, - 4u8, - 96u8, - 94u8, - 103u8, - 140u8, - 247u8, - 253u8, - ], - ) - } - pub fn set_identity( - &self, - info: runtime_types::pallet_identity::types::IdentityInfo, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "set_identity", - types::SetIdentity { - info: ::std::boxed::Box::new(info), - }, - [ - 18u8, - 86u8, - 67u8, - 10u8, - 116u8, - 254u8, - 94u8, - 95u8, - 166u8, - 30u8, - 204u8, - 189u8, - 174u8, - 70u8, - 191u8, - 255u8, - 149u8, - 93u8, - 156u8, - 120u8, - 105u8, - 138u8, - 199u8, - 181u8, - 43u8, - 150u8, - 143u8, - 254u8, - 182u8, - 81u8, - 86u8, - 45u8, - ], - ) - } - pub fn set_subs( - &self, - subs: ::std::vec::Vec< - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_identity::types::Data, - ), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "set_subs", - types::SetSubs { subs }, - [ - 34u8, - 184u8, - 18u8, - 155u8, - 112u8, - 247u8, - 235u8, - 75u8, - 209u8, - 236u8, - 21u8, - 238u8, - 43u8, - 237u8, - 223u8, - 147u8, - 48u8, - 6u8, - 39u8, - 231u8, - 174u8, - 164u8, - 243u8, - 184u8, - 220u8, - 151u8, - 165u8, - 69u8, - 219u8, - 122u8, - 234u8, - 100u8, - ], - ) - } - pub fn clear_identity( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "clear_identity", - types::ClearIdentity {}, - [ - 43u8, - 115u8, - 205u8, - 44u8, - 24u8, - 130u8, - 220u8, - 69u8, - 247u8, - 176u8, - 200u8, - 175u8, - 67u8, - 183u8, - 36u8, - 200u8, - 162u8, - 132u8, - 242u8, - 25u8, - 21u8, - 106u8, - 197u8, - 219u8, - 141u8, - 51u8, - 204u8, - 13u8, - 191u8, - 201u8, - 31u8, - 31u8, - ], - ) - } - pub fn request_judgement( - &self, - reg_index: ::core::primitive::u32, - max_fee: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "request_judgement", - types::RequestJudgement { - reg_index, - max_fee, - }, - [ - 83u8, - 85u8, - 55u8, - 184u8, - 14u8, - 54u8, - 49u8, - 212u8, - 26u8, - 148u8, - 33u8, - 147u8, - 182u8, - 54u8, - 180u8, - 12u8, - 61u8, - 179u8, - 216u8, - 157u8, - 103u8, - 52u8, - 120u8, - 252u8, - 83u8, - 203u8, - 144u8, - 65u8, - 15u8, - 3u8, - 21u8, - 33u8, - ], - ) - } - pub fn cancel_request( - &self, - reg_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "cancel_request", - types::CancelRequest { reg_index }, - [ - 81u8, - 14u8, - 133u8, - 219u8, - 43u8, - 84u8, - 163u8, - 208u8, - 21u8, - 185u8, - 75u8, - 117u8, - 126u8, - 33u8, - 210u8, - 106u8, - 122u8, - 210u8, - 35u8, - 207u8, - 104u8, - 206u8, - 41u8, - 117u8, - 247u8, - 108u8, - 56u8, - 23u8, - 123u8, - 169u8, - 169u8, - 61u8, - ], - ) - } - pub fn set_fee( - &self, - index: ::core::primitive::u32, - fee: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "set_fee", - types::SetFee { index, fee }, - [ - 131u8, - 20u8, - 17u8, - 127u8, - 180u8, - 65u8, - 225u8, - 144u8, - 193u8, - 60u8, - 131u8, - 241u8, - 30u8, - 149u8, - 8u8, - 76u8, - 29u8, - 52u8, - 102u8, - 108u8, - 127u8, - 130u8, - 70u8, - 18u8, - 94u8, - 145u8, - 179u8, - 109u8, - 252u8, - 219u8, - 58u8, - 163u8, - ], - ) - } - pub fn set_account_id( - &self, - index: ::core::primitive::u32, - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "set_account_id", - types::SetAccountId { index, new }, - [ - 68u8, - 57u8, - 39u8, - 134u8, - 39u8, - 82u8, - 156u8, - 107u8, - 113u8, - 99u8, - 9u8, - 163u8, - 58u8, - 249u8, - 247u8, - 208u8, - 38u8, - 203u8, - 54u8, - 153u8, - 116u8, - 143u8, - 81u8, - 46u8, - 228u8, - 149u8, - 127u8, - 115u8, - 252u8, - 83u8, - 33u8, - 101u8, - ], - ) - } - pub fn set_fields( - &self, - index: ::core::primitive::u32, - fields: runtime_types::pallet_identity::types::BitFlags< - runtime_types::pallet_identity::types::IdentityField, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "set_fields", - types::SetFields { index, fields }, - [ - 25u8, - 129u8, - 119u8, - 232u8, - 18u8, - 32u8, - 77u8, - 23u8, - 185u8, - 56u8, - 32u8, - 199u8, - 74u8, - 174u8, - 104u8, - 203u8, - 171u8, - 253u8, - 19u8, - 225u8, - 101u8, - 239u8, - 14u8, - 242u8, - 157u8, - 51u8, - 203u8, - 74u8, - 1u8, - 65u8, - 165u8, - 205u8, - ], - ) - } - pub fn provide_judgement( - &self, - reg_index: ::core::primitive::u32, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - judgement: runtime_types::pallet_identity::types::Judgement< - ::core::primitive::u128, - >, - identity: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "provide_judgement", - types::ProvideJudgement { - reg_index, - target, - judgement, - identity, - }, - [ - 145u8, - 188u8, - 61u8, - 236u8, - 183u8, - 49u8, - 49u8, - 149u8, - 240u8, - 184u8, - 202u8, - 75u8, - 69u8, - 0u8, - 95u8, - 103u8, - 132u8, - 24u8, - 107u8, - 221u8, - 236u8, - 75u8, - 231u8, - 125u8, - 39u8, - 189u8, - 45u8, - 202u8, - 116u8, - 123u8, - 236u8, - 96u8, - ], - ) - } - pub fn kill_identity( - &self, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "kill_identity", - types::KillIdentity { target }, - [ - 114u8, - 249u8, - 102u8, - 62u8, - 118u8, - 105u8, - 185u8, - 61u8, - 173u8, - 52u8, - 57u8, - 190u8, - 102u8, - 74u8, - 108u8, - 239u8, - 142u8, - 176u8, - 116u8, - 51u8, - 49u8, - 197u8, - 6u8, - 183u8, - 248u8, - 202u8, - 202u8, - 140u8, - 134u8, - 59u8, - 103u8, - 182u8, - ], - ) - } - pub fn add_sub( - &self, - sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - data: runtime_types::pallet_identity::types::Data, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "add_sub", - types::AddSub { sub, data }, - [ - 3u8, - 65u8, - 137u8, - 35u8, - 238u8, - 133u8, - 56u8, - 233u8, - 37u8, - 125u8, - 221u8, - 186u8, - 153u8, - 74u8, - 69u8, - 196u8, - 244u8, - 82u8, - 51u8, - 7u8, - 216u8, - 29u8, - 18u8, - 16u8, - 198u8, - 184u8, - 0u8, - 181u8, - 71u8, - 227u8, - 144u8, - 33u8, - ], - ) - } - pub fn rename_sub( - &self, - sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - data: runtime_types::pallet_identity::types::Data, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "rename_sub", - types::RenameSub { sub, data }, - [ - 252u8, - 50u8, - 201u8, - 112u8, - 49u8, - 248u8, - 223u8, - 239u8, - 219u8, - 226u8, - 64u8, - 68u8, - 227u8, - 20u8, - 30u8, - 24u8, - 36u8, - 77u8, - 26u8, - 235u8, - 144u8, - 240u8, - 11u8, - 111u8, - 145u8, - 167u8, - 184u8, - 207u8, - 173u8, - 58u8, - 152u8, - 202u8, - ], - ) - } - pub fn remove_sub( - &self, - sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "remove_sub", - types::RemoveSub { sub }, - [ - 95u8, - 249u8, - 171u8, - 27u8, - 100u8, - 186u8, - 67u8, - 214u8, - 226u8, - 6u8, - 118u8, - 39u8, - 91u8, - 122u8, - 1u8, - 87u8, - 1u8, - 226u8, - 101u8, - 9u8, - 199u8, - 167u8, - 84u8, - 202u8, - 141u8, - 196u8, - 80u8, - 195u8, - 15u8, - 114u8, - 140u8, - 144u8, - ], - ) - } - pub fn quit_sub(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Identity", - "quit_sub", - types::QuitSub {}, - [ - 147u8, - 131u8, - 175u8, - 171u8, - 187u8, - 201u8, - 240u8, - 26u8, - 146u8, - 224u8, - 74u8, - 166u8, - 242u8, - 193u8, - 204u8, - 247u8, - 168u8, - 93u8, - 18u8, - 32u8, - 27u8, - 208u8, - 149u8, - 146u8, - 179u8, - 172u8, - 75u8, - 112u8, - 84u8, - 141u8, - 233u8, - 223u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_identity::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IdentitySet { - pub who: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for IdentitySet { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(IdentitySet { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IdentitySet::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for IdentitySet { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.who) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.who, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.who) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.who, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for IdentitySet {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for IdentitySet { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = IdentitySet; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(IdentitySet { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(IdentitySet { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for IdentitySet { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for IdentitySet { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IdentitySet { who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for IdentitySet { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IdentitySet { who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for IdentitySet { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "IdentitySet", - "who", - &&self.who, - ) - } - } - impl ::subxt::events::StaticEvent for IdentitySet { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "IdentitySet"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IdentityCleared { - pub who: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for IdentityCleared { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(IdentityCleared { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IdentityCleared::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IdentityCleared::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for IdentityCleared { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deposit), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deposit, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for IdentityCleared {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for IdentityCleared { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = IdentityCleared; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(IdentityCleared { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(IdentityCleared { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for IdentityCleared { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for IdentityCleared { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IdentityCleared { who, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for IdentityCleared { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IdentityCleared { who, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for IdentityCleared { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "IdentityCleared", - "who", - &self.who, - "deposit", - &&self.deposit, - ) - } - } - impl ::subxt::events::StaticEvent for IdentityCleared { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "IdentityCleared"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IdentityKilled { - pub who: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for IdentityKilled { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(IdentityKilled { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IdentityKilled::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IdentityKilled::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for IdentityKilled { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deposit), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deposit, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for IdentityKilled {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for IdentityKilled { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = IdentityKilled; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(IdentityKilled { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(IdentityKilled { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for IdentityKilled { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for IdentityKilled { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IdentityKilled { who, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for IdentityKilled { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IdentityKilled { who, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for IdentityKilled { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "IdentityKilled", - "who", - &self.who, - "deposit", - &&self.deposit, - ) - } - } - impl ::subxt::events::StaticEvent for IdentityKilled { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "IdentityKilled"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct JudgementRequested { - pub who: ::subxt::utils::AccountId32, - pub registrar_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for JudgementRequested { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(JudgementRequested { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `JudgementRequested::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - registrar_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `JudgementRequested::registrar_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for JudgementRequested { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.registrar_index, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.registrar_index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for JudgementRequested {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for JudgementRequested { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = JudgementRequested; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(JudgementRequested { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - registrar_index: { - let val = *vals - .get(&Some("registrar_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "registrar_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("registrar_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(JudgementRequested { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - registrar_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("registrar_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for JudgementRequested { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for JudgementRequested { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let JudgementRequested { who, registrar_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("registrar_index"), - registrar_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for JudgementRequested { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let JudgementRequested { who, registrar_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("registrar_index"), - registrar_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for JudgementRequested { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "JudgementRequested", - "who", - &self.who, - "registrar_index", - &&self.registrar_index, - ) - } - } - impl ::subxt::events::StaticEvent for JudgementRequested { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "JudgementRequested"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct JudgementUnrequested { - pub who: ::subxt::utils::AccountId32, - pub registrar_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for JudgementUnrequested { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(JudgementUnrequested { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `JudgementUnrequested::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - registrar_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `JudgementUnrequested::registrar_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for JudgementUnrequested { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.registrar_index, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.registrar_index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for JudgementUnrequested {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for JudgementUnrequested { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = JudgementUnrequested; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(JudgementUnrequested { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - registrar_index: { - let val = *vals - .get(&Some("registrar_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "registrar_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("registrar_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(JudgementUnrequested { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - registrar_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("registrar_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for JudgementUnrequested { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for JudgementUnrequested { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let JudgementUnrequested { who, registrar_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("registrar_index"), - registrar_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for JudgementUnrequested { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let JudgementUnrequested { who, registrar_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("registrar_index"), - registrar_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for JudgementUnrequested { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "JudgementUnrequested", - "who", - &self.who, - "registrar_index", - &&self.registrar_index, - ) - } - } - impl ::subxt::events::StaticEvent for JudgementUnrequested { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "JudgementUnrequested"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct JudgementGiven { - pub target: ::subxt::utils::AccountId32, - pub registrar_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for JudgementGiven { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(JudgementGiven { - target: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `JudgementGiven::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - registrar_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `JudgementGiven::registrar_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for JudgementGiven { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.target), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.registrar_index, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.target, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.registrar_index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for JudgementGiven {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for JudgementGiven { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = JudgementGiven; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(JudgementGiven { - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - registrar_index: { - let val = *vals - .get(&Some("registrar_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "registrar_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("registrar_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(JudgementGiven { - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - registrar_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("registrar_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for JudgementGiven { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for JudgementGiven { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let JudgementGiven { target, registrar_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("registrar_index"), - registrar_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for JudgementGiven { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let JudgementGiven { target, registrar_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("registrar_index"), - registrar_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for JudgementGiven { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "JudgementGiven", - "target", - &self.target, - "registrar_index", - &&self.registrar_index, - ) - } - } - impl ::subxt::events::StaticEvent for JudgementGiven { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "JudgementGiven"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RegistrarAdded { - pub registrar_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for RegistrarAdded { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.registrar_index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - RegistrarAdded, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RegistrarAdded { - registrar_index: x, - }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for RegistrarAdded { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> RegistrarAdded { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RegistrarAdded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(RegistrarAdded { - registrar_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `RegistrarAdded::registrar_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RegistrarAdded { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &&self.registrar_index, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.registrar_index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.registrar_index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.registrar_index, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RegistrarAdded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RegistrarAdded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RegistrarAdded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RegistrarAdded { - registrar_index: { - let val = *vals - .get(&Some("registrar_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "registrar_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("registrar_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(RegistrarAdded { - registrar_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("registrar_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for RegistrarAdded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RegistrarAdded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RegistrarAdded { registrar_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("registrar_index"), - registrar_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RegistrarAdded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RegistrarAdded { registrar_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("registrar_index"), - registrar_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RegistrarAdded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "RegistrarAdded", - "registrar_index", - &&self.registrar_index, - ) - } - } - impl ::subxt::events::StaticEvent for RegistrarAdded { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "RegistrarAdded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SubIdentityAdded { - pub sub: ::subxt::utils::AccountId32, - pub main: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SubIdentityAdded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(SubIdentityAdded { - sub: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SubIdentityAdded::sub`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - main: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SubIdentityAdded::main`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SubIdentityAdded::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SubIdentityAdded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.sub), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.main), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deposit), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.sub, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.main, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deposit, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SubIdentityAdded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SubIdentityAdded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SubIdentityAdded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SubIdentityAdded { - sub: { - let val = *vals - .get(&Some("sub")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sub".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - main: { - let val = *vals - .get(&Some("main")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "main".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("main"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(SubIdentityAdded { - sub: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - main: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("main"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SubIdentityAdded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SubIdentityAdded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SubIdentityAdded { sub, main, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("main"), - main as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SubIdentityAdded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SubIdentityAdded { sub, main, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("main"), - main as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SubIdentityAdded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SubIdentityAdded", - "sub", - &self.sub, - "main", - &self.main, - "deposit", - &&self.deposit, - ) - } - } - impl ::subxt::events::StaticEvent for SubIdentityAdded { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "SubIdentityAdded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SubIdentityRemoved { - pub sub: ::subxt::utils::AccountId32, - pub main: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SubIdentityRemoved { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(SubIdentityRemoved { - sub: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SubIdentityRemoved::sub`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - main: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SubIdentityRemoved::main`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SubIdentityRemoved::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SubIdentityRemoved { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.sub), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.main), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deposit), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.sub, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.main, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deposit, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SubIdentityRemoved {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SubIdentityRemoved { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SubIdentityRemoved; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SubIdentityRemoved { - sub: { - let val = *vals - .get(&Some("sub")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sub".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - main: { - let val = *vals - .get(&Some("main")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "main".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("main"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(SubIdentityRemoved { - sub: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - main: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("main"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SubIdentityRemoved { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SubIdentityRemoved { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SubIdentityRemoved { sub, main, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("main"), - main as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SubIdentityRemoved { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SubIdentityRemoved { sub, main, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("main"), - main as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SubIdentityRemoved { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SubIdentityRemoved", - "sub", - &self.sub, - "main", - &self.main, - "deposit", - &&self.deposit, - ) - } - } - impl ::subxt::events::StaticEvent for SubIdentityRemoved { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "SubIdentityRemoved"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SubIdentityRevoked { - pub sub: ::subxt::utils::AccountId32, - pub main: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SubIdentityRevoked { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(SubIdentityRevoked { - sub: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SubIdentityRevoked::sub`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - main: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SubIdentityRevoked::main`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SubIdentityRevoked::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SubIdentityRevoked { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.sub), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.main), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deposit), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.sub, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.main, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deposit, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SubIdentityRevoked {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SubIdentityRevoked { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SubIdentityRevoked; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SubIdentityRevoked { - sub: { - let val = *vals - .get(&Some("sub")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sub".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - main: { - let val = *vals - .get(&Some("main")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "main".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("main"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(SubIdentityRevoked { - sub: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - main: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("main"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SubIdentityRevoked { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SubIdentityRevoked { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SubIdentityRevoked { sub, main, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("main"), - main as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SubIdentityRevoked { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SubIdentityRevoked { sub, main, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("main"), - main as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SubIdentityRevoked { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SubIdentityRevoked", - "sub", - &self.sub, - "main", - &self.main, - "deposit", - &&self.deposit, - ) - } - } - impl ::subxt::events::StaticEvent for SubIdentityRevoked { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "SubIdentityRevoked"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn identity_of_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_identity::types::Registration< - ::core::primitive::u128, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Identity", - "IdentityOf", - ::alloc::vec::Vec::new(), - [ - 112u8, - 2u8, - 209u8, - 123u8, - 138u8, - 171u8, - 80u8, - 243u8, - 226u8, - 88u8, - 81u8, - 49u8, - 59u8, - 172u8, - 88u8, - 180u8, - 255u8, - 119u8, - 57u8, - 16u8, - 169u8, - 149u8, - 77u8, - 239u8, - 73u8, - 182u8, - 28u8, - 112u8, - 150u8, - 110u8, - 65u8, - 139u8, - ], - ) - } - pub fn identity_of( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_identity::types::Registration< - ::core::primitive::u128, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Identity", - "IdentityOf", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 112u8, - 2u8, - 209u8, - 123u8, - 138u8, - 171u8, - 80u8, - 243u8, - 226u8, - 88u8, - 81u8, - 49u8, - 59u8, - 172u8, - 88u8, - 180u8, - 255u8, - 119u8, - 57u8, - 16u8, - 169u8, - 149u8, - 77u8, - 239u8, - 73u8, - 182u8, - 28u8, - 112u8, - 150u8, - 110u8, - 65u8, - 139u8, - ], - ) - } - pub fn super_of_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_identity::types::Data, - ), - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Identity", - "SuperOf", - ::alloc::vec::Vec::new(), - [ - 84u8, - 72u8, - 64u8, - 14u8, - 56u8, - 9u8, - 143u8, - 100u8, - 141u8, - 163u8, - 36u8, - 55u8, - 38u8, - 254u8, - 164u8, - 17u8, - 3u8, - 110u8, - 88u8, - 175u8, - 161u8, - 65u8, - 159u8, - 40u8, - 46u8, - 8u8, - 177u8, - 81u8, - 130u8, - 38u8, - 193u8, - 28u8, - ], - ) - } - pub fn super_of( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_identity::types::Data, - ), - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Identity", - "SuperOf", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 84u8, - 72u8, - 64u8, - 14u8, - 56u8, - 9u8, - 143u8, - 100u8, - 141u8, - 163u8, - 36u8, - 55u8, - 38u8, - 254u8, - 164u8, - 17u8, - 3u8, - 110u8, - 88u8, - 175u8, - 161u8, - 65u8, - 159u8, - 40u8, - 46u8, - 8u8, - 177u8, - 81u8, - 130u8, - 38u8, - 193u8, - 28u8, - ], - ) - } - pub fn subs_of_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - ::core::primitive::u128, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - ), - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Identity", - "SubsOf", - ::alloc::vec::Vec::new(), - [ - 164u8, - 140u8, - 52u8, - 123u8, - 220u8, - 118u8, - 147u8, - 3u8, - 67u8, - 22u8, - 191u8, - 18u8, - 186u8, - 21u8, - 154u8, - 8u8, - 205u8, - 224u8, - 163u8, - 173u8, - 174u8, - 107u8, - 144u8, - 215u8, - 116u8, - 64u8, - 159u8, - 115u8, - 159u8, - 205u8, - 91u8, - 28u8, - ], - ) - } - pub fn subs_of( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - ::core::primitive::u128, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - ), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Identity", - "SubsOf", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 164u8, - 140u8, - 52u8, - 123u8, - 220u8, - 118u8, - 147u8, - 3u8, - 67u8, - 22u8, - 191u8, - 18u8, - 186u8, - 21u8, - 154u8, - 8u8, - 205u8, - 224u8, - 163u8, - 173u8, - 174u8, - 107u8, - 144u8, - 215u8, - 116u8, - 64u8, - 159u8, - 115u8, - 159u8, - 205u8, - 91u8, - 28u8, - ], - ) - } - pub fn registrars( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::option::Option< - runtime_types::pallet_identity::types::RegistrarInfo< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Identity", - "Registrars", - ::alloc::vec::Vec::new(), - [ - 207u8, - 253u8, - 229u8, - 237u8, - 228u8, - 85u8, - 173u8, - 74u8, - 164u8, - 67u8, - 144u8, - 144u8, - 5u8, - 242u8, - 84u8, - 187u8, - 110u8, - 181u8, - 2u8, - 162u8, - 239u8, - 212u8, - 72u8, - 233u8, - 160u8, - 196u8, - 121u8, - 218u8, - 100u8, - 0u8, - 219u8, - 181u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn basic_deposit( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Identity", - "BasicDeposit", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn field_deposit( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Identity", - "FieldDeposit", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn sub_account_deposit( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Identity", - "SubAccountDeposit", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn max_sub_accounts( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Identity", - "MaxSubAccounts", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn max_additional_fields( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Identity", - "MaxAdditionalFields", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn max_registrars( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Identity", - "MaxRegistrars", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod proxy { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_proxy::pallet::Error; - pub type Call = runtime_types::pallet_proxy::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Proxy { - pub real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub force_proxy_type: ::core::option::Option< - runtime_types::polkadot_runtime::ProxyType, - >, - pub call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Proxy { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Proxy { - real: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proxy::real`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - force_proxy_type: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::polkadot_runtime::ProxyType, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proxy::force_proxy_type`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proxy::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Proxy { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.real), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.force_proxy_type, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.real, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.force_proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Proxy {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Proxy { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Proxy; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Proxy { - real: { - let val = *vals - .get(&Some("real")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "real".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - force_proxy_type: { - let val = *vals - .get(&Some("force_proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "force_proxy_type".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("force_proxy_type"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Proxy { - real: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - force_proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("force_proxy_type"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Proxy { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Proxy { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Proxy { real, force_proxy_type, call } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("real"), - real as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("force_proxy_type"), - force_proxy_type - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Proxy { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Proxy { real, force_proxy_type, call } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("real"), - real as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("force_proxy_type"), - force_proxy_type - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Proxy { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Proxy", - "real", - &self.real, - "force_proxy_type", - &self.force_proxy_type, - "call", - &&self.call, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Proxy { - const PALLET: &'static str = "Proxy"; - const CALL: &'static str = "proxy"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddProxy { - pub delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub delay: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AddProxy { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AddProxy { - delegate: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AddProxy::delegate`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proxy_type: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AddProxy::proxy_type`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delay: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AddProxy::delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AddProxy { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delegate), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proxy_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delay), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.delegate, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.delay, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AddProxy {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AddProxy { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AddProxy; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AddProxy { - delegate: { - let val = *vals - .get(&Some("delegate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - proxy_type: { - let val = *vals - .get(&Some("proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proxy_type".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(AddProxy { - delegate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for AddProxy { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AddProxy { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddProxy { delegate, proxy_type, delay } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegate"), - delegate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AddProxy { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddProxy { delegate, proxy_type, delay } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegate"), - delegate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AddProxy { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "AddProxy", - "delegate", - &self.delegate, - "proxy_type", - &self.proxy_type, - "delay", - &&self.delay, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for AddProxy { - const PALLET: &'static str = "Proxy"; - const CALL: &'static str = "add_proxy"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveProxy { - pub delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub delay: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RemoveProxy { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RemoveProxy { - delegate: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveProxy::delegate`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proxy_type: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveProxy::proxy_type`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delay: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveProxy::delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RemoveProxy { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delegate), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proxy_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delay), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.delegate, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.delay, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RemoveProxy {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RemoveProxy { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RemoveProxy; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RemoveProxy { - delegate: { - let val = *vals - .get(&Some("delegate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - proxy_type: { - let val = *vals - .get(&Some("proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proxy_type".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(RemoveProxy { - delegate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for RemoveProxy { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RemoveProxy { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveProxy { delegate, proxy_type, delay } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegate"), - delegate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RemoveProxy { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveProxy { delegate, proxy_type, delay } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegate"), - delegate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RemoveProxy { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "RemoveProxy", - "delegate", - &self.delegate, - "proxy_type", - &self.proxy_type, - "delay", - &&self.delay, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RemoveProxy { - const PALLET: &'static str = "Proxy"; - const CALL: &'static str = "remove_proxy"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveProxies; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RemoveProxies { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RemoveProxies) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RemoveProxies { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RemoveProxies {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RemoveProxies { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RemoveProxies; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(RemoveProxies) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for RemoveProxies { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RemoveProxies { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveProxies = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RemoveProxies { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveProxies = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RemoveProxies { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "RemoveProxies") - } - } - impl ::subxt::blocks::StaticExtrinsic for RemoveProxies { - const PALLET: &'static str = "Proxy"; - const CALL: &'static str = "remove_proxies"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CreatePure { - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub delay: ::core::primitive::u32, - pub index: ::core::primitive::u16, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CreatePure { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CreatePure { - proxy_type: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CreatePure::proxy_type`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delay: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CreatePure::delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CreatePure::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CreatePure { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proxy_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delay), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.delay, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CreatePure {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CreatePure { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CreatePure; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CreatePure { - proxy_type: { - let val = *vals - .get(&Some("proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proxy_type".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(CreatePure { - proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for CreatePure { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CreatePure { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CreatePure { proxy_type, delay, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CreatePure { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CreatePure { proxy_type, delay, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CreatePure { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "CreatePure", - "proxy_type", - &self.proxy_type, - "delay", - &self.delay, - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for CreatePure { - const PALLET: &'static str = "Proxy"; - const CALL: &'static str = "create_pure"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct KillPure { - pub spawner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub index: ::core::primitive::u16, - #[codec(compact)] - pub height: ::core::primitive::u32, - #[codec(compact)] - pub ext_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for KillPure { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(KillPure { - spawner: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `KillPure::spawner`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proxy_type: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `KillPure::proxy_type`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `KillPure::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - height: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `KillPure::height`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - ext_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `KillPure::ext_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for KillPure { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.spawner), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proxy_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.height), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.ext_index), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.spawner, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.height), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.ext_index), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for KillPure {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for KillPure { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = KillPure; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(KillPure { - spawner: { - let val = *vals - .get(&Some("spawner")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "spawner".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("spawner"))? - }, - proxy_type: { - let val = *vals - .get(&Some("proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proxy_type".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - height: { - let val = *vals - .get(&Some("height")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "height".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("height"))? - }, - ext_index: { - let val = *vals - .get(&Some("ext_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ext_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ext_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(KillPure { - spawner: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("spawner"))? - }, - proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - height: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("height"))? - }, - ext_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ext_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for KillPure { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for KillPure { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let KillPure { - spawner, - proxy_type, - index, - height, - ext_index, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("spawner"), - spawner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("height"), - height as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ext_index"), - ext_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for KillPure { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let KillPure { - spawner, - proxy_type, - index, - height, - ext_index, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("spawner"), - spawner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("height"), - height as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ext_index"), - ext_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for KillPure { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "KillPure", - "spawner", - &self.spawner, - "proxy_type", - &self.proxy_type, - "index", - &self.index, - "height", - &self.height, - "ext_index", - &&self.ext_index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for KillPure { - const PALLET: &'static str = "Proxy"; - const CALL: &'static str = "kill_pure"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Announce { - pub real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub call_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Announce { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Announce { - real: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Announce::real`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Announce::call_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Announce { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.real), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call_hash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.real, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call_hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Announce {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Announce { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Announce; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Announce { - real: { - let val = *vals - .get(&Some("real")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "real".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Announce { - real: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Announce { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Announce { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Announce { real, call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("real"), - real as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Announce { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Announce { real, call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("real"), - real as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Announce { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Announce", - "real", - &self.real, - "call_hash", - &&self.call_hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Announce { - const PALLET: &'static str = "Proxy"; - const CALL: &'static str = "announce"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveAnnouncement { - pub real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub call_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RemoveAnnouncement { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RemoveAnnouncement { - real: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveAnnouncement::real`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveAnnouncement::call_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RemoveAnnouncement { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.real), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call_hash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.real, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call_hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RemoveAnnouncement {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for RemoveAnnouncement { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RemoveAnnouncement; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RemoveAnnouncement { - real: { - let val = *vals - .get(&Some("real")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "real".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(RemoveAnnouncement { - real: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for RemoveAnnouncement { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for RemoveAnnouncement { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveAnnouncement { real, call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("real"), - real as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for RemoveAnnouncement { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveAnnouncement { real, call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("real"), - real as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RemoveAnnouncement { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "RemoveAnnouncement", - "real", - &self.real, - "call_hash", - &&self.call_hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RemoveAnnouncement { - const PALLET: &'static str = "Proxy"; - const CALL: &'static str = "remove_announcement"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RejectAnnouncement { - pub delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub call_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RejectAnnouncement { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RejectAnnouncement { - delegate: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RejectAnnouncement::delegate`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RejectAnnouncement::call_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RejectAnnouncement { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delegate), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call_hash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.delegate, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call_hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RejectAnnouncement {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for RejectAnnouncement { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RejectAnnouncement; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RejectAnnouncement { - delegate: { - let val = *vals - .get(&Some("delegate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(RejectAnnouncement { - delegate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for RejectAnnouncement { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for RejectAnnouncement { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RejectAnnouncement { delegate, call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegate"), - delegate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for RejectAnnouncement { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RejectAnnouncement { delegate, call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegate"), - delegate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RejectAnnouncement { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "RejectAnnouncement", - "delegate", - &self.delegate, - "call_hash", - &&self.call_hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RejectAnnouncement { - const PALLET: &'static str = "Proxy"; - const CALL: &'static str = "reject_announcement"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProxyAnnounced { - pub delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub force_proxy_type: ::core::option::Option< - runtime_types::polkadot_runtime::ProxyType, - >, - pub call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ProxyAnnounced { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ProxyAnnounced { - delegate: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProxyAnnounced::delegate`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - real: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProxyAnnounced::real`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - force_proxy_type: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::polkadot_runtime::ProxyType, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ProxyAnnounced::force_proxy_type`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProxyAnnounced::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ProxyAnnounced { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delegate), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.real), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.force_proxy_type, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.delegate, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.real, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.force_proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ProxyAnnounced {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ProxyAnnounced { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ProxyAnnounced; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ProxyAnnounced { - delegate: { - let val = *vals - .get(&Some("delegate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - real: { - let val = *vals - .get(&Some("real")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "real".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - force_proxy_type: { - let val = *vals - .get(&Some("force_proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "force_proxy_type".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("force_proxy_type"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(ProxyAnnounced { - delegate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - real: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - force_proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("force_proxy_type"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ProxyAnnounced { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ProxyAnnounced { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProxyAnnounced { - delegate, - real, - force_proxy_type, - call, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegate"), - delegate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("real"), - real as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("force_proxy_type"), - force_proxy_type - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ProxyAnnounced { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProxyAnnounced { - delegate, - real, - force_proxy_type, - call, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegate"), - delegate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("real"), - real as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("force_proxy_type"), - force_proxy_type - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ProxyAnnounced { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "ProxyAnnounced", - "delegate", - &self.delegate, - "real", - &self.real, - "force_proxy_type", - &self.force_proxy_type, - "call", - &&self.call, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ProxyAnnounced { - const PALLET: &'static str = "Proxy"; - const CALL: &'static str = "proxy_announced"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn proxy( - &self, - real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - force_proxy_type: ::core::option::Option< - runtime_types::polkadot_runtime::ProxyType, - >, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "proxy", - types::Proxy { - real, - force_proxy_type, - call: ::std::boxed::Box::new(call), - }, - [ - 219u8, - 208u8, - 48u8, - 109u8, - 80u8, - 56u8, - 8u8, - 81u8, - 231u8, - 203u8, - 25u8, - 143u8, - 179u8, - 67u8, - 218u8, - 87u8, - 80u8, - 46u8, - 87u8, - 103u8, - 214u8, - 18u8, - 133u8, - 4u8, - 21u8, - 6u8, - 206u8, - 104u8, - 27u8, - 251u8, - 229u8, - 61u8, - ], - ) - } - pub fn add_proxy( - &self, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "add_proxy", - types::AddProxy { - delegate, - proxy_type, - delay, - }, - [ - 220u8, - 202u8, - 219u8, - 231u8, - 191u8, - 245u8, - 104u8, - 50u8, - 183u8, - 248u8, - 174u8, - 8u8, - 129u8, - 7u8, - 220u8, - 203u8, - 147u8, - 224u8, - 127u8, - 243u8, - 46u8, - 234u8, - 204u8, - 92u8, - 112u8, - 77u8, - 143u8, - 83u8, - 218u8, - 183u8, - 131u8, - 194u8, - ], - ) - } - pub fn remove_proxy( - &self, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "remove_proxy", - types::RemoveProxy { - delegate, - proxy_type, - delay, - }, - [ - 123u8, - 71u8, - 234u8, - 46u8, - 239u8, - 132u8, - 115u8, - 20u8, - 33u8, - 31u8, - 75u8, - 172u8, - 152u8, - 129u8, - 51u8, - 240u8, - 164u8, - 153u8, - 120u8, - 2u8, - 120u8, - 151u8, - 182u8, - 92u8, - 222u8, - 213u8, - 105u8, - 21u8, - 126u8, - 182u8, - 117u8, - 133u8, - ], - ) - } - pub fn remove_proxies( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "remove_proxies", - types::RemoveProxies {}, - [ - 1u8, - 126u8, - 36u8, - 227u8, - 185u8, - 34u8, - 218u8, - 236u8, - 125u8, - 231u8, - 68u8, - 185u8, - 145u8, - 63u8, - 250u8, - 225u8, - 103u8, - 3u8, - 189u8, - 37u8, - 172u8, - 195u8, - 197u8, - 216u8, - 99u8, - 210u8, - 240u8, - 162u8, - 158u8, - 132u8, - 24u8, - 6u8, - ], - ) - } - pub fn create_pure( - &self, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - index: ::core::primitive::u16, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "create_pure", - types::CreatePure { - proxy_type, - delay, - index, - }, - [ - 65u8, - 193u8, - 16u8, - 29u8, - 244u8, - 34u8, - 244u8, - 210u8, - 211u8, - 61u8, - 127u8, - 20u8, - 106u8, - 84u8, - 207u8, - 204u8, - 135u8, - 176u8, - 245u8, - 209u8, - 115u8, - 67u8, - 120u8, - 133u8, - 54u8, - 26u8, - 168u8, - 45u8, - 217u8, - 177u8, - 17u8, - 219u8, - ], - ) - } - pub fn kill_pure( - &self, - spawner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - index: ::core::primitive::u16, - height: ::core::primitive::u32, - ext_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "kill_pure", - types::KillPure { - spawner, - proxy_type, - index, - height, - ext_index, - }, - [ - 156u8, - 57u8, - 67u8, - 93u8, - 148u8, - 239u8, - 31u8, - 189u8, - 52u8, - 190u8, - 74u8, - 215u8, - 82u8, - 207u8, - 85u8, - 160u8, - 215u8, - 24u8, - 36u8, - 136u8, - 79u8, - 108u8, - 50u8, - 226u8, - 138u8, - 101u8, - 158u8, - 120u8, - 225u8, - 46u8, - 228u8, - 150u8, - ], - ) - } - pub fn announce( - &self, - real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "announce", - types::Announce { real, call_hash }, - [ - 105u8, - 218u8, - 232u8, - 82u8, - 80u8, - 10u8, - 11u8, - 1u8, - 93u8, - 241u8, - 121u8, - 198u8, - 167u8, - 218u8, - 95u8, - 15u8, - 75u8, - 122u8, - 155u8, - 233u8, - 10u8, - 175u8, - 145u8, - 73u8, - 214u8, - 230u8, - 67u8, - 107u8, - 23u8, - 239u8, - 69u8, - 240u8, - ], - ) - } - pub fn remove_announcement( - &self, - real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "remove_announcement", - types::RemoveAnnouncement { - real, - call_hash, - }, - [ - 40u8, - 237u8, - 179u8, - 128u8, - 201u8, - 183u8, - 20u8, - 47u8, - 99u8, - 182u8, - 81u8, - 31u8, - 27u8, - 212u8, - 133u8, - 36u8, - 8u8, - 248u8, - 57u8, - 230u8, - 138u8, - 80u8, - 241u8, - 147u8, - 69u8, - 236u8, - 156u8, - 167u8, - 205u8, - 49u8, - 60u8, - 16u8, - ], - ) - } - pub fn reject_announcement( - &self, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "reject_announcement", - types::RejectAnnouncement { - delegate, - call_hash, - }, - [ - 150u8, - 178u8, - 49u8, - 160u8, - 211u8, - 75u8, - 58u8, - 228u8, - 121u8, - 253u8, - 167u8, - 72u8, - 68u8, - 105u8, - 159u8, - 52u8, - 41u8, - 155u8, - 92u8, - 26u8, - 169u8, - 177u8, - 102u8, - 36u8, - 1u8, - 47u8, - 87u8, - 189u8, - 223u8, - 238u8, - 244u8, - 110u8, - ], - ) - } - pub fn proxy_announced( - &self, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - force_proxy_type: ::core::option::Option< - runtime_types::polkadot_runtime::ProxyType, - >, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "proxy_announced", - types::ProxyAnnounced { - delegate, - real, - force_proxy_type, - call: ::std::boxed::Box::new(call), - }, - [ - 66u8, - 9u8, - 66u8, - 127u8, - 113u8, - 38u8, - 238u8, - 97u8, - 112u8, - 206u8, - 58u8, - 110u8, - 60u8, - 192u8, - 165u8, - 47u8, - 16u8, - 206u8, - 125u8, - 252u8, - 58u8, - 88u8, - 245u8, - 64u8, - 138u8, - 140u8, - 111u8, - 223u8, - 98u8, - 173u8, - 174u8, - 71u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_proxy::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProxyExecuted { - pub result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ProxyExecuted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ProxyExecuted { - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProxyExecuted::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ProxyExecuted { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.result) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.result, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.result) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.result, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ProxyExecuted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ProxyExecuted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ProxyExecuted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ProxyExecuted { - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ProxyExecuted { - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ProxyExecuted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ProxyExecuted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProxyExecuted { result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ProxyExecuted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProxyExecuted { result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ProxyExecuted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ProxyExecuted", - "result", - &&self.result, - ) - } - } - impl ::subxt::events::StaticEvent for ProxyExecuted { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "ProxyExecuted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PureCreated { - pub pure: ::subxt::utils::AccountId32, - pub who: ::subxt::utils::AccountId32, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub disambiguation_index: ::core::primitive::u16, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PureCreated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(PureCreated { - pure: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PureCreated::pure`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PureCreated::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proxy_type: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PureCreated::proxy_type`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - disambiguation_index: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `PureCreated::disambiguation_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PureCreated { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pure), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proxy_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.disambiguation_index, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pure, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.disambiguation_index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PureCreated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PureCreated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PureCreated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PureCreated { - pure: { - let val = *vals - .get(&Some("pure")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pure".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pure"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - proxy_type: { - let val = *vals - .get(&Some("proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proxy_type".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - disambiguation_index: { - let val = *vals - .get(&Some("disambiguation_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "disambiguation_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("disambiguation_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(PureCreated { - pure: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pure"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - disambiguation_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("disambiguation_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for PureCreated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PureCreated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PureCreated { - pure, - who, - proxy_type, - disambiguation_index, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pure"), - pure as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("disambiguation_index"), - disambiguation_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PureCreated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PureCreated { - pure, - who, - proxy_type, - disambiguation_index, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pure"), - pure as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("disambiguation_index"), - disambiguation_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PureCreated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "PureCreated", - "pure", - &self.pure, - "who", - &self.who, - "proxy_type", - &self.proxy_type, - "disambiguation_index", - &&self.disambiguation_index, - ) - } - } - impl ::subxt::events::StaticEvent for PureCreated { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "PureCreated"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Announced { - pub real: ::subxt::utils::AccountId32, - pub proxy: ::subxt::utils::AccountId32, - pub call_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Announced { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Announced { - real: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Announced::real`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proxy: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Announced::proxy`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Announced::call_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Announced { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.real), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proxy), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call_hash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.real, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proxy, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call_hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Announced {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Announced { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Announced; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Announced { - real: { - let val = *vals - .get(&Some("real")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "real".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - proxy: { - let val = *vals - .get(&Some("proxy")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proxy".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proxy"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Announced { - real: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - proxy: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proxy"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Announced { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Announced { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Announced { real, proxy, call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("real"), - real as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy"), - proxy as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Announced { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Announced { real, proxy, call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("real"), - real as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy"), - proxy as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Announced { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Announced", - "real", - &self.real, - "proxy", - &self.proxy, - "call_hash", - &&self.call_hash, - ) - } - } - impl ::subxt::events::StaticEvent for Announced { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "Announced"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ProxyAdded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ProxyAdded { - delegator: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProxyAdded::delegator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delegatee: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProxyAdded::delegatee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proxy_type: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProxyAdded::proxy_type`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delay: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProxyAdded::delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ProxyAdded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delegator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delegatee), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proxy_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delay), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.delegator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.delegatee, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.delay, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ProxyAdded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ProxyAdded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ProxyAdded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ProxyAdded { - delegator: { - let val = *vals - .get(&Some("delegator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegator"))? - }, - delegatee: { - let val = *vals - .get(&Some("delegatee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegatee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegatee"))? - }, - proxy_type: { - let val = *vals - .get(&Some("proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proxy_type".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(ProxyAdded { - delegator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegator"))? - }, - delegatee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegatee"))? - }, - proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ProxyAdded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ProxyAdded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProxyAdded { delegator, delegatee, proxy_type, delay } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegator"), - delegator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delegatee"), - delegatee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ProxyAdded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProxyAdded { delegator, delegatee, proxy_type, delay } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegator"), - delegator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delegatee"), - delegatee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ProxyAdded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "ProxyAdded", - "delegator", - &self.delegator, - "delegatee", - &self.delegatee, - "proxy_type", - &self.proxy_type, - "delay", - &&self.delay, - ) - } - } - impl ::subxt::events::StaticEvent for ProxyAdded { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "ProxyAdded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ProxyRemoved { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ProxyRemoved { - delegator: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProxyRemoved::delegator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delegatee: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProxyRemoved::delegatee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proxy_type: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProxyRemoved::proxy_type`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delay: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProxyRemoved::delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ProxyRemoved { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delegator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delegatee), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proxy_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delay), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.delegator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.delegatee, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.delay, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ProxyRemoved {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ProxyRemoved { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ProxyRemoved; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ProxyRemoved { - delegator: { - let val = *vals - .get(&Some("delegator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegator"))? - }, - delegatee: { - let val = *vals - .get(&Some("delegatee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegatee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegatee"))? - }, - proxy_type: { - let val = *vals - .get(&Some("proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proxy_type".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(ProxyRemoved { - delegator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegator"))? - }, - delegatee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegatee"))? - }, - proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ProxyRemoved { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ProxyRemoved { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProxyRemoved { delegator, delegatee, proxy_type, delay } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegator"), - delegator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delegatee"), - delegatee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ProxyRemoved { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProxyRemoved { delegator, delegatee, proxy_type, delay } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegator"), - delegator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delegatee"), - delegatee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ProxyRemoved { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "ProxyRemoved", - "delegator", - &self.delegator, - "delegatee", - &self.delegatee, - "proxy_type", - &self.proxy_type, - "delay", - &&self.delay, - ) - } - } - 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 { - pub fn proxies_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::ProxyDefinition< - ::subxt::utils::AccountId32, - runtime_types::polkadot_runtime::ProxyType, - ::core::primitive::u32, - >, - >, - ::core::primitive::u128, - ), - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Proxy", - "Proxies", - ::alloc::vec::Vec::new(), - [ - 248u8, - 226u8, - 176u8, - 230u8, - 10u8, - 37u8, - 135u8, - 74u8, - 122u8, - 169u8, - 107u8, - 114u8, - 64u8, - 12u8, - 171u8, - 126u8, - 3u8, - 11u8, - 197u8, - 216u8, - 36u8, - 239u8, - 150u8, - 88u8, - 37u8, - 171u8, - 84u8, - 200u8, - 241u8, - 32u8, - 238u8, - 157u8, - ], - ) - } - pub fn proxies( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::ProxyDefinition< - ::subxt::utils::AccountId32, - runtime_types::polkadot_runtime::ProxyType, - ::core::primitive::u32, - >, - >, - ::core::primitive::u128, - ), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Proxy", - "Proxies", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 248u8, - 226u8, - 176u8, - 230u8, - 10u8, - 37u8, - 135u8, - 74u8, - 122u8, - 169u8, - 107u8, - 114u8, - 64u8, - 12u8, - 171u8, - 126u8, - 3u8, - 11u8, - 197u8, - 216u8, - 36u8, - 239u8, - 150u8, - 88u8, - 37u8, - 171u8, - 84u8, - 200u8, - 241u8, - 32u8, - 238u8, - 157u8, - ], - ) - } - pub fn announcements_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::Announcement< - ::subxt::utils::AccountId32, - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - ::core::primitive::u128, - ), - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Proxy", - "Announcements", - ::alloc::vec::Vec::new(), - [ - 129u8, - 228u8, - 198u8, - 210u8, - 90u8, - 69u8, - 151u8, - 198u8, - 206u8, - 174u8, - 148u8, - 58u8, - 134u8, - 14u8, - 53u8, - 56u8, - 234u8, - 71u8, - 84u8, - 247u8, - 246u8, - 207u8, - 117u8, - 221u8, - 84u8, - 72u8, - 254u8, - 215u8, - 102u8, - 49u8, - 21u8, - 173u8, - ], - ) - } - pub fn announcements( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::Announcement< - ::subxt::utils::AccountId32, - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - ::core::primitive::u128, - ), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Proxy", - "Announcements", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 129u8, - 228u8, - 198u8, - 210u8, - 90u8, - 69u8, - 151u8, - 198u8, - 206u8, - 174u8, - 148u8, - 58u8, - 134u8, - 14u8, - 53u8, - 56u8, - 234u8, - 71u8, - 84u8, - 247u8, - 246u8, - 207u8, - 117u8, - 221u8, - 84u8, - 72u8, - 254u8, - 215u8, - 102u8, - 49u8, - 21u8, - 173u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn proxy_deposit_base( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Proxy", - "ProxyDepositBase", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn proxy_deposit_factor( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Proxy", - "ProxyDepositFactor", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn max_proxies( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Proxy", - "MaxProxies", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn max_pending( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Proxy", - "MaxPending", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn announcement_deposit_base( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Proxy", - "AnnouncementDepositBase", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn announcement_deposit_factor( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Proxy", - "AnnouncementDepositFactor", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - } - } - } - pub mod multisig { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_multisig::pallet::Error; - pub type Call = runtime_types::pallet_multisig::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AsMultiThreshold1 { - pub other_signatories: ::std::vec::Vec< - ::subxt::utils::AccountId32, - >, - pub call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AsMultiThreshold1 { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AsMultiThreshold1 { - other_signatories: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `AsMultiThreshold1::other_signatories`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AsMultiThreshold1::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AsMultiThreshold1 { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.other_signatories, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.other_signatories, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AsMultiThreshold1 {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for AsMultiThreshold1 { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AsMultiThreshold1; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AsMultiThreshold1 { - other_signatories: { - let val = *vals - .get(&Some("other_signatories")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "other_signatories".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("other_signatories"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(AsMultiThreshold1 { - other_signatories: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("other_signatories"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for AsMultiThreshold1 { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AsMultiThreshold1 { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AsMultiThreshold1 { other_signatories, call } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("other_signatories"), - other_signatories - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for AsMultiThreshold1 { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AsMultiThreshold1 { other_signatories, call } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("other_signatories"), - other_signatories - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AsMultiThreshold1 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AsMultiThreshold1", - "other_signatories", - &self.other_signatories, - "call", - &&self.call, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for AsMultiThreshold1 { - const PALLET: &'static str = "Multisig"; - const CALL: &'static str = "as_multi_threshold_1"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct 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< - runtime_types::polkadot_runtime::RuntimeCall, - >, - pub max_weight: runtime_types::sp_weights::weight_v2::Weight, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AsMulti { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AsMulti { - threshold: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AsMulti::threshold`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - other_signatories: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AsMulti::other_signatories`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_timepoint: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::pallet_multisig::Timepoint< - ::core::primitive::u32, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AsMulti::maybe_timepoint`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AsMulti::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_weight: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AsMulti::max_weight`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AsMulti { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.threshold), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.other_signatories, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.maybe_timepoint, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_weight), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.threshold, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.other_signatories, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.maybe_timepoint, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_weight, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AsMulti {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AsMulti { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AsMulti; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AsMulti { - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - other_signatories: { - let val = *vals - .get(&Some("other_signatories")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "other_signatories".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("other_signatories"))? - }, - maybe_timepoint: { - let val = *vals - .get(&Some("maybe_timepoint")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_timepoint".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_timepoint"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - max_weight: { - let val = *vals - .get(&Some("max_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_weight".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(AsMulti { - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - other_signatories: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("other_signatories"))? - }, - maybe_timepoint: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_timepoint"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - max_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for AsMulti { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AsMulti { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AsMulti { - threshold, - other_signatories, - maybe_timepoint, - call, - max_weight, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("other_signatories"), - other_signatories - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_timepoint"), - maybe_timepoint - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_weight"), - max_weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AsMulti { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AsMulti { - threshold, - other_signatories, - maybe_timepoint, - call, - max_weight, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("other_signatories"), - other_signatories - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_timepoint"), - maybe_timepoint - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_weight"), - max_weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AsMulti { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "AsMulti", - "threshold", - &self.threshold, - "other_signatories", - &self.other_signatories, - "maybe_timepoint", - &self.maybe_timepoint, - "call", - &self.call, - "max_weight", - &&self.max_weight, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for AsMulti { - const PALLET: &'static str = "Multisig"; - const CALL: &'static str = "as_multi"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ApproveAsMulti { - pub threshold: ::core::primitive::u16, - pub other_signatories: ::std::vec::Vec< - ::subxt::utils::AccountId32, - >, - pub maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint< - ::core::primitive::u32, - >, - >, - pub call_hash: [::core::primitive::u8; 32usize], - pub max_weight: runtime_types::sp_weights::weight_v2::Weight, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ApproveAsMulti { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ApproveAsMulti { - threshold: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ApproveAsMulti::threshold`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - other_signatories: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ApproveAsMulti::other_signatories`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_timepoint: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::pallet_multisig::Timepoint< - ::core::primitive::u32, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `ApproveAsMulti::maybe_timepoint`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ApproveAsMulti::call_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_weight: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ApproveAsMulti::max_weight`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ApproveAsMulti { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.threshold), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.other_signatories, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.maybe_timepoint, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_weight), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.threshold, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.other_signatories, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.maybe_timepoint, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_weight, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ApproveAsMulti {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ApproveAsMulti { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ApproveAsMulti; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ApproveAsMulti { - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - other_signatories: { - let val = *vals - .get(&Some("other_signatories")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "other_signatories".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("other_signatories"))? - }, - maybe_timepoint: { - let val = *vals - .get(&Some("maybe_timepoint")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_timepoint".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_timepoint"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - max_weight: { - let val = *vals - .get(&Some("max_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_weight".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(ApproveAsMulti { - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - other_signatories: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("other_signatories"))? - }, - maybe_timepoint: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_timepoint"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - max_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ApproveAsMulti { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ApproveAsMulti { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ApproveAsMulti { - threshold, - other_signatories, - maybe_timepoint, - call_hash, - max_weight, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("other_signatories"), - other_signatories - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_timepoint"), - maybe_timepoint - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_weight"), - max_weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ApproveAsMulti { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ApproveAsMulti { - threshold, - other_signatories, - maybe_timepoint, - call_hash, - max_weight, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("other_signatories"), - other_signatories - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_timepoint"), - maybe_timepoint - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_weight"), - max_weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ApproveAsMulti { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "ApproveAsMulti", - "threshold", - &self.threshold, - "other_signatories", - &self.other_signatories, - "maybe_timepoint", - &self.maybe_timepoint, - "call_hash", - &self.call_hash, - "max_weight", - &&self.max_weight, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ApproveAsMulti { - const PALLET: &'static str = "Multisig"; - const CALL: &'static str = "approve_as_multi"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelAsMulti { - pub threshold: ::core::primitive::u16, - pub other_signatories: ::std::vec::Vec< - ::subxt::utils::AccountId32, - >, - pub timepoint: runtime_types::pallet_multisig::Timepoint< - ::core::primitive::u32, - >, - pub call_hash: [::core::primitive::u8; 32usize], - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CancelAsMulti { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CancelAsMulti { - threshold: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CancelAsMulti::threshold`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - other_signatories: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CancelAsMulti::other_signatories`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - timepoint: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CancelAsMulti::timepoint`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CancelAsMulti::call_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CancelAsMulti { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.threshold), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.other_signatories, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.timepoint), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call_hash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.threshold, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.other_signatories, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.timepoint, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call_hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CancelAsMulti {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CancelAsMulti { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CancelAsMulti; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CancelAsMulti { - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - other_signatories: { - let val = *vals - .get(&Some("other_signatories")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "other_signatories".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("other_signatories"))? - }, - timepoint: { - let val = *vals - .get(&Some("timepoint")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "timepoint".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("timepoint"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(CancelAsMulti { - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - other_signatories: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("other_signatories"))? - }, - timepoint: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("timepoint"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CancelAsMulti { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CancelAsMulti { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CancelAsMulti { - threshold, - other_signatories, - timepoint, - call_hash, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("other_signatories"), - other_signatories - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("timepoint"), - timepoint as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CancelAsMulti { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CancelAsMulti { - threshold, - other_signatories, - timepoint, - call_hash, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("other_signatories"), - other_signatories - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("timepoint"), - timepoint as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CancelAsMulti { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "CancelAsMulti", - "threshold", - &self.threshold, - "other_signatories", - &self.other_signatories, - "timepoint", - &self.timepoint, - "call_hash", - &&self.call_hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for CancelAsMulti { - const PALLET: &'static str = "Multisig"; - const CALL: &'static str = "cancel_as_multi"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn as_multi_threshold_1( - &self, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Multisig", - "as_multi_threshold_1", - types::AsMultiThreshold1 { - other_signatories, - call: ::std::boxed::Box::new(call), - }, - [ - 207u8, - 32u8, - 204u8, - 212u8, - 92u8, - 112u8, - 125u8, - 146u8, - 182u8, - 153u8, - 57u8, - 161u8, - 24u8, - 246u8, - 89u8, - 124u8, - 39u8, - 222u8, - 167u8, - 142u8, - 180u8, - 50u8, - 16u8, - 62u8, - 238u8, - 180u8, - 61u8, - 118u8, - 225u8, - 250u8, - 201u8, - 251u8, - ], - ) - } - pub fn as_multi( - &self, - threshold: ::core::primitive::u16, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint< - ::core::primitive::u32, - >, - >, - call: runtime_types::polkadot_runtime::RuntimeCall, - max_weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Multisig", - "as_multi", - types::AsMulti { - threshold, - other_signatories, - maybe_timepoint, - call: ::std::boxed::Box::new(call), - max_weight, - }, - [ - 93u8, - 217u8, - 221u8, - 13u8, - 79u8, - 86u8, - 39u8, - 57u8, - 149u8, - 133u8, - 186u8, - 219u8, - 40u8, - 192u8, - 145u8, - 247u8, - 207u8, - 211u8, - 32u8, - 2u8, - 127u8, - 234u8, - 34u8, - 28u8, - 146u8, - 176u8, - 57u8, - 193u8, - 134u8, - 71u8, - 180u8, - 209u8, - ], - ) - } - pub fn approve_as_multi( - &self, - threshold: ::core::primitive::u16, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint< - ::core::primitive::u32, - >, - >, - call_hash: [::core::primitive::u8; 32usize], - max_weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Multisig", - "approve_as_multi", - types::ApproveAsMulti { - threshold, - other_signatories, - maybe_timepoint, - call_hash, - max_weight, - }, - [ - 248u8, - 46u8, - 131u8, - 35u8, - 204u8, - 12u8, - 218u8, - 150u8, - 88u8, - 131u8, - 89u8, - 13u8, - 95u8, - 122u8, - 87u8, - 107u8, - 136u8, - 154u8, - 92u8, - 199u8, - 108u8, - 92u8, - 207u8, - 171u8, - 113u8, - 8u8, - 47u8, - 248u8, - 65u8, - 26u8, - 203u8, - 135u8, - ], - ) - } - pub fn cancel_as_multi( - &self, - threshold: ::core::primitive::u16, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - timepoint: runtime_types::pallet_multisig::Timepoint< - ::core::primitive::u32, - >, - call_hash: [::core::primitive::u8; 32usize], - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Multisig", - "cancel_as_multi", - types::CancelAsMulti { - threshold, - other_signatories, - timepoint, - call_hash, - }, - [ - 212u8, - 179u8, - 123u8, - 40u8, - 209u8, - 228u8, - 181u8, - 0u8, - 109u8, - 28u8, - 27u8, - 48u8, - 15u8, - 47u8, - 203u8, - 54u8, - 106u8, - 114u8, - 28u8, - 118u8, - 101u8, - 201u8, - 95u8, - 187u8, - 46u8, - 182u8, - 4u8, - 30u8, - 227u8, - 105u8, - 14u8, - 81u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_multisig::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NewMultisig { - pub approving: ::subxt::utils::AccountId32, - pub multisig: ::subxt::utils::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NewMultisig { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(NewMultisig { - approving: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NewMultisig::approving`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - multisig: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NewMultisig::multisig`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NewMultisig::call_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NewMultisig { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.approving), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.multisig), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call_hash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.approving, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.multisig, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call_hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NewMultisig {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for NewMultisig { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NewMultisig; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(NewMultisig { - approving: { - let val = *vals - .get(&Some("approving")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "approving".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("approving"))? - }, - multisig: { - let val = *vals - .get(&Some("multisig")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "multisig".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("multisig"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(NewMultisig { - approving: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("approving"))? - }, - multisig: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("multisig"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for NewMultisig { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NewMultisig { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewMultisig { approving, multisig, call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("approving"), - approving as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("multisig"), - multisig as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for NewMultisig { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewMultisig { approving, multisig, call_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("approving"), - approving as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("multisig"), - multisig as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NewMultisig { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "NewMultisig", - "approving", - &self.approving, - "multisig", - &self.multisig, - "call_hash", - &&self.call_hash, - ) - } - } - impl ::subxt::events::StaticEvent for NewMultisig { - const PALLET: &'static str = "Multisig"; - const EVENT: &'static str = "NewMultisig"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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], - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MultisigApproval { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MultisigApproval { - approving: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultisigApproval::approving`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - timepoint: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultisigApproval::timepoint`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - multisig: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultisigApproval::multisig`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultisigApproval::call_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MultisigApproval { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.approving), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.timepoint), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.multisig), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call_hash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.approving, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.timepoint, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.multisig, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call_hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MultisigApproval {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MultisigApproval { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MultisigApproval; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MultisigApproval { - approving: { - let val = *vals - .get(&Some("approving")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "approving".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("approving"))? - }, - timepoint: { - let val = *vals - .get(&Some("timepoint")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "timepoint".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("timepoint"))? - }, - multisig: { - let val = *vals - .get(&Some("multisig")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "multisig".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("multisig"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(MultisigApproval { - approving: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("approving"))? - }, - timepoint: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("timepoint"))? - }, - multisig: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("multisig"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for MultisigApproval { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MultisigApproval { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultisigApproval { - approving, - timepoint, - multisig, - call_hash, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("approving"), - approving as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("timepoint"), - timepoint as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("multisig"), - multisig as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MultisigApproval { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultisigApproval { - approving, - timepoint, - multisig, - call_hash, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("approving"), - approving as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("timepoint"), - timepoint as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("multisig"), - multisig as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MultisigApproval { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "MultisigApproval", - "approving", - &self.approving, - "timepoint", - &self.timepoint, - "multisig", - &self.multisig, - "call_hash", - &&self.call_hash, - ) - } - } - impl ::subxt::events::StaticEvent for MultisigApproval { - const PALLET: &'static str = "Multisig"; - const EVENT: &'static str = "MultisigApproval"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MultisigExecuted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MultisigExecuted { - approving: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultisigExecuted::approving`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - timepoint: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultisigExecuted::timepoint`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - multisig: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultisigExecuted::multisig`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultisigExecuted::call_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultisigExecuted::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MultisigExecuted { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.approving), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.timepoint), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.multisig), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.result), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.approving, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.timepoint, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.multisig, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.result, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MultisigExecuted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MultisigExecuted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MultisigExecuted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MultisigExecuted { - approving: { - let val = *vals - .get(&Some("approving")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "approving".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("approving"))? - }, - timepoint: { - let val = *vals - .get(&Some("timepoint")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "timepoint".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("timepoint"))? - }, - multisig: { - let val = *vals - .get(&Some("multisig")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "multisig".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("multisig"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(MultisigExecuted { - approving: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("approving"))? - }, - timepoint: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("timepoint"))? - }, - multisig: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("multisig"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for MultisigExecuted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MultisigExecuted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultisigExecuted { - approving, - timepoint, - multisig, - call_hash, - result, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("approving"), - approving as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("timepoint"), - timepoint as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("multisig"), - multisig as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MultisigExecuted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultisigExecuted { - approving, - timepoint, - multisig, - call_hash, - result, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("approving"), - approving as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("timepoint"), - timepoint as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("multisig"), - multisig as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MultisigExecuted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "MultisigExecuted", - "approving", - &self.approving, - "timepoint", - &self.timepoint, - "multisig", - &self.multisig, - "call_hash", - &self.call_hash, - "result", - &&self.result, - ) - } - } - impl ::subxt::events::StaticEvent for MultisigExecuted { - const PALLET: &'static str = "Multisig"; - const EVENT: &'static str = "MultisigExecuted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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], - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MultisigCancelled { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MultisigCancelled { - cancelling: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultisigCancelled::cancelling`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - timepoint: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultisigCancelled::timepoint`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - multisig: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultisigCancelled::multisig`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultisigCancelled::call_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MultisigCancelled { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.cancelling), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.timepoint), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.multisig), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call_hash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.cancelling, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.timepoint, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.multisig, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call_hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MultisigCancelled {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MultisigCancelled { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MultisigCancelled; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MultisigCancelled { - cancelling: { - let val = *vals - .get(&Some("cancelling")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "cancelling".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("cancelling"))? - }, - timepoint: { - let val = *vals - .get(&Some("timepoint")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "timepoint".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("timepoint"))? - }, - multisig: { - let val = *vals - .get(&Some("multisig")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "multisig".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("multisig"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(MultisigCancelled { - cancelling: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("cancelling"))? - }, - timepoint: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("timepoint"))? - }, - multisig: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("multisig"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for MultisigCancelled { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MultisigCancelled { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultisigCancelled { - cancelling, - timepoint, - multisig, - call_hash, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("cancelling"), - cancelling as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("timepoint"), - timepoint as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("multisig"), - multisig as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MultisigCancelled { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultisigCancelled { - cancelling, - timepoint, - multisig, - call_hash, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("cancelling"), - cancelling as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("timepoint"), - timepoint as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("multisig"), - multisig as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MultisigCancelled { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "MultisigCancelled", - "cancelling", - &self.cancelling, - "timepoint", - &self.timepoint, - "multisig", - &self.multisig, - "call_hash", - &&self.call_hash, - ) - } - } - 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 { - pub fn multisigs_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_multisig::Multisig< - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::utils::AccountId32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Multisig", - "Multisigs", - ::alloc::vec::Vec::new(), - [ - 154u8, - 109u8, - 45u8, - 18u8, - 155u8, - 151u8, - 81u8, - 28u8, - 86u8, - 127u8, - 189u8, - 151u8, - 49u8, - 61u8, - 12u8, - 149u8, - 84u8, - 61u8, - 110u8, - 197u8, - 200u8, - 140u8, - 37u8, - 100u8, - 14u8, - 162u8, - 158u8, - 161u8, - 48u8, - 117u8, - 102u8, - 61u8, - ], - ) - } - pub fn multisigs_iter1( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_multisig::Multisig< - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::utils::AccountId32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Multisig", - "Multisigs", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 154u8, - 109u8, - 45u8, - 18u8, - 155u8, - 151u8, - 81u8, - 28u8, - 86u8, - 127u8, - 189u8, - 151u8, - 49u8, - 61u8, - 12u8, - 149u8, - 84u8, - 61u8, - 110u8, - 197u8, - 200u8, - 140u8, - 37u8, - 100u8, - 14u8, - 162u8, - 158u8, - 161u8, - 48u8, - 117u8, - 102u8, - 61u8, - ], - ) - } - pub fn multisigs( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _1: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_multisig::Multisig< - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::utils::AccountId32, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Multisig", - "Multisigs", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 154u8, - 109u8, - 45u8, - 18u8, - 155u8, - 151u8, - 81u8, - 28u8, - 86u8, - 127u8, - 189u8, - 151u8, - 49u8, - 61u8, - 12u8, - 149u8, - 84u8, - 61u8, - 110u8, - 197u8, - 200u8, - 140u8, - 37u8, - 100u8, - 14u8, - 162u8, - 158u8, - 161u8, - 48u8, - 117u8, - 102u8, - 61u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn deposit_base( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Multisig", - "DepositBase", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn deposit_factor( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Multisig", - "DepositFactor", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn max_signatories( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Multisig", - "MaxSignatories", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod bounties { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_bounties::pallet::Error; - pub type Call = runtime_types::pallet_bounties::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProposeBounty { - #[codec(compact)] - pub value: ::core::primitive::u128, - pub description: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ProposeBounty { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ProposeBounty { - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProposeBounty::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - description: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProposeBounty::description`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ProposeBounty { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.description), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.description, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ProposeBounty {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ProposeBounty { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ProposeBounty; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ProposeBounty { - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - description: { - let val = *vals - .get(&Some("description")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "description".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("description"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ProposeBounty { - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - description: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("description"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ProposeBounty { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ProposeBounty { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProposeBounty { value, description } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("description"), - description as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ProposeBounty { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProposeBounty { value, description } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("description"), - description as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ProposeBounty { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ProposeBounty", - "value", - &self.value, - "description", - &&self.description, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ProposeBounty { - const PALLET: &'static str = "Bounties"; - const CALL: &'static str = "propose_bounty"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ApproveBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ApproveBounty { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ApproveBounty { - bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ApproveBounty::bounty_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ApproveBounty { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ApproveBounty {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ApproveBounty { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ApproveBounty; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ApproveBounty { - bounty_id: { - let val = *vals - .get(&Some("bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bounty_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ApproveBounty { - bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ApproveBounty { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ApproveBounty { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ApproveBounty { bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ApproveBounty { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ApproveBounty { bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ApproveBounty { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ApproveBounty", - "bounty_id", - &&self.bounty_id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ApproveBounty { - const PALLET: &'static str = "Bounties"; - const CALL: &'static str = "approve_bounty"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProposeCurator { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - pub curator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - #[codec(compact)] - pub fee: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ProposeCurator { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ProposeCurator { - bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProposeCurator::bounty_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - curator: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProposeCurator::curator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fee: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProposeCurator::fee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ProposeCurator { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.curator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.fee), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.curator, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.fee), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ProposeCurator {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ProposeCurator { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ProposeCurator; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ProposeCurator { - bounty_id: { - let val = *vals - .get(&Some("bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bounty_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - curator: { - let val = *vals - .get(&Some("curator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "curator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - fee: { - let val = *vals - .get(&Some("fee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(ProposeCurator { - bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - curator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - fee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ProposeCurator { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ProposeCurator { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProposeCurator { bounty_id, curator, fee } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("curator"), - curator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee"), - fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ProposeCurator { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProposeCurator { bounty_id, curator, fee } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("curator"), - curator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee"), - fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ProposeCurator { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ProposeCurator", - "bounty_id", - &self.bounty_id, - "curator", - &self.curator, - "fee", - &&self.fee, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ProposeCurator { - const PALLET: &'static str = "Bounties"; - const CALL: &'static str = "propose_curator"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnassignCurator { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for UnassignCurator { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(UnassignCurator { - bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnassignCurator::bounty_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for UnassignCurator { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for UnassignCurator {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for UnassignCurator { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UnassignCurator; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(UnassignCurator { - bounty_id: { - let val = *vals - .get(&Some("bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bounty_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(UnassignCurator { - bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for UnassignCurator { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for UnassignCurator { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnassignCurator { bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for UnassignCurator { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnassignCurator { bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for UnassignCurator { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "UnassignCurator", - "bounty_id", - &&self.bounty_id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for UnassignCurator { - const PALLET: &'static str = "Bounties"; - const CALL: &'static str = "unassign_curator"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AcceptCurator { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AcceptCurator { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AcceptCurator { - bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AcceptCurator::bounty_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AcceptCurator { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AcceptCurator {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AcceptCurator { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AcceptCurator; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AcceptCurator { - bounty_id: { - let val = *vals - .get(&Some("bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bounty_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(AcceptCurator { - bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for AcceptCurator { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AcceptCurator { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AcceptCurator { bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AcceptCurator { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AcceptCurator { bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AcceptCurator { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "AcceptCurator", - "bounty_id", - &&self.bounty_id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for AcceptCurator { - const PALLET: &'static str = "Bounties"; - const CALL: &'static str = "accept_curator"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AwardBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AwardBounty { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AwardBounty { - bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AwardBounty::bounty_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AwardBounty::beneficiary`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AwardBounty { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.beneficiary), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.beneficiary, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AwardBounty {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AwardBounty { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AwardBounty; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AwardBounty { - bounty_id: { - let val = *vals - .get(&Some("bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bounty_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(AwardBounty { - bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for AwardBounty { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AwardBounty { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AwardBounty { bounty_id, beneficiary } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AwardBounty { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AwardBounty { bounty_id, beneficiary } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AwardBounty { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AwardBounty", - "bounty_id", - &self.bounty_id, - "beneficiary", - &&self.beneficiary, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for AwardBounty { - const PALLET: &'static str = "Bounties"; - const CALL: &'static str = "award_bounty"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ClaimBounty { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ClaimBounty { - bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ClaimBounty::bounty_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ClaimBounty { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ClaimBounty {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ClaimBounty { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ClaimBounty; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ClaimBounty { - bounty_id: { - let val = *vals - .get(&Some("bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bounty_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ClaimBounty { - bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ClaimBounty { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ClaimBounty { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClaimBounty { bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ClaimBounty { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClaimBounty { bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ClaimBounty { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ClaimBounty", - "bounty_id", - &&self.bounty_id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ClaimBounty { - const PALLET: &'static str = "Bounties"; - const CALL: &'static str = "claim_bounty"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CloseBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CloseBounty { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CloseBounty { - bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CloseBounty::bounty_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CloseBounty { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CloseBounty {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CloseBounty { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CloseBounty; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CloseBounty { - bounty_id: { - let val = *vals - .get(&Some("bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bounty_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(CloseBounty { - bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for CloseBounty { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CloseBounty { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CloseBounty { bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CloseBounty { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CloseBounty { bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CloseBounty { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "CloseBounty", - "bounty_id", - &&self.bounty_id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for CloseBounty { - const PALLET: &'static str = "Bounties"; - const CALL: &'static str = "close_bounty"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ExtendBountyExpiry { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - pub remark: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ExtendBountyExpiry { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ExtendBountyExpiry { - bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ExtendBountyExpiry::bounty_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - remark: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ExtendBountyExpiry::remark`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ExtendBountyExpiry { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.remark), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.bounty_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.remark, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ExtendBountyExpiry {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ExtendBountyExpiry { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ExtendBountyExpiry; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ExtendBountyExpiry { - bounty_id: { - let val = *vals - .get(&Some("bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bounty_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - remark: { - let val = *vals - .get(&Some("remark")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "remark".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("remark"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ExtendBountyExpiry { - bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - remark: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("remark"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ExtendBountyExpiry { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ExtendBountyExpiry { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExtendBountyExpiry { bounty_id, remark } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("remark"), - remark as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ExtendBountyExpiry { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExtendBountyExpiry { bounty_id, remark } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("remark"), - remark as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ExtendBountyExpiry { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ExtendBountyExpiry", - "bounty_id", - &self.bounty_id, - "remark", - &&self.remark, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ExtendBountyExpiry { - const PALLET: &'static str = "Bounties"; - const CALL: &'static str = "extend_bounty_expiry"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn propose_bounty( - &self, - value: ::core::primitive::u128, - description: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "propose_bounty", - types::ProposeBounty { - value, - description, - }, - [ - 131u8, - 169u8, - 55u8, - 102u8, - 212u8, - 139u8, - 9u8, - 65u8, - 75u8, - 112u8, - 6u8, - 180u8, - 92u8, - 124u8, - 43u8, - 42u8, - 38u8, - 40u8, - 226u8, - 24u8, - 28u8, - 34u8, - 169u8, - 220u8, - 184u8, - 206u8, - 109u8, - 227u8, - 53u8, - 228u8, - 88u8, - 25u8, - ], - ) - } - pub fn approve_bounty( - &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "approve_bounty", - types::ApproveBounty { bounty_id }, - [ - 85u8, - 12u8, - 177u8, - 91u8, - 183u8, - 124u8, - 175u8, - 148u8, - 188u8, - 200u8, - 237u8, - 144u8, - 6u8, - 67u8, - 159u8, - 48u8, - 177u8, - 222u8, - 183u8, - 137u8, - 173u8, - 131u8, - 128u8, - 219u8, - 255u8, - 243u8, - 80u8, - 224u8, - 126u8, - 136u8, - 90u8, - 47u8, - ], - ) - } - pub fn propose_curator( - &self, - bounty_id: ::core::primitive::u32, - curator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - fee: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "propose_curator", - types::ProposeCurator { - bounty_id, - curator, - fee, - }, - [ - 238u8, - 102u8, - 86u8, - 97u8, - 169u8, - 16u8, - 133u8, - 41u8, - 24u8, - 247u8, - 149u8, - 200u8, - 95u8, - 213u8, - 45u8, - 62u8, - 41u8, - 247u8, - 170u8, - 62u8, - 211u8, - 194u8, - 5u8, - 108u8, - 129u8, - 145u8, - 108u8, - 67u8, - 84u8, - 97u8, - 237u8, - 54u8, - ], - ) - } - pub fn unassign_curator( - &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "unassign_curator", - types::UnassignCurator { - bounty_id, - }, - [ - 98u8, - 94u8, - 107u8, - 111u8, - 151u8, - 182u8, - 71u8, - 239u8, - 214u8, - 88u8, - 108u8, - 11u8, - 51u8, - 163u8, - 102u8, - 162u8, - 245u8, - 247u8, - 244u8, - 159u8, - 197u8, - 23u8, - 171u8, - 6u8, - 60u8, - 146u8, - 144u8, - 101u8, - 68u8, - 133u8, - 245u8, - 74u8, - ], - ) - } - pub fn accept_curator( - &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "accept_curator", - types::AcceptCurator { bounty_id }, - [ - 178u8, - 142u8, - 138u8, - 15u8, - 243u8, - 10u8, - 222u8, - 169u8, - 150u8, - 200u8, - 85u8, - 185u8, - 39u8, - 167u8, - 134u8, - 3u8, - 186u8, - 84u8, - 43u8, - 140u8, - 11u8, - 70u8, - 56u8, - 197u8, - 39u8, - 84u8, - 138u8, - 139u8, - 198u8, - 104u8, - 41u8, - 238u8, - ], - ) - } - pub fn award_bounty( - &self, - bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "award_bounty", - types::AwardBounty { - bounty_id, - beneficiary, - }, - [ - 231u8, - 248u8, - 65u8, - 2u8, - 199u8, - 19u8, - 126u8, - 23u8, - 206u8, - 206u8, - 230u8, - 77u8, - 53u8, - 152u8, - 230u8, - 234u8, - 211u8, - 153u8, - 82u8, - 149u8, - 93u8, - 91u8, - 19u8, - 72u8, - 214u8, - 92u8, - 65u8, - 207u8, - 142u8, - 168u8, - 133u8, - 87u8, - ], - ) - } - pub fn claim_bounty( - &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "claim_bounty", - types::ClaimBounty { bounty_id }, - [ - 211u8, - 143u8, - 123u8, - 205u8, - 140u8, - 43u8, - 176u8, - 103u8, - 110u8, - 125u8, - 158u8, - 131u8, - 103u8, - 62u8, - 69u8, - 215u8, - 220u8, - 110u8, - 11u8, - 3u8, - 30u8, - 193u8, - 235u8, - 177u8, - 96u8, - 241u8, - 140u8, - 53u8, - 62u8, - 133u8, - 170u8, - 25u8, - ], - ) - } - pub fn close_bounty( - &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "close_bounty", - types::CloseBounty { bounty_id }, - [ - 144u8, - 234u8, - 109u8, - 39u8, - 227u8, - 231u8, - 104u8, - 48u8, - 45u8, - 196u8, - 217u8, - 220u8, - 241u8, - 197u8, - 157u8, - 227u8, - 154u8, - 156u8, - 181u8, - 69u8, - 146u8, - 77u8, - 203u8, - 167u8, - 79u8, - 102u8, - 15u8, - 253u8, - 135u8, - 53u8, - 96u8, - 60u8, - ], - ) - } - pub fn extend_bounty_expiry( - &self, - bounty_id: ::core::primitive::u32, - remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "extend_bounty_expiry", - types::ExtendBountyExpiry { - bounty_id, - remark, - }, - [ - 102u8, - 118u8, - 89u8, - 189u8, - 138u8, - 157u8, - 216u8, - 10u8, - 239u8, - 3u8, - 200u8, - 217u8, - 219u8, - 19u8, - 195u8, - 182u8, - 105u8, - 220u8, - 11u8, - 146u8, - 222u8, - 79u8, - 95u8, - 136u8, - 188u8, - 230u8, - 248u8, - 119u8, - 30u8, - 6u8, - 242u8, - 194u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_bounties::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BountyProposed { - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for BountyProposed { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - BountyProposed, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(BountyProposed { index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for BountyProposed { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> BountyProposed { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BountyProposed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BountyProposed { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BountyProposed::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BountyProposed { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BountyProposed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BountyProposed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BountyProposed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BountyProposed { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(BountyProposed { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for BountyProposed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BountyProposed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BountyProposed { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BountyProposed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BountyProposed { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BountyProposed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "BountyProposed", - "index", - &&self.index, - ) - } - } - impl ::subxt::events::StaticEvent for BountyProposed { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyProposed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BountyRejected { - pub index: ::core::primitive::u32, - pub bond: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BountyRejected { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BountyRejected { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BountyRejected::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - bond: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BountyRejected::bond`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BountyRejected { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.bond), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.bond, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BountyRejected {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BountyRejected { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BountyRejected; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BountyRejected { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - bond: { - let val = *vals - .get(&Some("bond")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bond".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bond"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(BountyRejected { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - bond: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bond"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for BountyRejected { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BountyRejected { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BountyRejected { index, bond } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bond"), - bond as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BountyRejected { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BountyRejected { index, bond } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bond"), - bond as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BountyRejected { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "BountyRejected", - "index", - &self.index, - "bond", - &&self.bond, - ) - } - } - impl ::subxt::events::StaticEvent for BountyRejected { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyRejected"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BountyBecameActive { - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for BountyBecameActive { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - BountyBecameActive, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(BountyBecameActive { index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for BountyBecameActive { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> BountyBecameActive { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BountyBecameActive { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BountyBecameActive { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BountyBecameActive::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BountyBecameActive { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BountyBecameActive {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BountyBecameActive { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BountyBecameActive; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BountyBecameActive { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(BountyBecameActive { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for BountyBecameActive { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BountyBecameActive { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BountyBecameActive { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BountyBecameActive { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BountyBecameActive { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BountyBecameActive { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "BountyBecameActive", - "index", - &&self.index, - ) - } - } - impl ::subxt::events::StaticEvent for BountyBecameActive { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyBecameActive"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BountyAwarded { - pub index: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BountyAwarded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BountyAwarded { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BountyAwarded::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BountyAwarded::beneficiary`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BountyAwarded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.beneficiary), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.beneficiary, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BountyAwarded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BountyAwarded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BountyAwarded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BountyAwarded { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(BountyAwarded { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for BountyAwarded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BountyAwarded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BountyAwarded { index, beneficiary } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BountyAwarded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BountyAwarded { index, beneficiary } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BountyAwarded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "BountyAwarded", - "index", - &self.index, - "beneficiary", - &&self.beneficiary, - ) - } - } - impl ::subxt::events::StaticEvent for BountyAwarded { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyAwarded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BountyClaimed { - pub index: ::core::primitive::u32, - pub payout: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BountyClaimed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BountyClaimed { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BountyClaimed::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - payout: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BountyClaimed::payout`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BountyClaimed::beneficiary`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BountyClaimed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.payout), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.beneficiary), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.payout, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.beneficiary, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BountyClaimed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BountyClaimed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BountyClaimed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BountyClaimed { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - payout: { - let val = *vals - .get(&Some("payout")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "payout".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(BountyClaimed { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - payout: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for BountyClaimed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BountyClaimed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BountyClaimed { index, payout, beneficiary } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("payout"), - payout as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BountyClaimed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BountyClaimed { index, payout, beneficiary } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("payout"), - payout as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BountyClaimed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "BountyClaimed", - "index", - &self.index, - "payout", - &self.payout, - "beneficiary", - &&self.beneficiary, - ) - } - } - impl ::subxt::events::StaticEvent for BountyClaimed { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyClaimed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BountyCanceled { - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for BountyCanceled { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - BountyCanceled, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(BountyCanceled { index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for BountyCanceled { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> BountyCanceled { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BountyCanceled { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BountyCanceled { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BountyCanceled::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BountyCanceled { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BountyCanceled {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BountyCanceled { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BountyCanceled; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BountyCanceled { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(BountyCanceled { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for BountyCanceled { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BountyCanceled { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BountyCanceled { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BountyCanceled { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BountyCanceled { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BountyCanceled { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "BountyCanceled", - "index", - &&self.index, - ) - } - } - impl ::subxt::events::StaticEvent for BountyCanceled { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyCanceled"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BountyExtended { - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for BountyExtended { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - BountyExtended, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(BountyExtended { index: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for BountyExtended { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> BountyExtended { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BountyExtended { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BountyExtended { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BountyExtended::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BountyExtended { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BountyExtended {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BountyExtended { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BountyExtended; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BountyExtended { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(BountyExtended { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for BountyExtended { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BountyExtended { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BountyExtended { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BountyExtended { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BountyExtended { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BountyExtended { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "BountyExtended", - "index", - &&self.index, - ) - } - } - 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 { - pub fn bounty_count( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Bounties", - "BountyCount", - ::alloc::vec::Vec::new(), - [ - 120u8, - 204u8, - 26u8, - 150u8, - 37u8, - 81u8, - 43u8, - 223u8, - 180u8, - 252u8, - 142u8, - 144u8, - 109u8, - 5u8, - 184u8, - 72u8, - 223u8, - 230u8, - 66u8, - 196u8, - 14u8, - 14u8, - 164u8, - 190u8, - 246u8, - 168u8, - 190u8, - 56u8, - 212u8, - 73u8, - 175u8, - 26u8, - ], - ) - } - pub fn bounties_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 183u8, - 96u8, - 172u8, - 86u8, - 167u8, - 129u8, - 51u8, - 179u8, - 238u8, - 155u8, - 196u8, - 77u8, - 158u8, - 102u8, - 188u8, - 19u8, - 79u8, - 178u8, - 145u8, - 189u8, - 44u8, - 117u8, - 47u8, - 97u8, - 30u8, - 149u8, - 239u8, - 212u8, - 167u8, - 127u8, - 108u8, - 55u8, - ], - ) - } - 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::Address::new_static( - "Bounties", - "Bounties", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 183u8, - 96u8, - 172u8, - 86u8, - 167u8, - 129u8, - 51u8, - 179u8, - 238u8, - 155u8, - 196u8, - 77u8, - 158u8, - 102u8, - 188u8, - 19u8, - 79u8, - 178u8, - 145u8, - 189u8, - 44u8, - 117u8, - 47u8, - 97u8, - 30u8, - 149u8, - 239u8, - 212u8, - 167u8, - 127u8, - 108u8, - 55u8, - ], - ) - } - pub fn bounty_descriptions_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Bounties", - "BountyDescriptions", - ::alloc::vec::Vec::new(), - [ - 71u8, - 40u8, - 133u8, - 84u8, - 55u8, - 207u8, - 169u8, - 189u8, - 160u8, - 51u8, - 202u8, - 144u8, - 15u8, - 226u8, - 97u8, - 114u8, - 54u8, - 247u8, - 53u8, - 26u8, - 36u8, - 54u8, - 186u8, - 163u8, - 198u8, - 100u8, - 191u8, - 121u8, - 186u8, - 160u8, - 85u8, - 97u8, - ], - ) - } - pub fn bounty_descriptions( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Bounties", - "BountyDescriptions", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 71u8, - 40u8, - 133u8, - 84u8, - 55u8, - 207u8, - 169u8, - 189u8, - 160u8, - 51u8, - 202u8, - 144u8, - 15u8, - 226u8, - 97u8, - 114u8, - 54u8, - 247u8, - 53u8, - 26u8, - 36u8, - 54u8, - 186u8, - 163u8, - 198u8, - 100u8, - 191u8, - 121u8, - 186u8, - 160u8, - 85u8, - 97u8, - ], - ) - } - pub fn bounty_approvals( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Bounties", - "BountyApprovals", - ::alloc::vec::Vec::new(), - [ - 182u8, - 228u8, - 0u8, - 46u8, - 176u8, - 25u8, - 222u8, - 180u8, - 51u8, - 57u8, - 14u8, - 0u8, - 69u8, - 160u8, - 64u8, - 27u8, - 88u8, - 29u8, - 227u8, - 146u8, - 2u8, - 121u8, - 27u8, - 85u8, - 45u8, - 110u8, - 244u8, - 62u8, - 134u8, - 77u8, - 175u8, - 188u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn bounty_deposit_base( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Bounties", - "BountyDepositBase", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn bounty_deposit_payout_delay( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Bounties", - "BountyDepositPayoutDelay", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn bounty_update_period( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Bounties", - "BountyUpdatePeriod", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn curator_deposit_multiplier( - &self, - ) -> ::subxt::constants::Address< - runtime_types::sp_arithmetic::per_things::Permill, - > { - ::subxt::constants::Address::new_static( - "Bounties", - "CuratorDepositMultiplier", - [ - 65u8, - 93u8, - 120u8, - 165u8, - 204u8, - 81u8, - 159u8, - 163u8, - 93u8, - 135u8, - 114u8, - 121u8, - 147u8, - 35u8, - 215u8, - 213u8, - 4u8, - 223u8, - 83u8, - 37u8, - 225u8, - 200u8, - 189u8, - 156u8, - 140u8, - 36u8, - 58u8, - 46u8, - 42u8, - 232u8, - 155u8, - 0u8, - ], - ) - } - pub fn curator_deposit_max( - &self, - ) -> ::subxt::constants::Address< - ::core::option::Option<::core::primitive::u128>, - > { - ::subxt::constants::Address::new_static( - "Bounties", - "CuratorDepositMax", - [ - 198u8, - 51u8, - 89u8, - 159u8, - 124u8, - 251u8, - 51u8, - 80u8, - 167u8, - 193u8, - 44u8, - 199u8, - 80u8, - 36u8, - 41u8, - 130u8, - 137u8, - 229u8, - 178u8, - 208u8, - 37u8, - 215u8, - 169u8, - 183u8, - 180u8, - 191u8, - 140u8, - 240u8, - 250u8, - 61u8, - 42u8, - 147u8, - ], - ) - } - pub fn curator_deposit_min( - &self, - ) -> ::subxt::constants::Address< - ::core::option::Option<::core::primitive::u128>, - > { - ::subxt::constants::Address::new_static( - "Bounties", - "CuratorDepositMin", - [ - 198u8, - 51u8, - 89u8, - 159u8, - 124u8, - 251u8, - 51u8, - 80u8, - 167u8, - 193u8, - 44u8, - 199u8, - 80u8, - 36u8, - 41u8, - 130u8, - 137u8, - 229u8, - 178u8, - 208u8, - 37u8, - 215u8, - 169u8, - 183u8, - 180u8, - 191u8, - 140u8, - 240u8, - 250u8, - 61u8, - 42u8, - 147u8, - ], - ) - } - pub fn bounty_value_minimum( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Bounties", - "BountyValueMinimum", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn data_deposit_per_byte( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Bounties", - "DataDepositPerByte", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn maximum_reason_length( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Bounties", - "MaximumReasonLength", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod child_bounties { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_child_bounties::pallet::Error; - pub type Call = runtime_types::pallet_child_bounties::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddChildBounty { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub value: ::core::primitive::u128, - pub description: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AddChildBounty { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AddChildBounty { - parent_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `AddChildBounty::parent_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AddChildBounty::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - description: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AddChildBounty::description`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AddChildBounty { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.parent_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.description), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.parent_bounty_id), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.description, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AddChildBounty {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AddChildBounty { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AddChildBounty; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AddChildBounty { - parent_bounty_id: { - let val = *vals - .get(&Some("parent_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parent_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - description: { - let val = *vals - .get(&Some("description")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "description".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("description"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(AddChildBounty { - parent_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - description: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("description"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for AddChildBounty { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AddChildBounty { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddChildBounty { - parent_bounty_id, - value, - description, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("description"), - description as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AddChildBounty { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddChildBounty { - parent_bounty_id, - value, - description, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("description"), - description as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AddChildBounty { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "AddChildBounty", - "parent_bounty_id", - &self.parent_bounty_id, - "value", - &self.value, - "description", - &&self.description, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for AddChildBounty { - const PALLET: &'static str = "ChildBounties"; - const CALL: &'static str = "add_child_bounty"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProposeCurator { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, - pub curator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - #[codec(compact)] - pub fee: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ProposeCurator { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ProposeCurator { - parent_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ProposeCurator::parent_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - child_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `ProposeCurator::child_bounty_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - curator: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProposeCurator::curator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fee: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProposeCurator::fee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ProposeCurator { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.parent_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.child_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.curator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.fee), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.parent_bounty_id), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.child_bounty_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.curator, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.fee), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ProposeCurator {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ProposeCurator { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ProposeCurator; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ProposeCurator { - parent_bounty_id: { - let val = *vals - .get(&Some("parent_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parent_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = *vals - .get(&Some("child_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - curator: { - let val = *vals - .get(&Some("curator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "curator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - fee: { - let val = *vals - .get(&Some("fee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(ProposeCurator { - parent_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - curator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - fee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ProposeCurator { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ProposeCurator { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProposeCurator { - parent_bounty_id, - child_bounty_id, - curator, - fee, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("curator"), - curator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee"), - fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ProposeCurator { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProposeCurator { - parent_bounty_id, - child_bounty_id, - curator, - fee, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("curator"), - curator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee"), - fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ProposeCurator { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "ProposeCurator", - "parent_bounty_id", - &self.parent_bounty_id, - "child_bounty_id", - &self.child_bounty_id, - "curator", - &self.curator, - "fee", - &&self.fee, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ProposeCurator { - const PALLET: &'static str = "ChildBounties"; - const CALL: &'static str = "propose_curator"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AcceptCurator { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AcceptCurator { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AcceptCurator { - parent_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `AcceptCurator::parent_bounty_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - child_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AcceptCurator::child_bounty_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AcceptCurator { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.parent_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.child_bounty_id), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.parent_bounty_id), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.child_bounty_id), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AcceptCurator {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AcceptCurator { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AcceptCurator; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AcceptCurator { - parent_bounty_id: { - let val = *vals - .get(&Some("parent_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parent_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = *vals - .get(&Some("child_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(AcceptCurator { - parent_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for AcceptCurator { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AcceptCurator { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AcceptCurator { parent_bounty_id, child_bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AcceptCurator { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AcceptCurator { parent_bounty_id, child_bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AcceptCurator { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AcceptCurator", - "parent_bounty_id", - &self.parent_bounty_id, - "child_bounty_id", - &&self.child_bounty_id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for AcceptCurator { - const PALLET: &'static str = "ChildBounties"; - const CALL: &'static str = "accept_curator"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnassignCurator { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for UnassignCurator { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(UnassignCurator { - parent_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `UnassignCurator::parent_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - child_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `UnassignCurator::child_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for UnassignCurator { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.parent_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.child_bounty_id), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.parent_bounty_id), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.child_bounty_id), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for UnassignCurator {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for UnassignCurator { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UnassignCurator; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(UnassignCurator { - parent_bounty_id: { - let val = *vals - .get(&Some("parent_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parent_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = *vals - .get(&Some("child_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(UnassignCurator { - parent_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for UnassignCurator { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for UnassignCurator { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnassignCurator { parent_bounty_id, child_bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for UnassignCurator { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnassignCurator { parent_bounty_id, child_bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for UnassignCurator { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "UnassignCurator", - "parent_bounty_id", - &self.parent_bounty_id, - "child_bounty_id", - &&self.child_bounty_id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for UnassignCurator { - const PALLET: &'static str = "ChildBounties"; - const CALL: &'static str = "unassign_curator"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AwardChildBounty { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AwardChildBounty { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AwardChildBounty { - parent_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `AwardChildBounty::parent_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - child_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `AwardChildBounty::child_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AwardChildBounty::beneficiary`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AwardChildBounty { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.parent_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.child_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.beneficiary), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.parent_bounty_id), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.child_bounty_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.beneficiary, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AwardChildBounty {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for AwardChildBounty { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AwardChildBounty; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AwardChildBounty { - parent_bounty_id: { - let val = *vals - .get(&Some("parent_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parent_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = *vals - .get(&Some("child_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(AwardChildBounty { - parent_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for AwardChildBounty { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AwardChildBounty { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AwardChildBounty { - parent_bounty_id, - child_bounty_id, - beneficiary, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for AwardChildBounty { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AwardChildBounty { - parent_bounty_id, - child_bounty_id, - beneficiary, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AwardChildBounty { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "AwardChildBounty", - "parent_bounty_id", - &self.parent_bounty_id, - "child_bounty_id", - &self.child_bounty_id, - "beneficiary", - &&self.beneficiary, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for AwardChildBounty { - const PALLET: &'static str = "ChildBounties"; - const CALL: &'static str = "award_child_bounty"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimChildBounty { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ClaimChildBounty { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ClaimChildBounty { - parent_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ClaimChildBounty::parent_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - child_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ClaimChildBounty::child_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ClaimChildBounty { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.parent_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.child_bounty_id), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.parent_bounty_id), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.child_bounty_id), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ClaimChildBounty {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ClaimChildBounty { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ClaimChildBounty; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ClaimChildBounty { - parent_bounty_id: { - let val = *vals - .get(&Some("parent_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parent_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = *vals - .get(&Some("child_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ClaimChildBounty { - parent_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ClaimChildBounty { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ClaimChildBounty { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClaimChildBounty { parent_bounty_id, child_bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ClaimChildBounty { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClaimChildBounty { parent_bounty_id, child_bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ClaimChildBounty { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ClaimChildBounty", - "parent_bounty_id", - &self.parent_bounty_id, - "child_bounty_id", - &&self.child_bounty_id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ClaimChildBounty { - const PALLET: &'static str = "ChildBounties"; - const CALL: &'static str = "claim_child_bounty"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CloseChildBounty { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CloseChildBounty { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CloseChildBounty { - parent_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CloseChildBounty::parent_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - child_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CloseChildBounty::child_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CloseChildBounty { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.parent_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.child_bounty_id), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.parent_bounty_id), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.child_bounty_id), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CloseChildBounty {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for CloseChildBounty { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CloseChildBounty; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CloseChildBounty { - parent_bounty_id: { - let val = *vals - .get(&Some("parent_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parent_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = *vals - .get(&Some("child_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(CloseChildBounty { - parent_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CloseChildBounty { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CloseChildBounty { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CloseChildBounty { parent_bounty_id, child_bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for CloseChildBounty { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CloseChildBounty { parent_bounty_id, child_bounty_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CloseChildBounty { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "CloseChildBounty", - "parent_bounty_id", - &self.parent_bounty_id, - "child_bounty_id", - &&self.child_bounty_id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for CloseChildBounty { - const PALLET: &'static str = "ChildBounties"; - const CALL: &'static str = "close_child_bounty"; - } - } - pub struct TransactionApi; - impl TransactionApi { - 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", - types::AddChildBounty { - parent_bounty_id, - value, - description, - }, - [ - 249u8, - 159u8, - 185u8, - 144u8, - 114u8, - 142u8, - 104u8, - 215u8, - 136u8, - 52u8, - 255u8, - 125u8, - 54u8, - 243u8, - 220u8, - 171u8, - 254u8, - 49u8, - 105u8, - 134u8, - 137u8, - 221u8, - 100u8, - 111u8, - 72u8, - 38u8, - 184u8, - 122u8, - 72u8, - 204u8, - 182u8, - 123u8, - ], - ) - } - 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::Payload { - ::subxt::tx::Payload::new_static( - "ChildBounties", - "propose_curator", - types::ProposeCurator { - parent_bounty_id, - child_bounty_id, - curator, - fee, - }, - [ - 30u8, - 186u8, - 200u8, - 181u8, - 73u8, - 219u8, - 129u8, - 195u8, - 100u8, - 30u8, - 36u8, - 9u8, - 131u8, - 110u8, - 136u8, - 145u8, - 146u8, - 44u8, - 96u8, - 207u8, - 74u8, - 59u8, - 61u8, - 94u8, - 186u8, - 184u8, - 89u8, - 170u8, - 126u8, - 64u8, - 234u8, - 177u8, - ], - ) - } - 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", - types::AcceptCurator { - parent_bounty_id, - child_bounty_id, - }, - [ - 80u8, - 117u8, - 237u8, - 83u8, - 230u8, - 230u8, - 159u8, - 136u8, - 87u8, - 17u8, - 239u8, - 110u8, - 190u8, - 12u8, - 52u8, - 63u8, - 171u8, - 118u8, - 82u8, - 168u8, - 190u8, - 255u8, - 91u8, - 85u8, - 117u8, - 226u8, - 51u8, - 28u8, - 116u8, - 230u8, - 137u8, - 123u8, - ], - ) - } - 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", - types::UnassignCurator { - parent_bounty_id, - child_bounty_id, - }, - [ - 120u8, - 208u8, - 75u8, - 141u8, - 220u8, - 153u8, - 79u8, - 28u8, - 255u8, - 227u8, - 239u8, - 10u8, - 243u8, - 116u8, - 0u8, - 226u8, - 205u8, - 208u8, - 91u8, - 193u8, - 154u8, - 81u8, - 169u8, - 240u8, - 120u8, - 48u8, - 102u8, - 35u8, - 25u8, - 136u8, - 92u8, - 141u8, - ], - ) - } - 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, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ChildBounties", - "award_child_bounty", - types::AwardChildBounty { - parent_bounty_id, - child_bounty_id, - beneficiary, - }, - [ - 45u8, - 172u8, - 88u8, - 8u8, - 142u8, - 34u8, - 30u8, - 132u8, - 61u8, - 31u8, - 187u8, - 174u8, - 21u8, - 5u8, - 248u8, - 185u8, - 142u8, - 193u8, - 29u8, - 83u8, - 225u8, - 213u8, - 153u8, - 247u8, - 67u8, - 219u8, - 58u8, - 206u8, - 102u8, - 55u8, - 218u8, - 154u8, - ], - ) - } - 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", - types::ClaimChildBounty { - parent_bounty_id, - child_bounty_id, - }, - [ - 114u8, - 134u8, - 242u8, - 240u8, - 103u8, - 141u8, - 181u8, - 214u8, - 193u8, - 222u8, - 23u8, - 19u8, - 68u8, - 174u8, - 190u8, - 60u8, - 94u8, - 235u8, - 14u8, - 115u8, - 155u8, - 199u8, - 0u8, - 106u8, - 37u8, - 144u8, - 92u8, - 188u8, - 2u8, - 149u8, - 235u8, - 244u8, - ], - ) - } - 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", - types::CloseChildBounty { - parent_bounty_id, - child_bounty_id, - }, - [ - 121u8, - 20u8, - 81u8, - 13u8, - 102u8, - 102u8, - 162u8, - 24u8, - 133u8, - 35u8, - 203u8, - 58u8, - 28u8, - 195u8, - 114u8, - 31u8, - 254u8, - 252u8, - 118u8, - 57u8, - 30u8, - 211u8, - 217u8, - 124u8, - 148u8, - 244u8, - 144u8, - 224u8, - 39u8, - 155u8, - 162u8, - 91u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_child_bounties::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Added { - pub index: ::core::primitive::u32, - pub child_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Added { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Added { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Added::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - child_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Added::child_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Added { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.child_index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.child_index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Added {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Added { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Added; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Added { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - child_index: { - let val = *vals - .get(&Some("child_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("child_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Added { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - child_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("child_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Added { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Added { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Added { index, child_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_index"), - child_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Added { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Added { index, child_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_index"), - child_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Added { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Added", - "index", - &self.index, - "child_index", - &&self.child_index, - ) - } - } - impl ::subxt::events::StaticEvent for Added { - const PALLET: &'static str = "ChildBounties"; - const EVENT: &'static str = "Added"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Awarded { - pub index: ::core::primitive::u32, - pub child_index: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Awarded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Awarded { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Awarded::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - child_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Awarded::child_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Awarded::beneficiary`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Awarded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.child_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.beneficiary), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.child_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.beneficiary, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Awarded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Awarded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Awarded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Awarded { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - child_index: { - let val = *vals - .get(&Some("child_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("child_index"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Awarded { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - child_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("child_index"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Awarded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Awarded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Awarded { index, child_index, beneficiary } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_index"), - child_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Awarded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Awarded { index, child_index, beneficiary } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_index"), - child_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Awarded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Awarded", - "index", - &self.index, - "child_index", - &self.child_index, - "beneficiary", - &&self.beneficiary, - ) - } - } - impl ::subxt::events::StaticEvent for Awarded { - const PALLET: &'static str = "ChildBounties"; - const EVENT: &'static str = "Awarded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Claimed { - pub index: ::core::primitive::u32, - pub child_index: ::core::primitive::u32, - pub payout: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Claimed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Claimed { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Claimed::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - child_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Claimed::child_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - payout: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Claimed::payout`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Claimed::beneficiary`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Claimed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.child_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.payout), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.beneficiary), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.child_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.payout, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.beneficiary, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Claimed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Claimed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Claimed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Claimed { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - child_index: { - let val = *vals - .get(&Some("child_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("child_index"))? - }, - payout: { - let val = *vals - .get(&Some("payout")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "payout".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(Claimed { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - child_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("child_index"))? - }, - payout: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Claimed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Claimed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Claimed { index, child_index, payout, beneficiary } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_index"), - child_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("payout"), - payout as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Claimed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Claimed { index, child_index, payout, beneficiary } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_index"), - child_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("payout"), - payout as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Claimed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Claimed", - "index", - &self.index, - "child_index", - &self.child_index, - "payout", - &self.payout, - "beneficiary", - &&self.beneficiary, - ) - } - } - impl ::subxt::events::StaticEvent for Claimed { - const PALLET: &'static str = "ChildBounties"; - const EVENT: &'static str = "Claimed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Canceled { - pub index: ::core::primitive::u32, - pub child_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Canceled { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Canceled { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Canceled::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - child_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Canceled::child_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Canceled { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.child_index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.child_index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Canceled {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Canceled { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Canceled; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Canceled { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - child_index: { - let val = *vals - .get(&Some("child_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("child_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Canceled { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - child_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("child_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Canceled { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Canceled { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Canceled { index, child_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_index"), - child_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Canceled { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Canceled { index, child_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_index"), - child_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Canceled { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Canceled", - "index", - &self.index, - "child_index", - &&self.child_index, - ) - } - } - 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 { - pub fn child_bounty_count( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ChildBounties", - "ChildBountyCount", - ::alloc::vec::Vec::new(), - [ - 206u8, - 1u8, - 40u8, - 132u8, - 51u8, - 139u8, - 234u8, - 20u8, - 89u8, - 86u8, - 247u8, - 107u8, - 169u8, - 252u8, - 5u8, - 180u8, - 218u8, - 24u8, - 232u8, - 94u8, - 82u8, - 135u8, - 24u8, - 16u8, - 134u8, - 23u8, - 201u8, - 86u8, - 12u8, - 19u8, - 199u8, - 0u8, - ], - ) - } - pub fn parent_child_bounties_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 52u8, - 179u8, - 242u8, - 212u8, - 91u8, - 185u8, - 176u8, - 52u8, - 100u8, - 200u8, - 1u8, - 41u8, - 184u8, - 234u8, - 234u8, - 8u8, - 123u8, - 252u8, - 131u8, - 55u8, - 109u8, - 123u8, - 89u8, - 75u8, - 101u8, - 165u8, - 117u8, - 175u8, - 92u8, - 71u8, - 62u8, - 67u8, - ], - ) - } - 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::Address::new_static( - "ChildBounties", - "ParentChildBounties", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 52u8, - 179u8, - 242u8, - 212u8, - 91u8, - 185u8, - 176u8, - 52u8, - 100u8, - 200u8, - 1u8, - 41u8, - 184u8, - 234u8, - 234u8, - 8u8, - 123u8, - 252u8, - 131u8, - 55u8, - 109u8, - 123u8, - 89u8, - 75u8, - 101u8, - 165u8, - 117u8, - 175u8, - 92u8, - 71u8, - 62u8, - 67u8, - ], - ) - } - pub fn child_bounties_iter( - &self, - ) -> ::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::Address::new_static( - "ChildBounties", - "ChildBounties", - ::alloc::vec::Vec::new(), - [ - 165u8, - 240u8, - 158u8, - 204u8, - 183u8, - 190u8, - 129u8, - 65u8, - 226u8, - 8u8, - 182u8, - 103u8, - 46u8, - 162u8, - 35u8, - 155u8, - 131u8, - 45u8, - 163u8, - 64u8, - 154u8, - 137u8, - 126u8, - 249u8, - 238u8, - 156u8, - 233u8, - 78u8, - 28u8, - 95u8, - 242u8, - 147u8, - ], - ) - } - pub fn child_bounties_iter1( - &self, - _0: 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::Address::new_static( - "ChildBounties", - "ChildBounties", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 165u8, - 240u8, - 158u8, - 204u8, - 183u8, - 190u8, - 129u8, - 65u8, - 226u8, - 8u8, - 182u8, - 103u8, - 46u8, - 162u8, - 35u8, - 155u8, - 131u8, - 45u8, - 163u8, - 64u8, - 154u8, - 137u8, - 126u8, - 249u8, - 238u8, - 156u8, - 233u8, - 78u8, - 28u8, - 95u8, - 242u8, - 147u8, - ], - ) - } - 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::Address::new_static( - "ChildBounties", - "ChildBounties", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 165u8, - 240u8, - 158u8, - 204u8, - 183u8, - 190u8, - 129u8, - 65u8, - 226u8, - 8u8, - 182u8, - 103u8, - 46u8, - 162u8, - 35u8, - 155u8, - 131u8, - 45u8, - 163u8, - 64u8, - 154u8, - 137u8, - 126u8, - 249u8, - 238u8, - 156u8, - 233u8, - 78u8, - 28u8, - 95u8, - 242u8, - 147u8, - ], - ) - } - pub fn child_bounty_descriptions_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ChildBounties", - "ChildBountyDescriptions", - ::alloc::vec::Vec::new(), - [ - 192u8, - 0u8, - 220u8, - 156u8, - 109u8, - 65u8, - 113u8, - 102u8, - 119u8, - 0u8, - 109u8, - 141u8, - 211u8, - 128u8, - 237u8, - 61u8, - 28u8, - 56u8, - 206u8, - 93u8, - 183u8, - 74u8, - 192u8, - 220u8, - 76u8, - 175u8, - 85u8, - 105u8, - 179u8, - 11u8, - 164u8, - 100u8, - ], - ) - } - pub fn child_bounty_descriptions( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ChildBounties", - "ChildBountyDescriptions", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 192u8, - 0u8, - 220u8, - 156u8, - 109u8, - 65u8, - 113u8, - 102u8, - 119u8, - 0u8, - 109u8, - 141u8, - 211u8, - 128u8, - 237u8, - 61u8, - 28u8, - 56u8, - 206u8, - 93u8, - 183u8, - 74u8, - 192u8, - 220u8, - 76u8, - 175u8, - 85u8, - 105u8, - 179u8, - 11u8, - 164u8, - 100u8, - ], - ) - } - pub fn children_curator_fees_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 32u8, - 16u8, - 190u8, - 193u8, - 6u8, - 80u8, - 163u8, - 16u8, - 85u8, - 111u8, - 39u8, - 141u8, - 209u8, - 70u8, - 213u8, - 167u8, - 22u8, - 12u8, - 93u8, - 17u8, - 104u8, - 94u8, - 129u8, - 37u8, - 179u8, - 41u8, - 156u8, - 117u8, - 39u8, - 202u8, - 227u8, - 235u8, - ], - ) - } - 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::Address::new_static( - "ChildBounties", - "ChildrenCuratorFees", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 32u8, - 16u8, - 190u8, - 193u8, - 6u8, - 80u8, - 163u8, - 16u8, - 85u8, - 111u8, - 39u8, - 141u8, - 209u8, - 70u8, - 213u8, - 167u8, - 22u8, - 12u8, - 93u8, - 17u8, - 104u8, - 94u8, - 129u8, - 37u8, - 179u8, - 41u8, - 156u8, - 117u8, - 39u8, - 202u8, - 227u8, - 235u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn max_active_child_bounty_count( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "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, - ], - ) - } - pub fn child_bounty_value_minimum( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "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 { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_tips::pallet::Error; - pub type Call = runtime_types::pallet_tips::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReportAwesome { - pub reason: ::std::vec::Vec<::core::primitive::u8>, - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ReportAwesome { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ReportAwesome { - reason: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReportAwesome::reason`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReportAwesome::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ReportAwesome { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.reason), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.reason, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ReportAwesome {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ReportAwesome { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReportAwesome; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ReportAwesome { - reason: { - let val = *vals - .get(&Some("reason")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reason".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reason"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ReportAwesome { - reason: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reason"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ReportAwesome { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ReportAwesome { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReportAwesome { reason, who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reason"), - reason as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ReportAwesome { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReportAwesome { reason, who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reason"), - reason as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ReportAwesome { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ReportAwesome", - "reason", - &self.reason, - "who", - &&self.who, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ReportAwesome { - const PALLET: &'static str = "Tips"; - const CALL: &'static str = "report_awesome"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RetractTip { - pub hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RetractTip { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RetractTip { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RetractTip::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RetractTip { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.hash, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RetractTip {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RetractTip { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RetractTip; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RetractTip { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(RetractTip { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for RetractTip { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RetractTip { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RetractTip { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RetractTip { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RetractTip { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RetractTip { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "RetractTip", - "hash", - &&self.hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RetractTip { - const PALLET: &'static str = "Tips"; - const CALL: &'static str = "retract_tip"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TipNew { - pub reason: ::std::vec::Vec<::core::primitive::u8>, - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - #[codec(compact)] - pub tip_value: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for TipNew { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(TipNew { - reason: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TipNew::reason`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TipNew::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tip_value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TipNew::tip_value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for TipNew { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.reason), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.tip_value), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.reason, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.tip_value), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for TipNew {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for TipNew { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = TipNew; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(TipNew { - reason: { - let val = *vals - .get(&Some("reason")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reason".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reason"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - tip_value: { - let val = *vals - .get(&Some("tip_value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tip_value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tip_value"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(TipNew { - reason: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reason"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - tip_value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tip_value"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for TipNew { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for TipNew { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TipNew { reason, who, tip_value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reason"), - reason as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tip_value"), - tip_value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for TipNew { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TipNew { reason, who, tip_value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reason"), - reason as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tip_value"), - tip_value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for TipNew { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "TipNew", - "reason", - &self.reason, - "who", - &self.who, - "tip_value", - &&self.tip_value, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for TipNew { - const PALLET: &'static str = "Tips"; - const CALL: &'static str = "tip_new"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Tip { - pub hash: ::subxt::utils::H256, - #[codec(compact)] - pub tip_value: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Tip { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Tip { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Tip::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tip_value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Tip::tip_value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Tip { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.tip_value), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.hash, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.tip_value), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Tip {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Tip { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Tip; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Tip { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - tip_value: { - let val = *vals - .get(&Some("tip_value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tip_value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tip_value"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Tip { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - tip_value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tip_value"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Tip { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Tip { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Tip { hash, tip_value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tip_value"), - tip_value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Tip { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Tip { hash, tip_value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tip_value"), - tip_value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Tip { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Tip", - "hash", - &self.hash, - "tip_value", - &&self.tip_value, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Tip { - const PALLET: &'static str = "Tips"; - const CALL: &'static str = "tip"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CloseTip { - pub hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CloseTip { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CloseTip { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CloseTip::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CloseTip { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.hash, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CloseTip {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CloseTip { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CloseTip; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CloseTip { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(CloseTip { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for CloseTip { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CloseTip { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CloseTip { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CloseTip { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CloseTip { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CloseTip { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "CloseTip", - "hash", - &&self.hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for CloseTip { - const PALLET: &'static str = "Tips"; - const CALL: &'static str = "close_tip"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SlashTip { - pub hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SlashTip { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SlashTip { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SlashTip::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SlashTip { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.hash, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SlashTip {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SlashTip { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SlashTip; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SlashTip { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SlashTip { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SlashTip { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SlashTip { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SlashTip { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SlashTip { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SlashTip { hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SlashTip { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SlashTip", - "hash", - &&self.hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SlashTip { - const PALLET: &'static str = "Tips"; - const CALL: &'static str = "slash_tip"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn report_awesome( - &self, - reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Tips", - "report_awesome", - types::ReportAwesome { - reason, - who, - }, - [ - 184u8, - 245u8, - 162u8, - 155u8, - 89u8, - 108u8, - 138u8, - 43u8, - 1u8, - 178u8, - 186u8, - 173u8, - 193u8, - 197u8, - 201u8, - 118u8, - 3u8, - 154u8, - 224u8, - 6u8, - 162u8, - 6u8, - 74u8, - 153u8, - 90u8, - 215u8, - 52u8, - 254u8, - 114u8, - 184u8, - 39u8, - 123u8, - ], - ) - } - pub fn retract_tip( - &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Tips", - "retract_tip", - types::RetractTip { hash }, - [ - 127u8, - 232u8, - 112u8, - 136u8, - 48u8, - 227u8, - 202u8, - 51u8, - 78u8, - 191u8, - 248u8, - 44u8, - 159u8, - 76u8, - 101u8, - 107u8, - 212u8, - 55u8, - 85u8, - 250u8, - 222u8, - 181u8, - 58u8, - 130u8, - 53u8, - 103u8, - 190u8, - 31u8, - 113u8, - 195u8, - 186u8, - 44u8, - ], - ) - } - pub fn tip_new( - &self, - reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - tip_value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Tips", - "tip_new", - types::TipNew { - reason, - who, - tip_value, - }, - [ - 4u8, - 118u8, - 48u8, - 220u8, - 210u8, - 247u8, - 11u8, - 205u8, - 114u8, - 31u8, - 237u8, - 252u8, - 172u8, - 228u8, - 209u8, - 0u8, - 0u8, - 33u8, - 188u8, - 86u8, - 151u8, - 206u8, - 59u8, - 13u8, - 230u8, - 4u8, - 90u8, - 242u8, - 145u8, - 216u8, - 133u8, - 85u8, - ], - ) - } - pub fn tip( - &self, - hash: ::subxt::utils::H256, - tip_value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Tips", - "tip", - types::Tip { hash, tip_value }, - [ - 241u8, - 5u8, - 164u8, - 248u8, - 140u8, - 60u8, - 29u8, - 9u8, - 63u8, - 208u8, - 249u8, - 210u8, - 221u8, - 173u8, - 70u8, - 240u8, - 50u8, - 131u8, - 80u8, - 236u8, - 131u8, - 101u8, - 191u8, - 49u8, - 94u8, - 216u8, - 74u8, - 234u8, - 184u8, - 167u8, - 159u8, - 176u8, - ], - ) - } - pub fn close_tip( - &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Tips", - "close_tip", - types::CloseTip { hash }, - [ - 85u8, - 213u8, - 248u8, - 146u8, - 90u8, - 110u8, - 217u8, - 109u8, - 78u8, - 6u8, - 104u8, - 71u8, - 184u8, - 209u8, - 148u8, - 81u8, - 145u8, - 71u8, - 151u8, - 174u8, - 25u8, - 238u8, - 48u8, - 0u8, - 51u8, - 102u8, - 155u8, - 143u8, - 130u8, - 157u8, - 100u8, - 246u8, - ], - ) - } - pub fn slash_tip( - &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Tips", - "slash_tip", - types::SlashTip { hash }, - [ - 127u8, - 21u8, - 252u8, - 189u8, - 121u8, - 103u8, - 54u8, - 155u8, - 71u8, - 81u8, - 109u8, - 0u8, - 159u8, - 151u8, - 62u8, - 81u8, - 104u8, - 31u8, - 2u8, - 83u8, - 248u8, - 141u8, - 252u8, - 162u8, - 173u8, - 189u8, - 252u8, - 249u8, - 54u8, - 142u8, - 108u8, - 19u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_tips::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NewTip { - pub tip_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NewTip { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(NewTip { - tip_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NewTip::tip_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NewTip { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.tip_hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.tip_hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.tip_hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.tip_hash, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NewTip {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for NewTip { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NewTip; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(NewTip { - tip_hash: { - let val = *vals - .get(&Some("tip_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tip_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(NewTip { - tip_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for NewTip { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NewTip { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewTip { tip_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("tip_hash"), - tip_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for NewTip { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewTip { tip_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("tip_hash"), - tip_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NewTip { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "NewTip", - "tip_hash", - &&self.tip_hash, - ) - } - } - impl ::subxt::events::StaticEvent for NewTip { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "NewTip"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TipClosing { - pub tip_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for TipClosing { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(TipClosing { - tip_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TipClosing::tip_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for TipClosing { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.tip_hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.tip_hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.tip_hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.tip_hash, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for TipClosing {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for TipClosing { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = TipClosing; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(TipClosing { - tip_hash: { - let val = *vals - .get(&Some("tip_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tip_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(TipClosing { - tip_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for TipClosing { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for TipClosing { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TipClosing { tip_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("tip_hash"), - tip_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for TipClosing { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TipClosing { tip_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("tip_hash"), - tip_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for TipClosing { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "TipClosing", - "tip_hash", - &&self.tip_hash, - ) - } - } - impl ::subxt::events::StaticEvent for TipClosing { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipClosing"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TipClosed { - pub tip_hash: ::subxt::utils::H256, - pub who: ::subxt::utils::AccountId32, - pub payout: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for TipClosed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(TipClosed { - tip_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TipClosed::tip_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TipClosed::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - payout: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TipClosed::payout`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for TipClosed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.tip_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.payout), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.tip_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.payout, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for TipClosed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for TipClosed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = TipClosed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(TipClosed { - tip_hash: { - let val = *vals - .get(&Some("tip_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tip_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - payout: { - let val = *vals - .get(&Some("payout")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "payout".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(TipClosed { - tip_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - payout: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for TipClosed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for TipClosed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TipClosed { tip_hash, who, payout } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("tip_hash"), - tip_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("payout"), - payout as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for TipClosed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TipClosed { tip_hash, who, payout } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("tip_hash"), - tip_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("payout"), - payout as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for TipClosed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "TipClosed", - "tip_hash", - &self.tip_hash, - "who", - &self.who, - "payout", - &&self.payout, - ) - } - } - impl ::subxt::events::StaticEvent for TipClosed { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipClosed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TipRetracted { - pub tip_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for TipRetracted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(TipRetracted { - tip_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TipRetracted::tip_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for TipRetracted { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.tip_hash) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.tip_hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.tip_hash) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.tip_hash, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for TipRetracted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for TipRetracted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = TipRetracted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(TipRetracted { - tip_hash: { - let val = *vals - .get(&Some("tip_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tip_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(TipRetracted { - tip_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for TipRetracted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for TipRetracted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TipRetracted { tip_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("tip_hash"), - tip_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for TipRetracted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TipRetracted { tip_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("tip_hash"), - tip_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for TipRetracted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "TipRetracted", - "tip_hash", - &&self.tip_hash, - ) - } - } - impl ::subxt::events::StaticEvent for TipRetracted { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipRetracted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TipSlashed { - pub tip_hash: ::subxt::utils::H256, - pub finder: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for TipSlashed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(TipSlashed { - tip_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TipSlashed::tip_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - finder: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TipSlashed::finder`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TipSlashed::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for TipSlashed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.tip_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.finder), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deposit), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.tip_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.finder, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deposit, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for TipSlashed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for TipSlashed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = TipSlashed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(TipSlashed { - tip_hash: { - let val = *vals - .get(&Some("tip_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tip_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - finder: { - let val = *vals - .get(&Some("finder")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "finder".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("finder"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(TipSlashed { - tip_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - finder: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("finder"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for TipSlashed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for TipSlashed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TipSlashed { tip_hash, finder, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("tip_hash"), - tip_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("finder"), - finder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for TipSlashed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TipSlashed { tip_hash, finder, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("tip_hash"), - tip_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("finder"), - finder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for TipSlashed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "TipSlashed", - "tip_hash", - &self.tip_hash, - "finder", - &self.finder, - "deposit", - &&self.deposit, - ) - } - } - impl ::subxt::events::StaticEvent for TipSlashed { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipSlashed"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn tips_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_tips::OpenTip< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - ::subxt::utils::H256, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Tips", - "Tips", - ::alloc::vec::Vec::new(), - [ - 25u8, - 31u8, - 187u8, - 85u8, - 122u8, - 104u8, - 176u8, - 120u8, - 135u8, - 32u8, - 135u8, - 148u8, - 193u8, - 43u8, - 143u8, - 235u8, - 82u8, - 96u8, - 162u8, - 200u8, - 125u8, - 117u8, - 170u8, - 70u8, - 47u8, - 248u8, - 153u8, - 70u8, - 22u8, - 194u8, - 31u8, - 150u8, - ], - ) - } - pub fn tips( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_tips::OpenTip< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - ::subxt::utils::H256, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Tips", - "Tips", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 25u8, - 31u8, - 187u8, - 85u8, - 122u8, - 104u8, - 176u8, - 120u8, - 135u8, - 32u8, - 135u8, - 148u8, - 193u8, - 43u8, - 143u8, - 235u8, - 82u8, - 96u8, - 162u8, - 200u8, - 125u8, - 117u8, - 170u8, - 70u8, - 47u8, - 248u8, - 153u8, - 70u8, - 22u8, - 194u8, - 31u8, - 150u8, - ], - ) - } - pub fn reasons_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::core::primitive::u8>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Tips", - "Reasons", - ::alloc::vec::Vec::new(), - [ - 99u8, - 184u8, - 64u8, - 230u8, - 54u8, - 162u8, - 73u8, - 188u8, - 49u8, - 219u8, - 170u8, - 2u8, - 72u8, - 75u8, - 239u8, - 136u8, - 114u8, - 93u8, - 94u8, - 195u8, - 229u8, - 55u8, - 188u8, - 121u8, - 214u8, - 250u8, - 115u8, - 61u8, - 221u8, - 173u8, - 14u8, - 68u8, - ], - ) - } - pub fn reasons( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec<::core::primitive::u8>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Tips", - "Reasons", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 99u8, - 184u8, - 64u8, - 230u8, - 54u8, - 162u8, - 73u8, - 188u8, - 49u8, - 219u8, - 170u8, - 2u8, - 72u8, - 75u8, - 239u8, - 136u8, - 114u8, - 93u8, - 94u8, - 195u8, - 229u8, - 55u8, - 188u8, - 121u8, - 214u8, - 250u8, - 115u8, - 61u8, - 221u8, - 173u8, - 14u8, - 68u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn maximum_reason_length( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Tips", - "MaximumReasonLength", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn data_deposit_per_byte( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Tips", - "DataDepositPerByte", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn tip_countdown( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "Tips", - "TipCountdown", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn tip_finders_fee( - &self, - ) -> ::subxt::constants::Address< - runtime_types::sp_arithmetic::per_things::Percent, - > { - ::subxt::constants::Address::new_static( - "Tips", - "TipFindersFee", - [ - 40u8, - 171u8, - 69u8, - 196u8, - 34u8, - 184u8, - 50u8, - 128u8, - 139u8, - 192u8, - 63u8, - 231u8, - 249u8, - 200u8, - 252u8, - 73u8, - 244u8, - 170u8, - 51u8, - 177u8, - 106u8, - 47u8, - 114u8, - 234u8, - 84u8, - 104u8, - 62u8, - 118u8, - 227u8, - 50u8, - 225u8, - 122u8, - ], - ) - } - pub fn tip_report_deposit_base( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "Tips", - "TipReportDepositBase", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - } - } - } - pub mod election_provider_multi_phase { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_election_provider_multi_phase::pallet::Error; - pub type Call = runtime_types::pallet_election_provider_multi_phase::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SubmitUnsigned { - pub raw_solution: ::std::boxed::Box< - runtime_types::pallet_election_provider_multi_phase::RawSolution< - runtime_types::polkadot_runtime::NposCompactSolution16, - >, - >, - pub witness: runtime_types::pallet_election_provider_multi_phase::SolutionOrSnapshotSize, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SubmitUnsigned { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SubmitUnsigned { - raw_solution: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::pallet_election_provider_multi_phase::RawSolution< - runtime_types::polkadot_runtime::NposCompactSolution16, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SubmitUnsigned::raw_solution`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - witness: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SubmitUnsigned::witness`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SubmitUnsigned { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.raw_solution), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.witness), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.raw_solution, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.witness, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SubmitUnsigned {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SubmitUnsigned { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SubmitUnsigned; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SubmitUnsigned { - raw_solution: { - let val = *vals - .get(&Some("raw_solution")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "raw_solution".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("raw_solution"))? - }, - witness: { - let val = *vals - .get(&Some("witness")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "witness".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("witness"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SubmitUnsigned { - raw_solution: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("raw_solution"))? - }, - witness: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("witness"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SubmitUnsigned { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SubmitUnsigned { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SubmitUnsigned { raw_solution, witness } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("raw_solution"), - raw_solution - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("witness"), - witness as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SubmitUnsigned { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SubmitUnsigned { raw_solution, witness } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("raw_solution"), - raw_solution - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("witness"), - witness as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SubmitUnsigned { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SubmitUnsigned", - "raw_solution", - &self.raw_solution, - "witness", - &&self.witness, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SubmitUnsigned { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const CALL: &'static str = "submit_unsigned"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMinimumUntrustedScore { - pub maybe_next_score: ::core::option::Option< - runtime_types::sp_npos_elections::ElectionScore, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetMinimumUntrustedScore { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMinimumUntrustedScore { - maybe_next_score: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::sp_npos_elections::ElectionScore, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetMinimumUntrustedScore::maybe_next_score`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetMinimumUntrustedScore { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &&self.maybe_next_score, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.maybe_next_score, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.maybe_next_score) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.maybe_next_score, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetMinimumUntrustedScore {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetMinimumUntrustedScore { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMinimumUntrustedScore; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMinimumUntrustedScore { - maybe_next_score: { - let val = *vals - .get(&Some("maybe_next_score")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_next_score".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_next_score"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetMinimumUntrustedScore { - maybe_next_score: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_next_score"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetMinimumUntrustedScore { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetMinimumUntrustedScore { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMinimumUntrustedScore { maybe_next_score } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("maybe_next_score"), - maybe_next_score - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetMinimumUntrustedScore { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMinimumUntrustedScore { maybe_next_score } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("maybe_next_score"), - maybe_next_score - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMinimumUntrustedScore { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetMinimumUntrustedScore", - "maybe_next_score", - &&self.maybe_next_score, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetMinimumUntrustedScore { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const CALL: &'static str = "set_minimum_untrusted_score"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetEmergencyElectionResult { - pub supports: ::std::vec::Vec< - ( - ::subxt::utils::AccountId32, - runtime_types::sp_npos_elections::Support< - ::subxt::utils::AccountId32, - >, - ), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetEmergencyElectionResult { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetEmergencyElectionResult { - supports: { - let __codec_res_edqy = <::std::vec::Vec< - ( - ::subxt::utils::AccountId32, - runtime_types::sp_npos_elections::Support< - ::subxt::utils::AccountId32, - >, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetEmergencyElectionResult::supports`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetEmergencyElectionResult { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.supports) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.supports, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.supports) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.supports, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetEmergencyElectionResult {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetEmergencyElectionResult { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetEmergencyElectionResult; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetEmergencyElectionResult { - supports: { - let val = *vals - .get(&Some("supports")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "supports".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("supports"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetEmergencyElectionResult { - supports: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("supports"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetEmergencyElectionResult { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetEmergencyElectionResult { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetEmergencyElectionResult { supports } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("supports"), - supports as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetEmergencyElectionResult { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetEmergencyElectionResult { supports } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("supports"), - supports as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetEmergencyElectionResult { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetEmergencyElectionResult", - "supports", - &&self.supports, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for SetEmergencyElectionResult { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const CALL: &'static str = "set_emergency_election_result"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Submit { - pub raw_solution: ::std::boxed::Box< - runtime_types::pallet_election_provider_multi_phase::RawSolution< - runtime_types::polkadot_runtime::NposCompactSolution16, - >, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Submit { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Submit { - raw_solution: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::pallet_election_provider_multi_phase::RawSolution< - runtime_types::polkadot_runtime::NposCompactSolution16, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Submit::raw_solution`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Submit { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.raw_solution) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.raw_solution, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.raw_solution) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.raw_solution, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Submit {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Submit { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Submit; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Submit { - raw_solution: { - let val = *vals - .get(&Some("raw_solution")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "raw_solution".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("raw_solution"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Submit { - raw_solution: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("raw_solution"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Submit { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Submit { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Submit { raw_solution } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("raw_solution"), - raw_solution - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Submit { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Submit { raw_solution } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("raw_solution"), - raw_solution - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Submit { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Submit", - "raw_solution", - &&self.raw_solution, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Submit { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const CALL: &'static str = "submit"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct GovernanceFallback { - pub maybe_max_voters: ::core::option::Option< - ::core::primitive::u32, - >, - pub maybe_max_targets: ::core::option::Option< - ::core::primitive::u32, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for GovernanceFallback { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(GovernanceFallback { - maybe_max_voters: { - let __codec_res_edqy = <::core::option::Option< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `GovernanceFallback::maybe_max_voters`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_max_targets: { - let __codec_res_edqy = <::core::option::Option< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `GovernanceFallback::maybe_max_targets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for GovernanceFallback { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.maybe_max_voters, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.maybe_max_targets, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.maybe_max_voters, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.maybe_max_targets, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for GovernanceFallback {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for GovernanceFallback { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = GovernanceFallback; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(GovernanceFallback { - maybe_max_voters: { - let val = *vals - .get(&Some("maybe_max_voters")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_max_voters".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_max_voters"))? - }, - maybe_max_targets: { - let val = *vals - .get(&Some("maybe_max_targets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_max_targets".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_max_targets"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(GovernanceFallback { - maybe_max_voters: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_max_voters"))? - }, - maybe_max_targets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_max_targets"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for GovernanceFallback { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for GovernanceFallback { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let GovernanceFallback { - maybe_max_voters, - maybe_max_targets, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("maybe_max_voters"), - maybe_max_voters - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_max_targets"), - maybe_max_targets - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for GovernanceFallback { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let GovernanceFallback { - maybe_max_voters, - maybe_max_targets, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("maybe_max_voters"), - maybe_max_voters - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_max_targets"), - maybe_max_targets - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for GovernanceFallback { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "GovernanceFallback", - "maybe_max_voters", - &self.maybe_max_voters, - "maybe_max_targets", - &&self.maybe_max_targets, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for GovernanceFallback { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const CALL: &'static str = "governance_fallback"; - } - } - pub struct TransactionApi; - impl TransactionApi { - 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::Payload { - ::subxt::tx::Payload::new_static( - "ElectionProviderMultiPhase", - "submit_unsigned", - types::SubmitUnsigned { - raw_solution: ::std::boxed::Box::new(raw_solution), - witness, - }, - [ - 237u8, - 199u8, - 102u8, - 43u8, - 103u8, - 215u8, - 145u8, - 93u8, - 71u8, - 191u8, - 61u8, - 144u8, - 21u8, - 58u8, - 30u8, - 51u8, - 190u8, - 219u8, - 45u8, - 66u8, - 216u8, - 19u8, - 62u8, - 123u8, - 197u8, - 53u8, - 249u8, - 205u8, - 117u8, - 35u8, - 32u8, - 13u8, - ], - ) - } - 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", - types::SetMinimumUntrustedScore { - maybe_next_score, - }, - [ - 244u8, - 246u8, - 85u8, - 56u8, - 156u8, - 145u8, - 169u8, - 106u8, - 16u8, - 206u8, - 102u8, - 216u8, - 150u8, - 180u8, - 87u8, - 153u8, - 75u8, - 177u8, - 185u8, - 55u8, - 37u8, - 252u8, - 214u8, - 127u8, - 103u8, - 169u8, - 198u8, - 55u8, - 10u8, - 179u8, - 121u8, - 219u8, - ], - ) - } - 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", - types::SetEmergencyElectionResult { - supports, - }, - [ - 6u8, - 170u8, - 228u8, - 255u8, - 61u8, - 131u8, - 137u8, - 36u8, - 135u8, - 91u8, - 183u8, - 94u8, - 172u8, - 205u8, - 113u8, - 69u8, - 191u8, - 255u8, - 223u8, - 152u8, - 255u8, - 160u8, - 205u8, - 51u8, - 140u8, - 183u8, - 101u8, - 38u8, - 185u8, - 100u8, - 92u8, - 87u8, - ], - ) - } - pub fn submit( - &self, - raw_solution: runtime_types::pallet_election_provider_multi_phase::RawSolution< - runtime_types::polkadot_runtime::NposCompactSolution16, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ElectionProviderMultiPhase", - "submit", - types::Submit { - raw_solution: ::std::boxed::Box::new(raw_solution), - }, - [ - 55u8, - 254u8, - 53u8, - 183u8, - 136u8, - 93u8, - 56u8, - 39u8, - 98u8, - 132u8, - 8u8, - 38u8, - 92u8, - 38u8, - 199u8, - 43u8, - 20u8, - 86u8, - 114u8, - 240u8, - 31u8, - 72u8, - 141u8, - 39u8, - 73u8, - 116u8, - 250u8, - 249u8, - 119u8, - 36u8, - 244u8, - 137u8, - ], - ) - } - 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", - types::GovernanceFallback { - maybe_max_voters, - maybe_max_targets, - }, - [ - 10u8, - 56u8, - 159u8, - 48u8, - 56u8, - 246u8, - 49u8, - 9u8, - 132u8, - 156u8, - 86u8, - 162u8, - 52u8, - 58u8, - 175u8, - 128u8, - 12u8, - 185u8, - 203u8, - 18u8, - 99u8, - 219u8, - 75u8, - 13u8, - 52u8, - 40u8, - 125u8, - 212u8, - 84u8, - 147u8, - 222u8, - 17u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_election_provider_multi_phase::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SolutionStored { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(SolutionStored { - compute: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SolutionStored::compute`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - origin: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SolutionStored::origin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - prev_ejected: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SolutionStored::prev_ejected`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SolutionStored { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.compute), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.prev_ejected), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.compute, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.prev_ejected, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SolutionStored {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SolutionStored { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SolutionStored; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SolutionStored { - compute: { - let val = *vals - .get(&Some("compute")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "compute".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("compute"))? - }, - origin: { - let val = *vals - .get(&Some("origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "origin".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - prev_ejected: { - let val = *vals - .get(&Some("prev_ejected")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prev_ejected".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("prev_ejected"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(SolutionStored { - compute: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("compute"))? - }, - origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - prev_ejected: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("prev_ejected"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SolutionStored { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SolutionStored { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SolutionStored { compute, origin, prev_ejected } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("compute"), - compute as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prev_ejected"), - prev_ejected - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SolutionStored { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SolutionStored { compute, origin, prev_ejected } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("compute"), - compute as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prev_ejected"), - prev_ejected - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SolutionStored { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SolutionStored", - "compute", - &self.compute, - "origin", - &self.origin, - "prev_ejected", - &&self.prev_ejected, - ) - } - } - impl ::subxt::events::StaticEvent for SolutionStored { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "SolutionStored"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ElectionFinalized { - pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, - pub score: runtime_types::sp_npos_elections::ElectionScore, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ElectionFinalized { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ElectionFinalized { - compute: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ElectionFinalized::compute`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - score: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ElectionFinalized::score`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ElectionFinalized { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.compute), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.score), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.compute, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.score, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ElectionFinalized {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ElectionFinalized { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ElectionFinalized; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ElectionFinalized { - compute: { - let val = *vals - .get(&Some("compute")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "compute".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("compute"))? - }, - score: { - let val = *vals - .get(&Some("score")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "score".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("score"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ElectionFinalized { - compute: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("compute"))? - }, - score: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("score"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ElectionFinalized { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ElectionFinalized { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ElectionFinalized { compute, score } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("compute"), - compute as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("score"), - score as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ElectionFinalized { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ElectionFinalized { compute, score } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("compute"), - compute as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("score"), - score as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ElectionFinalized { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ElectionFinalized", - "compute", - &self.compute, - "score", - &&self.score, - ) - } - } - impl ::subxt::events::StaticEvent for ElectionFinalized { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "ElectionFinalized"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ElectionFailed; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ElectionFailed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ElectionFailed) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ElectionFailed { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ElectionFailed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ElectionFailed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ElectionFailed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(ElectionFailed) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ElectionFailed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ElectionFailed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ElectionFailed = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ElectionFailed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ElectionFailed = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ElectionFailed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "ElectionFailed") - } - } - impl ::subxt::events::StaticEvent for ElectionFailed { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "ElectionFailed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Rewarded { - pub account: ::subxt::utils::AccountId32, - pub value: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Rewarded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Rewarded { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Rewarded::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Rewarded::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Rewarded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.value), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.value, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Rewarded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Rewarded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Rewarded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Rewarded { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Rewarded { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Rewarded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Rewarded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rewarded { account, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Rewarded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rewarded { account, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Rewarded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Rewarded", - "account", - &self.account, - "value", - &&self.value, - ) - } - } - impl ::subxt::events::StaticEvent for Rewarded { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "Rewarded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Slashed { - pub account: ::subxt::utils::AccountId32, - pub value: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Slashed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Slashed { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Slashed::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Slashed::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Slashed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.value), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.value, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Slashed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Slashed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Slashed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Slashed { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Slashed { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Slashed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Slashed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Slashed { account, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Slashed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Slashed { account, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Slashed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Slashed", - "account", - &self.account, - "value", - &&self.value, - ) - } - } - impl ::subxt::events::StaticEvent for Slashed { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "Slashed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PhaseTransitioned { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(PhaseTransitioned { - from: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PhaseTransitioned::from`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - to: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PhaseTransitioned::to`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - round: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PhaseTransitioned::round`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PhaseTransitioned { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.from), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.to), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.round), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.from, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.to, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.round, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PhaseTransitioned {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PhaseTransitioned { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PhaseTransitioned; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PhaseTransitioned { - from: { - let val = *vals - .get(&Some("from")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "from".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - to: { - let val = *vals - .get(&Some("to")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "to".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - round: { - let val = *vals - .get(&Some("round")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "round".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("round"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(PhaseTransitioned { - from: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - to: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - round: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("round"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PhaseTransitioned { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PhaseTransitioned { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PhaseTransitioned { from, to, round } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("from"), - from as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("round"), - round as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PhaseTransitioned { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PhaseTransitioned { from, to, round } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("from"), - from as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("round"), - round as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PhaseTransitioned { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "PhaseTransitioned", - "from", - &self.from, - "to", - &self.to, - "round", - &&self.round, - ) - } - } - 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 { - pub fn round( - &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( - "ElectionProviderMultiPhase", - "Round", - ::alloc::vec::Vec::new(), - [ - 37u8, - 2u8, - 47u8, - 240u8, - 18u8, - 213u8, - 214u8, - 74u8, - 57u8, - 4u8, - 103u8, - 253u8, - 45u8, - 17u8, - 123u8, - 203u8, - 173u8, - 170u8, - 234u8, - 109u8, - 139u8, - 143u8, - 216u8, - 3u8, - 161u8, - 5u8, - 0u8, - 106u8, - 181u8, - 214u8, - 170u8, - 105u8, - ], - ) - } - pub fn current_phase( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_election_provider_multi_phase::Phase< - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ElectionProviderMultiPhase", - "CurrentPhase", - ::alloc::vec::Vec::new(), - [ - 230u8, - 7u8, - 51u8, - 158u8, - 77u8, - 36u8, - 148u8, - 175u8, - 138u8, - 205u8, - 195u8, - 236u8, - 66u8, - 148u8, - 0u8, - 77u8, - 160u8, - 249u8, - 128u8, - 58u8, - 189u8, - 48u8, - 195u8, - 198u8, - 115u8, - 251u8, - 13u8, - 206u8, - 163u8, - 180u8, - 108u8, - 10u8, - ], - ) - } - pub fn queued_solution( - &self, - ) -> ::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", - ::alloc::vec::Vec::new(), - [ - 70u8, - 22u8, - 249u8, - 41u8, - 72u8, - 8u8, - 99u8, - 121u8, - 102u8, - 128u8, - 244u8, - 104u8, - 208u8, - 244u8, - 113u8, - 122u8, - 118u8, - 17u8, - 65u8, - 78u8, - 165u8, - 129u8, - 117u8, - 36u8, - 244u8, - 243u8, - 153u8, - 87u8, - 46u8, - 116u8, - 103u8, - 43u8, - ], - ) - } - pub fn snapshot( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_election_provider_multi_phase::RoundSnapshot< - ::subxt::utils::AccountId32, - ( - ::subxt::utils::AccountId32, - ::core::primitive::u64, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - ), - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ElectionProviderMultiPhase", - "Snapshot", - ::alloc::vec::Vec::new(), - [ - 103u8, - 204u8, - 76u8, - 156u8, - 154u8, - 95u8, - 115u8, - 109u8, - 135u8, - 17u8, - 9u8, - 137u8, - 3u8, - 184u8, - 111u8, - 198u8, - 216u8, - 3u8, - 78u8, - 115u8, - 101u8, - 235u8, - 52u8, - 235u8, - 245u8, - 58u8, - 191u8, - 144u8, - 61u8, - 204u8, - 159u8, - 55u8, - ], - ) - } - pub fn desired_targets( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ElectionProviderMultiPhase", - "DesiredTargets", - ::alloc::vec::Vec::new(), - [ - 67u8, - 241u8, - 33u8, - 113u8, - 62u8, - 173u8, - 233u8, - 76u8, - 99u8, - 12u8, - 61u8, - 237u8, - 21u8, - 252u8, - 39u8, - 37u8, - 86u8, - 167u8, - 173u8, - 53u8, - 238u8, - 172u8, - 97u8, - 59u8, - 27u8, - 164u8, - 163u8, - 76u8, - 140u8, - 37u8, - 159u8, - 250u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 48u8, - 121u8, - 12u8, - 130u8, - 174u8, - 100u8, - 114u8, - 183u8, - 83u8, - 63u8, - 44u8, - 147u8, - 242u8, - 223u8, - 22u8, - 107u8, - 175u8, - 182u8, - 178u8, - 254u8, - 12u8, - 189u8, - 37u8, - 117u8, - 95u8, - 21u8, - 19u8, - 167u8, - 56u8, - 205u8, - 49u8, - 100u8, - ], - ) - } - pub fn signed_submission_next_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( - "ElectionProviderMultiPhase", - "SignedSubmissionNextIndex", - ::alloc::vec::Vec::new(), - [ - 188u8, - 126u8, - 77u8, - 166u8, - 42u8, - 81u8, - 12u8, - 239u8, - 195u8, - 16u8, - 132u8, - 178u8, - 217u8, - 158u8, - 28u8, - 19u8, - 201u8, - 148u8, - 47u8, - 105u8, - 178u8, - 115u8, - 17u8, - 78u8, - 71u8, - 178u8, - 205u8, - 171u8, - 71u8, - 52u8, - 194u8, - 82u8, - ], - ) - } - pub fn signed_submission_indices( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::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::Address::new_static( - "ElectionProviderMultiPhase", - "SignedSubmissionIndices", - ::alloc::vec::Vec::new(), - [ - 245u8, - 24u8, - 83u8, - 165u8, - 229u8, - 167u8, - 35u8, - 107u8, - 255u8, - 77u8, - 34u8, - 0u8, - 188u8, - 159u8, - 175u8, - 68u8, - 232u8, - 114u8, - 238u8, - 231u8, - 252u8, - 169u8, - 127u8, - 232u8, - 206u8, - 183u8, - 191u8, - 227u8, - 176u8, - 46u8, - 51u8, - 147u8, - ], - ) - } - pub fn signed_submissions_map_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 118u8, - 12u8, - 234u8, - 73u8, - 238u8, - 134u8, - 20u8, - 105u8, - 248u8, - 39u8, - 23u8, - 96u8, - 157u8, - 187u8, - 14u8, - 143u8, - 135u8, - 121u8, - 77u8, - 90u8, - 154u8, - 221u8, - 139u8, - 28u8, - 34u8, - 8u8, - 19u8, - 246u8, - 65u8, - 155u8, - 84u8, - 53u8, - ], - ) - } - 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::Address::new_static( - "ElectionProviderMultiPhase", - "SignedSubmissionsMap", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 118u8, - 12u8, - 234u8, - 73u8, - 238u8, - 134u8, - 20u8, - 105u8, - 248u8, - 39u8, - 23u8, - 96u8, - 157u8, - 187u8, - 14u8, - 143u8, - 135u8, - 121u8, - 77u8, - 90u8, - 154u8, - 221u8, - 139u8, - 28u8, - 34u8, - 8u8, - 19u8, - 246u8, - 65u8, - 155u8, - 84u8, - 53u8, - ], - ) - } - pub fn minimum_untrusted_score( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_npos_elections::ElectionScore, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ElectionProviderMultiPhase", - "MinimumUntrustedScore", - ::alloc::vec::Vec::new(), - [ - 22u8, - 253u8, - 11u8, - 17u8, - 171u8, - 145u8, - 175u8, - 97u8, - 137u8, - 148u8, - 36u8, - 232u8, - 55u8, - 174u8, - 75u8, - 173u8, - 133u8, - 5u8, - 227u8, - 161u8, - 28u8, - 62u8, - 188u8, - 249u8, - 123u8, - 102u8, - 186u8, - 180u8, - 226u8, - 216u8, - 71u8, - 249u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn unsigned_phase( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "UnsignedPhase", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn signed_phase( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "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, - ], - ) - } - pub fn better_signed_threshold( - &self, - ) -> ::subxt::constants::Address< - runtime_types::sp_arithmetic::per_things::Perbill, - > { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "BetterSignedThreshold", - [ - 65u8, - 93u8, - 120u8, - 165u8, - 204u8, - 81u8, - 159u8, - 163u8, - 93u8, - 135u8, - 114u8, - 121u8, - 147u8, - 35u8, - 215u8, - 213u8, - 4u8, - 223u8, - 83u8, - 37u8, - 225u8, - 200u8, - 189u8, - 156u8, - 140u8, - 36u8, - 58u8, - 46u8, - 42u8, - 232u8, - 155u8, - 0u8, - ], - ) - } - pub fn better_unsigned_threshold( - &self, - ) -> ::subxt::constants::Address< - runtime_types::sp_arithmetic::per_things::Perbill, - > { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "BetterUnsignedThreshold", - [ - 65u8, - 93u8, - 120u8, - 165u8, - 204u8, - 81u8, - 159u8, - 163u8, - 93u8, - 135u8, - 114u8, - 121u8, - 147u8, - 35u8, - 215u8, - 213u8, - 4u8, - 223u8, - 83u8, - 37u8, - 225u8, - 200u8, - 189u8, - 156u8, - 140u8, - 36u8, - 58u8, - 46u8, - 42u8, - 232u8, - 155u8, - 0u8, - ], - ) - } - pub fn offchain_repeat( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "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, - ], - ) - } - pub fn miner_tx_priority( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u64> { - ::subxt::constants::Address::new_static( - "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, - ], - ) - } - pub fn signed_max_submissions( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "SignedMaxSubmissions", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn signed_max_weight( - &self, - ) -> ::subxt::constants::Address< - runtime_types::sp_weights::weight_v2::Weight, - > { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "SignedMaxWeight", - [ - 149u8, - 252u8, - 129u8, - 80u8, - 169u8, - 36u8, - 79u8, - 127u8, - 240u8, - 156u8, - 56u8, - 202u8, - 219u8, - 86u8, - 5u8, - 65u8, - 245u8, - 148u8, - 138u8, - 243u8, - 210u8, - 128u8, - 234u8, - 216u8, - 240u8, - 219u8, - 123u8, - 235u8, - 21u8, - 158u8, - 237u8, - 112u8, - ], - ) - } - pub fn signed_max_refunds( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "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, - ], - ) - } - pub fn signed_reward_base( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "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, - ], - ) - } - pub fn signed_deposit_base( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "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, - ], - ) - } - pub fn signed_deposit_byte( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "SignedDepositByte", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn signed_deposit_weight( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "SignedDepositWeight", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - pub fn max_electing_voters( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "MaxElectingVoters", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn max_electable_targets( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u16> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "MaxElectableTargets", - [ - 116u8, - 33u8, - 2u8, - 170u8, - 181u8, - 147u8, - 171u8, - 169u8, - 167u8, - 227u8, - 41u8, - 144u8, - 11u8, - 236u8, - 82u8, - 100u8, - 74u8, - 60u8, - 184u8, - 72u8, - 169u8, - 90u8, - 208u8, - 135u8, - 15u8, - 117u8, - 10u8, - 123u8, - 128u8, - 193u8, - 29u8, - 70u8, - ], - ) - } - pub fn max_winners( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "MaxWinners", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn miner_max_length( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "MinerMaxLength", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn miner_max_weight( - &self, - ) -> ::subxt::constants::Address< - runtime_types::sp_weights::weight_v2::Weight, - > { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "MinerMaxWeight", - [ - 149u8, - 252u8, - 129u8, - 80u8, - 169u8, - 36u8, - 79u8, - 127u8, - 240u8, - 156u8, - 56u8, - 202u8, - 219u8, - 86u8, - 5u8, - 65u8, - 245u8, - 148u8, - 138u8, - 243u8, - 210u8, - 128u8, - 234u8, - 216u8, - 240u8, - 219u8, - 123u8, - 235u8, - 21u8, - 158u8, - 237u8, - 112u8, - ], - ) - } - pub fn miner_max_votes_per_voter( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "MinerMaxVotesPerVoter", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - pub fn miner_max_winners( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "ElectionProviderMultiPhase", - "MinerMaxWinners", - [ - 98u8, - 252u8, - 116u8, - 72u8, - 26u8, - 180u8, - 225u8, - 83u8, - 200u8, - 157u8, - 125u8, - 151u8, - 53u8, - 76u8, - 168u8, - 26u8, - 10u8, - 9u8, - 98u8, - 68u8, - 9u8, - 178u8, - 197u8, - 113u8, - 31u8, - 79u8, - 200u8, - 90u8, - 203u8, - 100u8, - 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod voter_list { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_bags_list::pallet::Error; - pub type Call = runtime_types::pallet_bags_list::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Rebag { - pub dislocated: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Rebag { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Rebag { - dislocated: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Rebag::dislocated`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Rebag { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.dislocated) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.dislocated, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.dislocated) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.dislocated, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Rebag {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Rebag { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Rebag; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Rebag { - dislocated: { - let val = *vals - .get(&Some("dislocated")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dislocated".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dislocated"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Rebag { - dislocated: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dislocated"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Rebag { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Rebag { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rebag { dislocated } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dislocated"), - dislocated as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Rebag { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rebag { dislocated } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dislocated"), - dislocated as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Rebag { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Rebag", - "dislocated", - &&self.dislocated, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Rebag { - const PALLET: &'static str = "VoterList"; - const CALL: &'static str = "rebag"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PutInFrontOf { - pub lighter: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PutInFrontOf { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(PutInFrontOf { - lighter: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PutInFrontOf::lighter`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PutInFrontOf { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.lighter) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.lighter, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.lighter) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.lighter, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PutInFrontOf {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PutInFrontOf { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PutInFrontOf; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PutInFrontOf { - lighter: { - let val = *vals - .get(&Some("lighter")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "lighter".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("lighter"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(PutInFrontOf { - lighter: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("lighter"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PutInFrontOf { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PutInFrontOf { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PutInFrontOf { lighter } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("lighter"), - lighter as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PutInFrontOf { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PutInFrontOf { lighter } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("lighter"), - lighter as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PutInFrontOf { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "PutInFrontOf", - "lighter", - &&self.lighter, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for PutInFrontOf { - const PALLET: &'static str = "VoterList"; - const CALL: &'static str = "put_in_front_of"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn rebag( - &self, - dislocated: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "VoterList", - "rebag", - types::Rebag { dislocated }, - [ - 9u8, - 111u8, - 68u8, - 237u8, - 32u8, - 21u8, - 214u8, - 84u8, - 11u8, - 39u8, - 94u8, - 43u8, - 198u8, - 46u8, - 91u8, - 147u8, - 194u8, - 3u8, - 35u8, - 171u8, - 95u8, - 248u8, - 78u8, - 0u8, - 7u8, - 99u8, - 2u8, - 124u8, - 139u8, - 42u8, - 109u8, - 226u8, - ], - ) - } - pub fn put_in_front_of( - &self, - lighter: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "VoterList", - "put_in_front_of", - types::PutInFrontOf { lighter }, - [ - 61u8, - 76u8, - 164u8, - 177u8, - 140u8, - 44u8, - 127u8, - 198u8, - 195u8, - 241u8, - 36u8, - 80u8, - 32u8, - 85u8, - 183u8, - 130u8, - 137u8, - 128u8, - 16u8, - 203u8, - 184u8, - 19u8, - 151u8, - 55u8, - 10u8, - 194u8, - 162u8, - 8u8, - 211u8, - 110u8, - 126u8, - 75u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_bags_list::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Rebagged { - pub who: ::subxt::utils::AccountId32, - pub from: ::core::primitive::u64, - pub to: ::core::primitive::u64, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Rebagged { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Rebagged { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Rebagged::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - from: { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Rebagged::from`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - to: { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Rebagged::to`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Rebagged { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.from), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.to), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.from, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.to, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Rebagged {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Rebagged { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Rebagged; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Rebagged { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - from: { - let val = *vals - .get(&Some("from")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "from".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - to: { - let val = *vals - .get(&Some("to")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "to".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Rebagged { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - from: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - to: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Rebagged { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Rebagged { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rebagged { who, from, to } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("from"), - from as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Rebagged { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Rebagged { who, from, to } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("from"), - from as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Rebagged { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Rebagged", - "who", - &self.who, - "from", - &self.from, - "to", - &&self.to, - ) - } - } - impl ::subxt::events::StaticEvent for Rebagged { - const PALLET: &'static str = "VoterList"; - const EVENT: &'static str = "Rebagged"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScoreUpdated { - pub who: ::subxt::utils::AccountId32, - pub new_score: ::core::primitive::u64, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ScoreUpdated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ScoreUpdated { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScoreUpdated::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_score: { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScoreUpdated::new_score`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ScoreUpdated { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new_score), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.new_score, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ScoreUpdated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ScoreUpdated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ScoreUpdated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ScoreUpdated { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - new_score: { - let val = *vals - .get(&Some("new_score")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_score".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_score"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ScoreUpdated { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - new_score: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_score"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ScoreUpdated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ScoreUpdated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ScoreUpdated { who, new_score } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_score"), - new_score as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ScoreUpdated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ScoreUpdated { who, new_score } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_score"), - new_score as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ScoreUpdated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ScoreUpdated", - "who", - &self.who, - "new_score", - &&self.new_score, - ) - } - } - 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 { - pub fn list_nodes_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_bags_list::list::Node, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "VoterList", - "ListNodes", - ::alloc::vec::Vec::new(), - [ - 240u8, - 139u8, - 78u8, - 185u8, - 159u8, - 185u8, - 33u8, - 229u8, - 171u8, - 222u8, - 54u8, - 81u8, - 104u8, - 170u8, - 49u8, - 232u8, - 29u8, - 117u8, - 193u8, - 68u8, - 225u8, - 180u8, - 46u8, - 199u8, - 100u8, - 26u8, - 99u8, - 216u8, - 74u8, - 248u8, - 73u8, - 144u8, - ], - ) - } - pub fn list_nodes( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_bags_list::list::Node, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "VoterList", - "ListNodes", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 240u8, - 139u8, - 78u8, - 185u8, - 159u8, - 185u8, - 33u8, - 229u8, - 171u8, - 222u8, - 54u8, - 81u8, - 104u8, - 170u8, - 49u8, - 232u8, - 29u8, - 117u8, - 193u8, - 68u8, - 225u8, - 180u8, - 46u8, - 199u8, - 100u8, - 26u8, - 99u8, - 216u8, - 74u8, - 248u8, - 73u8, - 144u8, - ], - ) - } - pub fn counter_for_list_nodes( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "VoterList", - "CounterForListNodes", - ::alloc::vec::Vec::new(), - [ - 126u8, - 150u8, - 201u8, - 81u8, - 155u8, - 79u8, - 50u8, - 48u8, - 120u8, - 170u8, - 3u8, - 104u8, - 112u8, - 254u8, - 106u8, - 46u8, - 108u8, - 126u8, - 158u8, - 245u8, - 95u8, - 88u8, - 236u8, - 89u8, - 79u8, - 172u8, - 13u8, - 146u8, - 202u8, - 151u8, - 122u8, - 132u8, - ], - ) - } - pub fn list_bags_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_bags_list::list::Bag, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "VoterList", - "ListBags", - ::alloc::vec::Vec::new(), - [ - 98u8, - 52u8, - 177u8, - 147u8, - 244u8, - 169u8, - 45u8, - 213u8, - 76u8, - 163u8, - 47u8, - 96u8, - 197u8, - 245u8, - 17u8, - 208u8, - 86u8, - 15u8, - 233u8, - 156u8, - 165u8, - 44u8, - 164u8, - 202u8, - 117u8, - 167u8, - 209u8, - 193u8, - 218u8, - 235u8, - 140u8, - 158u8, - ], - ) - } - pub fn list_bags( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u64>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_bags_list::list::Bag, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "VoterList", - "ListBags", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 98u8, - 52u8, - 177u8, - 147u8, - 244u8, - 169u8, - 45u8, - 213u8, - 76u8, - 163u8, - 47u8, - 96u8, - 197u8, - 245u8, - 17u8, - 208u8, - 86u8, - 15u8, - 233u8, - 156u8, - 165u8, - 44u8, - 164u8, - 202u8, - 117u8, - 167u8, - 209u8, - 193u8, - 218u8, - 235u8, - 140u8, - 158u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn bag_thresholds( - &self, - ) -> ::subxt::constants::Address< - ::std::vec::Vec<::core::primitive::u64>, - > { - ::subxt::constants::Address::new_static( - "VoterList", - "BagThresholds", - [ - 215u8, - 118u8, - 183u8, - 172u8, - 4u8, - 42u8, - 248u8, - 108u8, - 4u8, - 110u8, - 43u8, - 165u8, - 228u8, - 7u8, - 36u8, - 30u8, - 135u8, - 184u8, - 56u8, - 201u8, - 107u8, - 68u8, - 25u8, - 164u8, - 134u8, - 32u8, - 82u8, - 107u8, - 200u8, - 219u8, - 212u8, - 198u8, - ], - ) - } - } - } - } - pub mod nomination_pools { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_nomination_pools::pallet::Error; - pub type Call = runtime_types::pallet_nomination_pools::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Join { - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub pool_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Join { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Join { - amount: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Join::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Join::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Join { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.amount), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.amount), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Join {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Join { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Join; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Join { - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Join { - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Join { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Join { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Join { amount, pool_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Join { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Join { amount, pool_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Join { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Join", - "amount", - &self.amount, - "pool_id", - &&self.pool_id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Join { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "join"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BondExtra { - pub extra: runtime_types::pallet_nomination_pools::BondExtra< - ::core::primitive::u128, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BondExtra { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(BondExtra { - extra: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BondExtra::extra`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BondExtra { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.extra) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.extra, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.extra) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.extra, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BondExtra {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BondExtra { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BondExtra; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BondExtra { - extra: { - let val = *vals - .get(&Some("extra")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "extra".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("extra"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(BondExtra { - extra: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("extra"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for BondExtra { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BondExtra { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BondExtra { extra } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("extra"), - extra as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BondExtra { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BondExtra { extra } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("extra"), - extra as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BondExtra { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "BondExtra", - "extra", - &&self.extra, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for BondExtra { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "bond_extra"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimPayout; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ClaimPayout { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ClaimPayout) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ClaimPayout { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ClaimPayout {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ClaimPayout { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ClaimPayout; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(ClaimPayout) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ClaimPayout { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ClaimPayout { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClaimPayout = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ClaimPayout { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClaimPayout = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ClaimPayout { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "ClaimPayout") - } - } - impl ::subxt::blocks::StaticExtrinsic for ClaimPayout { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "claim_payout"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Unbond { - pub member_account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - #[codec(compact)] - pub unbonding_points: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Unbond { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Unbond { - member_account: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unbond::member_account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - unbonding_points: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unbond::unbonding_points`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Unbond { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.member_account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.unbonding_points), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.member_account, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.unbonding_points), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Unbond {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Unbond { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Unbond; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Unbond { - member_account: { - let val = *vals - .get(&Some("member_account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member_account".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("member_account"))? - }, - unbonding_points: { - let val = *vals - .get(&Some("unbonding_points")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "unbonding_points".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("unbonding_points"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Unbond { - member_account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("member_account"))? - }, - unbonding_points: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("unbonding_points"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Unbond { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Unbond { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unbond { member_account, unbonding_points } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member_account"), - member_account - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("unbonding_points"), - unbonding_points - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Unbond { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unbond { member_account, unbonding_points } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member_account"), - member_account - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("unbonding_points"), - unbonding_points - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Unbond { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Unbond", - "member_account", - &self.member_account, - "unbonding_points", - &&self.unbonding_points, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Unbond { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "unbond"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PoolWithdrawUnbonded { - pub pool_id: ::core::primitive::u32, - pub num_slashing_spans: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PoolWithdrawUnbonded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(PoolWithdrawUnbonded { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PoolWithdrawUnbonded::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - num_slashing_spans: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `PoolWithdrawUnbonded::num_slashing_spans`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PoolWithdrawUnbonded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.num_slashing_spans, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.num_slashing_spans, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PoolWithdrawUnbonded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for PoolWithdrawUnbonded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PoolWithdrawUnbonded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PoolWithdrawUnbonded { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - num_slashing_spans: { - let val = *vals - .get(&Some("num_slashing_spans")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "num_slashing_spans".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(PoolWithdrawUnbonded { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - num_slashing_spans: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PoolWithdrawUnbonded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for PoolWithdrawUnbonded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PoolWithdrawUnbonded { pool_id, num_slashing_spans } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("num_slashing_spans"), - num_slashing_spans - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for PoolWithdrawUnbonded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PoolWithdrawUnbonded { pool_id, num_slashing_spans } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("num_slashing_spans"), - num_slashing_spans - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PoolWithdrawUnbonded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PoolWithdrawUnbonded", - "pool_id", - &self.pool_id, - "num_slashing_spans", - &&self.num_slashing_spans, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for PoolWithdrawUnbonded { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "pool_withdraw_unbonded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct WithdrawUnbonded { - pub member_account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub num_slashing_spans: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for WithdrawUnbonded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(WithdrawUnbonded { - member_account: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `WithdrawUnbonded::member_account`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - num_slashing_spans: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `WithdrawUnbonded::num_slashing_spans`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for WithdrawUnbonded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.member_account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.num_slashing_spans, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.member_account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.num_slashing_spans, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for WithdrawUnbonded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for WithdrawUnbonded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = WithdrawUnbonded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(WithdrawUnbonded { - member_account: { - let val = *vals - .get(&Some("member_account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member_account".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("member_account"))? - }, - num_slashing_spans: { - let val = *vals - .get(&Some("num_slashing_spans")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "num_slashing_spans".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(WithdrawUnbonded { - member_account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("member_account"))? - }, - num_slashing_spans: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for WithdrawUnbonded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for WithdrawUnbonded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WithdrawUnbonded { - member_account, - num_slashing_spans, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member_account"), - member_account - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("num_slashing_spans"), - num_slashing_spans - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for WithdrawUnbonded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WithdrawUnbonded { - member_account, - num_slashing_spans, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member_account"), - member_account - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("num_slashing_spans"), - num_slashing_spans - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for WithdrawUnbonded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "WithdrawUnbonded", - "member_account", - &self.member_account, - "num_slashing_spans", - &&self.num_slashing_spans, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for WithdrawUnbonded { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "withdraw_unbonded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Create { - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub root: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub nominator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub bouncer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Create { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Create { - amount: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Create::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - root: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Create::root`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - nominator: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Create::nominator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - bouncer: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Create::bouncer`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Create { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.amount), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.root), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.nominator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.bouncer), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.amount), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.root, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.nominator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.bouncer, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Create {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Create { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Create; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Create { - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - root: { - let val = *vals - .get(&Some("root")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "root".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("root"))? - }, - nominator: { - let val = *vals - .get(&Some("nominator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nominator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - bouncer: { - let val = *vals - .get(&Some("bouncer")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bouncer".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bouncer"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(Create { - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - root: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("root"))? - }, - nominator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - bouncer: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bouncer"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Create { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Create { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Create { amount, root, nominator, bouncer } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("root"), - root as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nominator"), - nominator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bouncer"), - bouncer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Create { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Create { amount, root, nominator, bouncer } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("root"), - root as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nominator"), - nominator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bouncer"), - bouncer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Create { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Create", - "amount", - &self.amount, - "root", - &self.root, - "nominator", - &self.nominator, - "bouncer", - &&self.bouncer, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Create { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "create"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CreateWithPoolId { - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub root: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub nominator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub bouncer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub pool_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CreateWithPoolId { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CreateWithPoolId { - amount: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CreateWithPoolId::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - root: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CreateWithPoolId::root`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - nominator: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CreateWithPoolId::nominator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - bouncer: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CreateWithPoolId::bouncer`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CreateWithPoolId::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CreateWithPoolId { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.amount), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.root), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.nominator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.bouncer), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.amount), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.root, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.nominator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.bouncer, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CreateWithPoolId {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for CreateWithPoolId { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CreateWithPoolId; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CreateWithPoolId { - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - root: { - let val = *vals - .get(&Some("root")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "root".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("root"))? - }, - nominator: { - let val = *vals - .get(&Some("nominator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nominator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - bouncer: { - let val = *vals - .get(&Some("bouncer")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bouncer".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bouncer"))? - }, - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(CreateWithPoolId { - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - root: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("root"))? - }, - nominator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - bouncer: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bouncer"))? - }, - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CreateWithPoolId { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CreateWithPoolId { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CreateWithPoolId { - amount, - root, - nominator, - bouncer, - pool_id, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("root"), - root as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nominator"), - nominator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bouncer"), - bouncer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for CreateWithPoolId { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CreateWithPoolId { - amount, - root, - nominator, - bouncer, - pool_id, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("root"), - root as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nominator"), - nominator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bouncer"), - bouncer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CreateWithPoolId { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "CreateWithPoolId", - "amount", - &self.amount, - "root", - &self.root, - "nominator", - &self.nominator, - "bouncer", - &self.bouncer, - "pool_id", - &&self.pool_id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for CreateWithPoolId { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "create_with_pool_id"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Nominate { - pub pool_id: ::core::primitive::u32, - pub validators: ::std::vec::Vec<::subxt::utils::AccountId32>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Nominate { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Nominate { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Nominate::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validators: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Nominate::validators`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Nominate { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.validators), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validators, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Nominate {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Nominate { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Nominate; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Nominate { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - validators: { - let val = *vals - .get(&Some("validators")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validators".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("validators"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Nominate { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - validators: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("validators"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Nominate { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Nominate { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Nominate { pool_id, validators } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validators"), - validators as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Nominate { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Nominate { pool_id, validators } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validators"), - validators as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Nominate { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Nominate", - "pool_id", - &self.pool_id, - "validators", - &&self.validators, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Nominate { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "nominate"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetState { - pub pool_id: ::core::primitive::u32, - pub state: runtime_types::pallet_nomination_pools::PoolState, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetState { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetState { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetState::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - state: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetState::state`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetState { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.state), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.state, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetState {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetState { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetState; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetState { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - state: { - let val = *vals - .get(&Some("state")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "state".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("state"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SetState { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - state: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("state"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SetState { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetState { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetState { pool_id, state } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("state"), - state as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetState { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetState { pool_id, state } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("state"), - state as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetState { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SetState", - "pool_id", - &self.pool_id, - "state", - &&self.state, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetState { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "set_state"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMetadata { - pub pool_id: ::core::primitive::u32, - pub metadata: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetMetadata { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMetadata { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMetadata::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - metadata: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMetadata::metadata`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetMetadata { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.metadata), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.metadata, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetMetadata {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetMetadata { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMetadata; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMetadata { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - metadata: { - let val = *vals - .get(&Some("metadata")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "metadata".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("metadata"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SetMetadata { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - metadata: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("metadata"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SetMetadata { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetMetadata { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMetadata { pool_id, metadata } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("metadata"), - metadata as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetMetadata { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMetadata { pool_id, metadata } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("metadata"), - metadata as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMetadata { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SetMetadata", - "pool_id", - &self.pool_id, - "metadata", - &&self.metadata, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetMetadata { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "set_metadata"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetConfigs { - pub min_join_bond: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u128, - >, - pub min_create_bond: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u128, - >, - pub max_pools: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, - pub max_members: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, - pub max_members_per_pool: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, - pub global_max_commission: runtime_types::pallet_nomination_pools::ConfigOp< - runtime_types::sp_arithmetic::per_things::Perbill, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetConfigs { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetConfigs { - min_join_bond: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetConfigs::min_join_bond`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - min_create_bond: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetConfigs::min_create_bond`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_pools: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetConfigs::max_pools`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_members: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetConfigs::max_members`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_members_per_pool: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetConfigs::max_members_per_pool`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - global_max_commission: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetConfigs::global_max_commission`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetConfigs { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.min_join_bond), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.min_create_bond, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_pools), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_members), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.max_members_per_pool, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.global_max_commission, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.min_join_bond, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.min_create_bond, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_pools, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_members, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_members_per_pool, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.global_max_commission, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetConfigs {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetConfigs { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetConfigs; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetConfigs { - min_join_bond: { - let val = *vals - .get(&Some("min_join_bond")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "min_join_bond".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("min_join_bond"))? - }, - min_create_bond: { - let val = *vals - .get(&Some("min_create_bond")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "min_create_bond".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("min_create_bond"))? - }, - max_pools: { - let val = *vals - .get(&Some("max_pools")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_pools".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_pools"))? - }, - max_members: { - let val = *vals - .get(&Some("max_members")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_members".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_members"))? - }, - max_members_per_pool: { - let val = *vals - .get(&Some("max_members_per_pool")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_members_per_pool".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_members_per_pool"))? - }, - global_max_commission: { - let val = *vals - .get(&Some("global_max_commission")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "global_max_commission".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("global_max_commission"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = value; - Ok(SetConfigs { - min_join_bond: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("min_join_bond"))? - }, - min_create_bond: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("min_create_bond"))? - }, - max_pools: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_pools"))? - }, - max_members: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_members"))? - }, - max_members_per_pool: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_members_per_pool"))? - }, - global_max_commission: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("global_max_commission"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SetConfigs { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetConfigs { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetConfigs { - min_join_bond, - min_create_bond, - max_pools, - max_members, - max_members_per_pool, - global_max_commission, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("min_join_bond"), - min_join_bond - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_create_bond"), - min_create_bond - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_pools"), - max_pools as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_members"), - max_members as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_members_per_pool"), - max_members_per_pool - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("global_max_commission"), - global_max_commission - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetConfigs { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetConfigs { - min_join_bond, - min_create_bond, - max_pools, - max_members, - max_members_per_pool, - global_max_commission, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("min_join_bond"), - min_join_bond - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_create_bond"), - min_create_bond - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_pools"), - max_pools as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_members"), - max_members as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_members_per_pool"), - max_members_per_pool - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("global_max_commission"), - global_max_commission - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetConfigs { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "min_join_bond", - "min_create_bond", - "max_pools", - "max_members", - "max_members_per_pool", - "global_max_commission", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.min_join_bond, - &self.min_create_bond, - &self.max_pools, - &self.max_members, - &self.max_members_per_pool, - &&self.global_max_commission, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "SetConfigs", - names, - values, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetConfigs { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "set_configs"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UpdateRoles { - pub pool_id: ::core::primitive::u32, - pub new_root: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - pub new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - pub new_bouncer: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for UpdateRoles { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(UpdateRoles { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UpdateRoles::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_root: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UpdateRoles::new_root`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_nominator: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UpdateRoles::new_nominator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_bouncer: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UpdateRoles::new_bouncer`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for UpdateRoles { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new_root), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new_nominator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new_bouncer), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.new_root, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.new_nominator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.new_bouncer, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for UpdateRoles {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for UpdateRoles { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UpdateRoles; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(UpdateRoles { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - new_root: { - let val = *vals - .get(&Some("new_root")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_root".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_root"))? - }, - new_nominator: { - let val = *vals - .get(&Some("new_nominator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_nominator".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("new_nominator"))? - }, - new_bouncer: { - let val = *vals - .get(&Some("new_bouncer")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_bouncer".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_bouncer"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(UpdateRoles { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - new_root: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_root"))? - }, - new_nominator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("new_nominator"))? - }, - new_bouncer: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_bouncer"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for UpdateRoles { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for UpdateRoles { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UpdateRoles { - pool_id, - new_root, - new_nominator, - new_bouncer, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_root"), - new_root as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_nominator"), - new_nominator - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_bouncer"), - new_bouncer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for UpdateRoles { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UpdateRoles { - pool_id, - new_root, - new_nominator, - new_bouncer, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_root"), - new_root as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_nominator"), - new_nominator - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_bouncer"), - new_bouncer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for UpdateRoles { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "UpdateRoles", - "pool_id", - &self.pool_id, - "new_root", - &self.new_root, - "new_nominator", - &self.new_nominator, - "new_bouncer", - &&self.new_bouncer, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for UpdateRoles { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "update_roles"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Chill { - pub pool_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Chill { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.pool_id - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - Chill, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Chill { pool_id: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Chill { - fn from(x: ::subxt::ext::codec::Compact) -> Chill { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Chill { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Chill { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Chill::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Chill { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.pool_id) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.pool_id, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.pool_id) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.pool_id, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Chill {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Chill { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Chill; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Chill { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Chill { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Chill { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Chill { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Chill { pool_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Chill { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Chill { pool_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Chill { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Chill", - "pool_id", - &&self.pool_id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Chill { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "chill"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BondExtraOther { - pub member: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pub extra: runtime_types::pallet_nomination_pools::BondExtra< - ::core::primitive::u128, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BondExtraOther { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(BondExtraOther { - member: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BondExtraOther::member`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - extra: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BondExtraOther::extra`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BondExtraOther { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.member), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.extra), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.member, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.extra, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BondExtraOther {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BondExtraOther { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BondExtraOther; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BondExtraOther { - member: { - let val = *vals - .get(&Some("member")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - extra: { - let val = *vals - .get(&Some("extra")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "extra".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("extra"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(BondExtraOther { - member: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - extra: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("extra"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for BondExtraOther { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BondExtraOther { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BondExtraOther { member, extra } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("extra"), - extra as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BondExtraOther { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BondExtraOther { member, extra } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("extra"), - extra as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BondExtraOther { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "BondExtraOther", - "member", - &self.member, - "extra", - &&self.extra, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for BondExtraOther { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "bond_extra_other"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetClaimPermission { - pub permission: runtime_types::pallet_nomination_pools::ClaimPermission, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetClaimPermission { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetClaimPermission { - permission: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetClaimPermission::permission`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetClaimPermission { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.permission) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.permission, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.permission) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.permission, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetClaimPermission {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetClaimPermission { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetClaimPermission; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetClaimPermission { - permission: { - let val = *vals - .get(&Some("permission")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "permission".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("permission"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetClaimPermission { - permission: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("permission"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetClaimPermission { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetClaimPermission { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetClaimPermission { permission } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("permission"), - permission as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetClaimPermission { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetClaimPermission { permission } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("permission"), - permission as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetClaimPermission { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetClaimPermission", - "permission", - &&self.permission, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetClaimPermission { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "set_claim_permission"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimPayoutOther { - pub other: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ClaimPayoutOther { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ClaimPayoutOther { - other: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ClaimPayoutOther::other`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ClaimPayoutOther { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.other) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.other, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.other) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.other, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ClaimPayoutOther {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ClaimPayoutOther { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ClaimPayoutOther; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ClaimPayoutOther { - other: { - let val = *vals - .get(&Some("other")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "other".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("other"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ClaimPayoutOther { - other: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("other"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ClaimPayoutOther { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ClaimPayoutOther { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClaimPayoutOther { other } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("other"), - other as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ClaimPayoutOther { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClaimPayoutOther { other } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("other"), - other as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ClaimPayoutOther { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ClaimPayoutOther", - "other", - &&self.other, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ClaimPayoutOther { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "claim_payout_other"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCommission { - pub pool_id: ::core::primitive::u32, - pub new_commission: ::core::option::Option< - ( - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::utils::AccountId32, - ), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetCommission { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetCommission { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetCommission::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_commission: { - let __codec_res_edqy = <::core::option::Option< - ( - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::utils::AccountId32, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetCommission::new_commission`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetCommission { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new_commission), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.new_commission, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetCommission {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetCommission { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetCommission; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetCommission { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - new_commission: { - let val = *vals - .get(&Some("new_commission")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_commission".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("new_commission"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SetCommission { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - new_commission: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("new_commission"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetCommission { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetCommission { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetCommission { pool_id, new_commission } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_commission"), - new_commission - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetCommission { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetCommission { pool_id, new_commission } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_commission"), - new_commission - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetCommission { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SetCommission", - "pool_id", - &self.pool_id, - "new_commission", - &&self.new_commission, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetCommission { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "set_commission"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCommissionMax { - pub pool_id: ::core::primitive::u32, - pub max_commission: runtime_types::sp_arithmetic::per_things::Perbill, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetCommissionMax { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetCommissionMax { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetCommissionMax::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_commission: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetCommissionMax::max_commission`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetCommissionMax { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_commission), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_commission, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetCommissionMax {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetCommissionMax { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetCommissionMax; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetCommissionMax { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - max_commission: { - let val = *vals - .get(&Some("max_commission")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_commission".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_commission"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SetCommissionMax { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - max_commission: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_commission"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetCommissionMax { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetCommissionMax { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetCommissionMax { pool_id, max_commission } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_commission"), - max_commission - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetCommissionMax { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetCommissionMax { pool_id, max_commission } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_commission"), - max_commission - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetCommissionMax { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SetCommissionMax", - "pool_id", - &self.pool_id, - "max_commission", - &&self.max_commission, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetCommissionMax { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "set_commission_max"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCommissionChangeRate { - pub pool_id: ::core::primitive::u32, - pub change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< - ::core::primitive::u32, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetCommissionChangeRate { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetCommissionChangeRate { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetCommissionChangeRate::pool_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - change_rate: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetCommissionChangeRate::change_rate`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetCommissionChangeRate { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.change_rate), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.change_rate, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetCommissionChangeRate {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetCommissionChangeRate { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetCommissionChangeRate; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetCommissionChangeRate { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - change_rate: { - let val = *vals - .get(&Some("change_rate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "change_rate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("change_rate"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SetCommissionChangeRate { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - change_rate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("change_rate"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetCommissionChangeRate { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetCommissionChangeRate { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetCommissionChangeRate { pool_id, change_rate } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("change_rate"), - change_rate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetCommissionChangeRate { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetCommissionChangeRate { pool_id, change_rate } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("change_rate"), - change_rate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetCommissionChangeRate { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SetCommissionChangeRate", - "pool_id", - &self.pool_id, - "change_rate", - &&self.change_rate, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetCommissionChangeRate { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "set_commission_change_rate"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimCommission { - pub pool_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for ClaimCommission { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.pool_id - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - ClaimCommission, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ClaimCommission { pool_id: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for ClaimCommission { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> ClaimCommission { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ClaimCommission { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ClaimCommission { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ClaimCommission::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ClaimCommission { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.pool_id) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.pool_id, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.pool_id) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.pool_id, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ClaimCommission {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ClaimCommission { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ClaimCommission; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ClaimCommission { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ClaimCommission { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ClaimCommission { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ClaimCommission { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClaimCommission { pool_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ClaimCommission { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClaimCommission { pool_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ClaimCommission { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ClaimCommission", - "pool_id", - &&self.pool_id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ClaimCommission { - const PALLET: &'static str = "NominationPools"; - const CALL: &'static str = "claim_commission"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn join( - &self, - amount: ::core::primitive::u128, - pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "join", - types::Join { amount, pool_id }, - [ - 9u8, - 24u8, - 209u8, - 117u8, - 242u8, - 76u8, - 192u8, - 40u8, - 196u8, - 136u8, - 158u8, - 182u8, - 117u8, - 140u8, - 164u8, - 64u8, - 184u8, - 160u8, - 146u8, - 143u8, - 173u8, - 180u8, - 6u8, - 242u8, - 203u8, - 130u8, - 41u8, - 176u8, - 158u8, - 96u8, - 94u8, - 175u8, - ], - ) - } - pub fn bond_extra( - &self, - extra: runtime_types::pallet_nomination_pools::BondExtra< - ::core::primitive::u128, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "bond_extra", - types::BondExtra { extra }, - [ - 149u8, - 176u8, - 102u8, - 52u8, - 76u8, - 227u8, - 61u8, - 60u8, - 109u8, - 187u8, - 40u8, - 176u8, - 163u8, - 37u8, - 10u8, - 228u8, - 164u8, - 77u8, - 155u8, - 155u8, - 14u8, - 106u8, - 5u8, - 177u8, - 176u8, - 224u8, - 163u8, - 28u8, - 66u8, - 237u8, - 186u8, - 188u8, - ], - ) - } - pub fn claim_payout( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "claim_payout", - types::ClaimPayout {}, - [ - 28u8, - 87u8, - 180u8, - 5u8, - 69u8, - 49u8, - 121u8, - 28u8, - 34u8, - 63u8, - 78u8, - 228u8, - 223u8, - 12u8, - 171u8, - 41u8, - 181u8, - 137u8, - 145u8, - 141u8, - 198u8, - 220u8, - 5u8, - 101u8, - 173u8, - 69u8, - 222u8, - 59u8, - 111u8, - 92u8, - 182u8, - 8u8, - ], - ) - } - pub fn unbond( - &self, - member_account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - unbonding_points: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "unbond", - types::Unbond { - member_account, - unbonding_points, - }, - [ - 7u8, - 80u8, - 46u8, - 120u8, - 249u8, - 148u8, - 126u8, - 232u8, - 3u8, - 130u8, - 61u8, - 94u8, - 174u8, - 151u8, - 235u8, - 206u8, - 120u8, - 48u8, - 201u8, - 128u8, - 78u8, - 13u8, - 148u8, - 39u8, - 70u8, - 65u8, - 79u8, - 232u8, - 204u8, - 125u8, - 182u8, - 33u8, - ], - ) - } - pub fn pool_withdraw_unbonded( - &self, - pool_id: ::core::primitive::u32, - num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "pool_withdraw_unbonded", - types::PoolWithdrawUnbonded { - pool_id, - num_slashing_spans, - }, - [ - 145u8, - 39u8, - 154u8, - 109u8, - 24u8, - 233u8, - 144u8, - 66u8, - 28u8, - 252u8, - 180u8, - 5u8, - 54u8, - 123u8, - 28u8, - 182u8, - 26u8, - 156u8, - 69u8, - 105u8, - 226u8, - 208u8, - 154u8, - 34u8, - 22u8, - 201u8, - 139u8, - 104u8, - 198u8, - 195u8, - 247u8, - 49u8, - ], - ) - } - pub fn withdraw_unbonded( - &self, - 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", - types::WithdrawUnbonded { - member_account, - num_slashing_spans, - }, - [ - 69u8, - 9u8, - 243u8, - 218u8, - 41u8, - 80u8, - 5u8, - 112u8, - 23u8, - 90u8, - 208u8, - 120u8, - 91u8, - 181u8, - 37u8, - 159u8, - 183u8, - 41u8, - 187u8, - 212u8, - 39u8, - 175u8, - 90u8, - 245u8, - 242u8, - 18u8, - 220u8, - 40u8, - 160u8, - 46u8, - 214u8, - 239u8, - ], - ) - } - pub fn create( - &self, - amount: ::core::primitive::u128, - root: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - nominator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - bouncer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "create", - types::Create { - amount, - root, - nominator, - bouncer, - }, - [ - 75u8, - 103u8, - 67u8, - 204u8, - 44u8, - 28u8, - 143u8, - 33u8, - 194u8, - 100u8, - 71u8, - 143u8, - 211u8, - 193u8, - 229u8, - 119u8, - 237u8, - 212u8, - 65u8, - 62u8, - 19u8, - 52u8, - 14u8, - 4u8, - 205u8, - 88u8, - 156u8, - 238u8, - 143u8, - 158u8, - 144u8, - 108u8, - ], - ) - } - pub fn create_with_pool_id( - &self, - amount: ::core::primitive::u128, - root: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - nominator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - bouncer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "create_with_pool_id", - types::CreateWithPoolId { - amount, - root, - nominator, - bouncer, - pool_id, - }, - [ - 41u8, - 12u8, - 98u8, - 131u8, - 99u8, - 176u8, - 30u8, - 4u8, - 227u8, - 7u8, - 42u8, - 158u8, - 27u8, - 233u8, - 227u8, - 230u8, - 34u8, - 16u8, - 117u8, - 203u8, - 110u8, - 160u8, - 68u8, - 153u8, - 78u8, - 116u8, - 191u8, - 96u8, - 156u8, - 207u8, - 223u8, - 80u8, - ], - ) - } - pub fn nominate( - &self, - pool_id: ::core::primitive::u32, - validators: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "nominate", - types::Nominate { - pool_id, - validators, - }, - [ - 118u8, - 80u8, - 137u8, - 47u8, - 102u8, - 9u8, - 20u8, - 136u8, - 76u8, - 164u8, - 161u8, - 114u8, - 33u8, - 159u8, - 204u8, - 49u8, - 233u8, - 199u8, - 246u8, - 67u8, - 144u8, - 169u8, - 211u8, - 67u8, - 12u8, - 68u8, - 198u8, - 149u8, - 87u8, - 62u8, - 226u8, - 72u8, - ], - ) - } - pub fn set_state( - &self, - pool_id: ::core::primitive::u32, - state: runtime_types::pallet_nomination_pools::PoolState, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "set_state", - types::SetState { pool_id, state }, - [ - 39u8, - 221u8, - 24u8, - 65u8, - 144u8, - 230u8, - 228u8, - 24u8, - 191u8, - 53u8, - 171u8, - 148u8, - 131u8, - 45u8, - 10u8, - 22u8, - 222u8, - 240u8, - 13u8, - 87u8, - 123u8, - 182u8, - 102u8, - 26u8, - 124u8, - 205u8, - 23u8, - 31u8, - 25u8, - 43u8, - 12u8, - 140u8, - ], - ) - } - pub fn set_metadata( - &self, - pool_id: ::core::primitive::u32, - metadata: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "set_metadata", - types::SetMetadata { - pool_id, - metadata, - }, - [ - 221u8, - 189u8, - 15u8, - 232u8, - 0u8, - 49u8, - 187u8, - 67u8, - 124u8, - 26u8, - 114u8, - 191u8, - 81u8, - 14u8, - 253u8, - 75u8, - 88u8, - 182u8, - 136u8, - 18u8, - 238u8, - 119u8, - 215u8, - 248u8, - 133u8, - 160u8, - 154u8, - 193u8, - 177u8, - 140u8, - 1u8, - 16u8, - ], - ) - } - 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, - >, - global_max_commission: runtime_types::pallet_nomination_pools::ConfigOp< - runtime_types::sp_arithmetic::per_things::Perbill, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "set_configs", - types::SetConfigs { - min_join_bond, - min_create_bond, - max_pools, - max_members, - max_members_per_pool, - global_max_commission, - }, - [ - 151u8, - 222u8, - 184u8, - 213u8, - 161u8, - 89u8, - 162u8, - 112u8, - 198u8, - 87u8, - 186u8, - 55u8, - 99u8, - 197u8, - 164u8, - 156u8, - 185u8, - 199u8, - 202u8, - 19u8, - 44u8, - 34u8, - 35u8, - 39u8, - 129u8, - 22u8, - 41u8, - 32u8, - 27u8, - 37u8, - 176u8, - 107u8, - ], - ) - } - 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_bouncer: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "update_roles", - types::UpdateRoles { - pool_id, - new_root, - new_nominator, - new_bouncer, - }, - [ - 48u8, - 253u8, - 39u8, - 205u8, - 196u8, - 231u8, - 254u8, - 76u8, - 238u8, - 70u8, - 2u8, - 192u8, - 188u8, - 240u8, - 206u8, - 91u8, - 213u8, - 98u8, - 226u8, - 51u8, - 167u8, - 205u8, - 120u8, - 128u8, - 40u8, - 175u8, - 238u8, - 57u8, - 147u8, - 96u8, - 116u8, - 133u8, - ], - ) - } - pub fn chill( - &self, - pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "chill", - types::Chill { pool_id }, - [ - 65u8, - 206u8, - 54u8, - 53u8, - 37u8, - 97u8, - 161u8, - 104u8, - 62u8, - 9u8, - 93u8, - 236u8, - 61u8, - 185u8, - 204u8, - 245u8, - 234u8, - 218u8, - 213u8, - 40u8, - 154u8, - 29u8, - 244u8, - 19u8, - 207u8, - 172u8, - 142u8, - 221u8, - 38u8, - 70u8, - 39u8, - 10u8, - ], - ) - } - pub fn bond_extra_other( - &self, - member: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - extra: runtime_types::pallet_nomination_pools::BondExtra< - ::core::primitive::u128, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "bond_extra_other", - types::BondExtraOther { - member, - extra, - }, - [ - 32u8, - 200u8, - 198u8, - 128u8, - 30u8, - 21u8, - 39u8, - 98u8, - 49u8, - 4u8, - 96u8, - 146u8, - 169u8, - 179u8, - 109u8, - 253u8, - 168u8, - 212u8, - 206u8, - 161u8, - 116u8, - 191u8, - 110u8, - 189u8, - 63u8, - 252u8, - 39u8, - 107u8, - 98u8, - 25u8, - 137u8, - 0u8, - ], - ) - } - pub fn set_claim_permission( - &self, - permission: runtime_types::pallet_nomination_pools::ClaimPermission, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "set_claim_permission", - types::SetClaimPermission { - permission, - }, - [ - 36u8, - 137u8, - 193u8, - 200u8, - 57u8, - 46u8, - 87u8, - 236u8, - 180u8, - 170u8, - 90u8, - 99u8, - 137u8, - 123u8, - 99u8, - 197u8, - 113u8, - 119u8, - 72u8, - 153u8, - 207u8, - 189u8, - 69u8, - 89u8, - 225u8, - 115u8, - 45u8, - 32u8, - 216u8, - 43u8, - 92u8, - 135u8, - ], - ) - } - pub fn claim_payout_other( - &self, - other: ::subxt::utils::AccountId32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "claim_payout_other", - types::ClaimPayoutOther { other }, - [ - 202u8, - 130u8, - 122u8, - 10u8, - 159u8, - 181u8, - 124u8, - 215u8, - 23u8, - 85u8, - 234u8, - 178u8, - 169u8, - 41u8, - 204u8, - 226u8, - 195u8, - 69u8, - 168u8, - 88u8, - 58u8, - 15u8, - 3u8, - 227u8, - 180u8, - 183u8, - 62u8, - 224u8, - 39u8, - 218u8, - 75u8, - 166u8, - ], - ) - } - pub fn set_commission( - &self, - pool_id: ::core::primitive::u32, - new_commission: ::core::option::Option< - ( - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::utils::AccountId32, - ), - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "set_commission", - types::SetCommission { - pool_id, - new_commission, - }, - [ - 77u8, - 139u8, - 221u8, - 210u8, - 51u8, - 57u8, - 243u8, - 96u8, - 25u8, - 0u8, - 42u8, - 81u8, - 80u8, - 7u8, - 145u8, - 28u8, - 17u8, - 44u8, - 123u8, - 28u8, - 130u8, - 194u8, - 153u8, - 139u8, - 222u8, - 166u8, - 169u8, - 184u8, - 46u8, - 178u8, - 236u8, - 246u8, - ], - ) - } - pub fn set_commission_max( - &self, - pool_id: ::core::primitive::u32, - max_commission: runtime_types::sp_arithmetic::per_things::Perbill, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "set_commission_max", - types::SetCommissionMax { - pool_id, - max_commission, - }, - [ - 198u8, - 127u8, - 255u8, - 230u8, - 96u8, - 142u8, - 9u8, - 220u8, - 204u8, - 82u8, - 192u8, - 76u8, - 140u8, - 52u8, - 94u8, - 80u8, - 153u8, - 30u8, - 162u8, - 21u8, - 71u8, - 31u8, - 218u8, - 160u8, - 254u8, - 180u8, - 160u8, - 219u8, - 163u8, - 30u8, - 193u8, - 6u8, - ], - ) - } - pub fn set_commission_change_rate( - &self, - pool_id: ::core::primitive::u32, - change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "set_commission_change_rate", - types::SetCommissionChangeRate { - pool_id, - change_rate, - }, - [ - 20u8, - 200u8, - 249u8, - 176u8, - 168u8, - 210u8, - 180u8, - 77u8, - 93u8, - 28u8, - 0u8, - 79u8, - 29u8, - 172u8, - 176u8, - 38u8, - 178u8, - 13u8, - 99u8, - 240u8, - 210u8, - 108u8, - 245u8, - 95u8, - 197u8, - 235u8, - 143u8, - 239u8, - 190u8, - 245u8, - 63u8, - 108u8, - ], - ) - } - pub fn claim_commission( - &self, - pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "claim_commission", - types::ClaimCommission { pool_id }, - [ - 51u8, - 64u8, - 163u8, - 230u8, - 2u8, - 119u8, - 68u8, - 5u8, - 154u8, - 4u8, - 84u8, - 149u8, - 9u8, - 195u8, - 173u8, - 37u8, - 98u8, - 48u8, - 188u8, - 65u8, - 81u8, - 11u8, - 64u8, - 254u8, - 126u8, - 62u8, - 29u8, - 204u8, - 92u8, - 230u8, - 240u8, - 91u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_nomination_pools::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Created { - pub depositor: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Created { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Created { - depositor: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Created::depositor`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Created::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Created { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.depositor), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.depositor, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Created {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Created { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Created; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Created { - depositor: { - let val = *vals - .get(&Some("depositor")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "depositor".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("depositor"))? - }, - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Created { - depositor: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("depositor"))? - }, - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Created { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Created { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Created { depositor, pool_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("depositor"), - depositor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Created { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Created { depositor, pool_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("depositor"), - depositor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Created { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Created", - "depositor", - &self.depositor, - "pool_id", - &&self.pool_id, - ) - } - } - impl ::subxt::events::StaticEvent for Created { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Created"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Bonded { - pub member: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, - pub bonded: ::core::primitive::u128, - pub joined: ::core::primitive::bool, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Bonded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Bonded { - member: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bonded::member`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bonded::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - bonded: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bonded::bonded`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - joined: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bonded::joined`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Bonded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.member), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.bonded), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.joined), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.member, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.bonded, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.joined, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Bonded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Bonded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Bonded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Bonded { - member: { - let val = *vals - .get(&Some("member")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - bonded: { - let val = *vals - .get(&Some("bonded")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bonded".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bonded"))? - }, - joined: { - let val = *vals - .get(&Some("joined")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "joined".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("joined"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(Bonded { - member: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - bonded: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bonded"))? - }, - joined: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("joined"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Bonded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Bonded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Bonded { member, pool_id, bonded, joined } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bonded"), - bonded as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("joined"), - joined as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Bonded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Bonded { member, pool_id, bonded, joined } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bonded"), - bonded as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("joined"), - joined as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Bonded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Bonded", - "member", - &self.member, - "pool_id", - &self.pool_id, - "bonded", - &self.bonded, - "joined", - &&self.joined, - ) - } - } - impl ::subxt::events::StaticEvent for Bonded { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Bonded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PaidOut { - pub member: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, - pub payout: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PaidOut { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(PaidOut { - member: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PaidOut::member`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PaidOut::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - payout: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PaidOut::payout`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PaidOut { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.member), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.payout), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.member, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.payout, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PaidOut {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PaidOut { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PaidOut; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PaidOut { - member: { - let val = *vals - .get(&Some("member")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - payout: { - let val = *vals - .get(&Some("payout")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "payout".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(PaidOut { - member: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - payout: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for PaidOut { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PaidOut { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PaidOut { member, pool_id, payout } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("payout"), - payout as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PaidOut { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PaidOut { member, pool_id, payout } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("payout"), - payout as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PaidOut { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "PaidOut", - "member", - &self.member, - "pool_id", - &self.pool_id, - "payout", - &&self.payout, - ) - } - } - impl ::subxt::events::StaticEvent for PaidOut { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "PaidOut"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Unbonded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Unbonded { - member: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unbonded::member`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unbonded::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - balance: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unbonded::balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - points: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unbonded::points`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - era: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unbonded::era`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Unbonded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.member), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.balance), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.points), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.era), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.member, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.balance, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.points, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.era, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Unbonded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Unbonded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Unbonded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Unbonded { - member: { - let val = *vals - .get(&Some("member")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - balance: { - let val = *vals - .get(&Some("balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "balance".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - points: { - let val = *vals - .get(&Some("points")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "points".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("points"))? - }, - era: { - let val = *vals - .get(&Some("era")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "era".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(Unbonded { - member: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - points: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("points"))? - }, - era: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Unbonded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Unbonded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unbonded { member, pool_id, balance, points, era } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("points"), - points as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("era"), - era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Unbonded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unbonded { member, pool_id, balance, points, era } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("points"), - points as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("era"), - era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Unbonded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "Unbonded", - "member", - &self.member, - "pool_id", - &self.pool_id, - "balance", - &self.balance, - "points", - &self.points, - "era", - &&self.era, - ) - } - } - impl ::subxt::events::StaticEvent for Unbonded { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Unbonded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Withdrawn { - pub member: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, - pub balance: ::core::primitive::u128, - pub points: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Withdrawn { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Withdrawn { - member: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Withdrawn::member`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Withdrawn::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - balance: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Withdrawn::balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - points: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Withdrawn::points`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Withdrawn { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.member), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.balance), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.points), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.member, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.balance, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.points, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Withdrawn {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Withdrawn { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Withdrawn; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Withdrawn { - member: { - let val = *vals - .get(&Some("member")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - balance: { - let val = *vals - .get(&Some("balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "balance".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - points: { - let val = *vals - .get(&Some("points")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "points".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("points"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(Withdrawn { - member: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - points: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("points"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Withdrawn { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Withdrawn { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Withdrawn { member, pool_id, balance, points } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("points"), - points as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Withdrawn { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Withdrawn { member, pool_id, balance, points } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("points"), - points as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Withdrawn { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Withdrawn", - "member", - &self.member, - "pool_id", - &self.pool_id, - "balance", - &self.balance, - "points", - &&self.points, - ) - } - } - impl ::subxt::events::StaticEvent for Withdrawn { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Withdrawn"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Destroyed { - pub pool_id: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Destroyed { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.pool_id - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - Destroyed, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Destroyed { pool_id: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Destroyed { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> Destroyed { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Destroyed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Destroyed { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Destroyed::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Destroyed { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.pool_id) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.pool_id, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.pool_id) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.pool_id, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Destroyed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Destroyed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Destroyed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Destroyed { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Destroyed { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Destroyed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Destroyed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Destroyed { pool_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Destroyed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Destroyed { pool_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Destroyed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Destroyed", - "pool_id", - &&self.pool_id, - ) - } - } - impl ::subxt::events::StaticEvent for Destroyed { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Destroyed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct StateChanged { - pub pool_id: ::core::primitive::u32, - pub new_state: runtime_types::pallet_nomination_pools::PoolState, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for StateChanged { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(StateChanged { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `StateChanged::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_state: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `StateChanged::new_state`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for StateChanged { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new_state), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.new_state, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for StateChanged {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for StateChanged { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = StateChanged; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(StateChanged { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - new_state: { - let val = *vals - .get(&Some("new_state")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_state".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_state"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(StateChanged { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - new_state: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_state"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for StateChanged { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for StateChanged { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let StateChanged { pool_id, new_state } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_state"), - new_state as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for StateChanged { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let StateChanged { pool_id, new_state } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_state"), - new_state as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for StateChanged { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "StateChanged", - "pool_id", - &self.pool_id, - "new_state", - &&self.new_state, - ) - } - } - impl ::subxt::events::StaticEvent for StateChanged { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "StateChanged"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MemberRemoved { - pub pool_id: ::core::primitive::u32, - pub member: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MemberRemoved { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MemberRemoved { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MemberRemoved::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - member: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MemberRemoved::member`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MemberRemoved { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.member), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.member, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MemberRemoved {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MemberRemoved { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MemberRemoved; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MemberRemoved { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - member: { - let val = *vals - .get(&Some("member")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(MemberRemoved { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - member: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for MemberRemoved { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MemberRemoved { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MemberRemoved { pool_id, member } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MemberRemoved { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MemberRemoved { pool_id, member } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MemberRemoved { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MemberRemoved", - "pool_id", - &self.pool_id, - "member", - &&self.member, - ) - } - } - impl ::subxt::events::StaticEvent for MemberRemoved { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "MemberRemoved"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RolesUpdated { - pub root: ::core::option::Option<::subxt::utils::AccountId32>, - pub bouncer: ::core::option::Option<::subxt::utils::AccountId32>, - pub nominator: ::core::option::Option<::subxt::utils::AccountId32>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RolesUpdated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(RolesUpdated { - root: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RolesUpdated::root`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - bouncer: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RolesUpdated::bouncer`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - nominator: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RolesUpdated::nominator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RolesUpdated { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.root), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.bouncer), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.nominator), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.root, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.bouncer, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.nominator, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RolesUpdated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RolesUpdated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RolesUpdated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RolesUpdated { - root: { - let val = *vals - .get(&Some("root")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "root".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("root"))? - }, - bouncer: { - let val = *vals - .get(&Some("bouncer")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bouncer".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bouncer"))? - }, - nominator: { - let val = *vals - .get(&Some("nominator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nominator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(RolesUpdated { - root: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("root"))? - }, - bouncer: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bouncer"))? - }, - nominator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for RolesUpdated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RolesUpdated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RolesUpdated { root, bouncer, nominator } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("root"), - root as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bouncer"), - bouncer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nominator"), - nominator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RolesUpdated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RolesUpdated { root, bouncer, nominator } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("root"), - root as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bouncer"), - bouncer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nominator"), - nominator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RolesUpdated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "RolesUpdated", - "root", - &self.root, - "bouncer", - &self.bouncer, - "nominator", - &&self.nominator, - ) - } - } - impl ::subxt::events::StaticEvent for RolesUpdated { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "RolesUpdated"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PoolSlashed { - pub pool_id: ::core::primitive::u32, - pub balance: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PoolSlashed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(PoolSlashed { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PoolSlashed::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - balance: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PoolSlashed::balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PoolSlashed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.balance), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.balance, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PoolSlashed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PoolSlashed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PoolSlashed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PoolSlashed { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - balance: { - let val = *vals - .get(&Some("balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "balance".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(PoolSlashed { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for PoolSlashed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PoolSlashed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PoolSlashed { pool_id, balance } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PoolSlashed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PoolSlashed { pool_id, balance } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PoolSlashed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PoolSlashed", - "pool_id", - &self.pool_id, - "balance", - &&self.balance, - ) - } - } - impl ::subxt::events::StaticEvent for PoolSlashed { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "PoolSlashed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnbondingPoolSlashed { - pub pool_id: ::core::primitive::u32, - pub era: ::core::primitive::u32, - pub balance: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for UnbondingPoolSlashed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(UnbondingPoolSlashed { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnbondingPoolSlashed::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - era: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnbondingPoolSlashed::era`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - balance: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnbondingPoolSlashed::balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for UnbondingPoolSlashed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.era), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.balance), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.era, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.balance, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for UnbondingPoolSlashed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for UnbondingPoolSlashed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UnbondingPoolSlashed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(UnbondingPoolSlashed { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - era: { - let val = *vals - .get(&Some("era")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "era".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - balance: { - let val = *vals - .get(&Some("balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "balance".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(UnbondingPoolSlashed { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - era: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for UnbondingPoolSlashed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for UnbondingPoolSlashed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnbondingPoolSlashed { pool_id, era, balance } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("era"), - era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for UnbondingPoolSlashed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnbondingPoolSlashed { pool_id, era, balance } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("era"), - era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for UnbondingPoolSlashed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "UnbondingPoolSlashed", - "pool_id", - &self.pool_id, - "era", - &self.era, - "balance", - &&self.balance, - ) - } - } - impl ::subxt::events::StaticEvent for UnbondingPoolSlashed { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "UnbondingPoolSlashed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PoolCommissionUpdated { - pub pool_id: ::core::primitive::u32, - pub current: ::core::option::Option< - ( - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::utils::AccountId32, - ), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PoolCommissionUpdated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(PoolCommissionUpdated { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PoolCommissionUpdated::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - current: { - let __codec_res_edqy = <::core::option::Option< - ( - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::utils::AccountId32, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PoolCommissionUpdated::current`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PoolCommissionUpdated { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.current), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.current, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PoolCommissionUpdated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for PoolCommissionUpdated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PoolCommissionUpdated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PoolCommissionUpdated { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - current: { - let val = *vals - .get(&Some("current")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "current".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("current"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(PoolCommissionUpdated { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - current: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("current"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PoolCommissionUpdated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PoolCommissionUpdated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PoolCommissionUpdated { pool_id, current } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("current"), - current as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for PoolCommissionUpdated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PoolCommissionUpdated { pool_id, current } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("current"), - current as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PoolCommissionUpdated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PoolCommissionUpdated", - "pool_id", - &self.pool_id, - "current", - &&self.current, - ) - } - } - impl ::subxt::events::StaticEvent for PoolCommissionUpdated { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "PoolCommissionUpdated"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PoolMaxCommissionUpdated { - pub pool_id: ::core::primitive::u32, - pub max_commission: runtime_types::sp_arithmetic::per_things::Perbill, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PoolMaxCommissionUpdated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(PoolMaxCommissionUpdated { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `PoolMaxCommissionUpdated::pool_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_commission: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `PoolMaxCommissionUpdated::max_commission`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PoolMaxCommissionUpdated { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_commission), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_commission, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PoolMaxCommissionUpdated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for PoolMaxCommissionUpdated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PoolMaxCommissionUpdated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PoolMaxCommissionUpdated { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - max_commission: { - let val = *vals - .get(&Some("max_commission")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_commission".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_commission"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(PoolMaxCommissionUpdated { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - max_commission: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_commission"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PoolMaxCommissionUpdated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for PoolMaxCommissionUpdated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PoolMaxCommissionUpdated { pool_id, max_commission } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_commission"), - max_commission - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for PoolMaxCommissionUpdated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PoolMaxCommissionUpdated { pool_id, max_commission } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_commission"), - max_commission - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PoolMaxCommissionUpdated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PoolMaxCommissionUpdated", - "pool_id", - &self.pool_id, - "max_commission", - &&self.max_commission, - ) - } - } - impl ::subxt::events::StaticEvent for PoolMaxCommissionUpdated { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "PoolMaxCommissionUpdated"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PoolCommissionChangeRateUpdated { - pub pool_id: ::core::primitive::u32, - pub change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< - ::core::primitive::u32, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode - for PoolCommissionChangeRateUpdated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(PoolCommissionChangeRateUpdated { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `PoolCommissionChangeRateUpdated::pool_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - change_rate: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `PoolCommissionChangeRateUpdated::change_rate`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode - for PoolCommissionChangeRateUpdated { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.change_rate), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.change_rate, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for PoolCommissionChangeRateUpdated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for PoolCommissionChangeRateUpdated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PoolCommissionChangeRateUpdated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PoolCommissionChangeRateUpdated { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - change_rate: { - let val = *vals - .get(&Some("change_rate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "change_rate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("change_rate"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(PoolCommissionChangeRateUpdated { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - change_rate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("change_rate"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PoolCommissionChangeRateUpdated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for PoolCommissionChangeRateUpdated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PoolCommissionChangeRateUpdated { pool_id, change_rate } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("change_rate"), - change_rate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for PoolCommissionChangeRateUpdated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PoolCommissionChangeRateUpdated { pool_id, change_rate } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("change_rate"), - change_rate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PoolCommissionChangeRateUpdated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PoolCommissionChangeRateUpdated", - "pool_id", - &self.pool_id, - "change_rate", - &&self.change_rate, - ) - } - } - impl ::subxt::events::StaticEvent for PoolCommissionChangeRateUpdated { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "PoolCommissionChangeRateUpdated"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PoolCommissionClaimed { - pub pool_id: ::core::primitive::u32, - pub commission: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PoolCommissionClaimed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(PoolCommissionClaimed { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PoolCommissionClaimed::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - commission: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `PoolCommissionClaimed::commission`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PoolCommissionClaimed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.commission), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.commission, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PoolCommissionClaimed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for PoolCommissionClaimed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PoolCommissionClaimed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PoolCommissionClaimed { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - commission: { - let val = *vals - .get(&Some("commission")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "commission".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("commission"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(PoolCommissionClaimed { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - commission: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("commission"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PoolCommissionClaimed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PoolCommissionClaimed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PoolCommissionClaimed { pool_id, commission } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("commission"), - commission as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for PoolCommissionClaimed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PoolCommissionClaimed { pool_id, commission } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("commission"), - commission as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PoolCommissionClaimed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PoolCommissionClaimed", - "pool_id", - &self.pool_id, - "commission", - &&self.commission, - ) - } - } - impl ::subxt::events::StaticEvent for PoolCommissionClaimed { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "PoolCommissionClaimed"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn min_join_bond( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "MinJoinBond", - ::alloc::vec::Vec::new(), - [ - 64u8, - 180u8, - 71u8, - 185u8, - 81u8, - 46u8, - 155u8, - 26u8, - 251u8, - 84u8, - 108u8, - 80u8, - 128u8, - 44u8, - 163u8, - 118u8, - 107u8, - 79u8, - 250u8, - 211u8, - 194u8, - 71u8, - 87u8, - 16u8, - 247u8, - 9u8, - 76u8, - 95u8, - 103u8, - 227u8, - 180u8, - 231u8, - ], - ) - } - pub fn min_create_bond( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "MinCreateBond", - ::alloc::vec::Vec::new(), - [ - 210u8, - 67u8, - 92u8, - 230u8, - 231u8, - 105u8, - 54u8, - 249u8, - 154u8, - 192u8, - 29u8, - 217u8, - 233u8, - 79u8, - 170u8, - 126u8, - 133u8, - 98u8, - 253u8, - 153u8, - 248u8, - 189u8, - 63u8, - 107u8, - 170u8, - 224u8, - 12u8, - 42u8, - 198u8, - 185u8, - 85u8, - 46u8, - ], - ) - } - pub fn max_pools( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "MaxPools", - ::alloc::vec::Vec::new(), - [ - 230u8, - 184u8, - 242u8, - 91u8, - 118u8, - 111u8, - 90u8, - 204u8, - 136u8, - 61u8, - 228u8, - 50u8, - 212u8, - 40u8, - 83u8, - 49u8, - 121u8, - 161u8, - 245u8, - 80u8, - 46u8, - 184u8, - 105u8, - 134u8, - 249u8, - 225u8, - 39u8, - 3u8, - 123u8, - 137u8, - 156u8, - 240u8, - ], - ) - } - pub fn max_pool_members( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "MaxPoolMembers", - ::alloc::vec::Vec::new(), - [ - 210u8, - 222u8, - 181u8, - 146u8, - 137u8, - 200u8, - 71u8, - 196u8, - 74u8, - 38u8, - 36u8, - 122u8, - 187u8, - 164u8, - 218u8, - 116u8, - 216u8, - 143u8, - 182u8, - 15u8, - 23u8, - 124u8, - 57u8, - 121u8, - 81u8, - 151u8, - 8u8, - 247u8, - 80u8, - 136u8, - 115u8, - 2u8, - ], - ) - } - pub fn max_pool_members_per_pool( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "MaxPoolMembersPerPool", - ::alloc::vec::Vec::new(), - [ - 250u8, - 255u8, - 136u8, - 223u8, - 61u8, - 119u8, - 117u8, - 240u8, - 68u8, - 114u8, - 55u8, - 1u8, - 176u8, - 120u8, - 143u8, - 48u8, - 232u8, - 125u8, - 218u8, - 105u8, - 28u8, - 230u8, - 253u8, - 36u8, - 9u8, - 44u8, - 129u8, - 225u8, - 147u8, - 33u8, - 181u8, - 68u8, - ], - ) - } - pub fn global_max_commission( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "GlobalMaxCommission", - ::alloc::vec::Vec::new(), - [ - 2u8, - 112u8, - 8u8, - 116u8, - 114u8, - 97u8, - 250u8, - 106u8, - 170u8, - 215u8, - 218u8, - 217u8, - 80u8, - 235u8, - 149u8, - 81u8, - 85u8, - 185u8, - 201u8, - 127u8, - 107u8, - 251u8, - 191u8, - 231u8, - 142u8, - 74u8, - 8u8, - 70u8, - 151u8, - 238u8, - 117u8, - 173u8, - ], - ) - } - pub fn pool_members_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::PoolMember, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "PoolMembers", - ::alloc::vec::Vec::new(), - [ - 71u8, - 14u8, - 198u8, - 220u8, - 13u8, - 117u8, - 189u8, - 187u8, - 123u8, - 105u8, - 247u8, - 41u8, - 154u8, - 176u8, - 134u8, - 226u8, - 195u8, - 136u8, - 193u8, - 6u8, - 134u8, - 131u8, - 105u8, - 80u8, - 140u8, - 160u8, - 20u8, - 80u8, - 179u8, - 187u8, - 151u8, - 47u8, - ], - ) - } - pub fn pool_members( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::PoolMember, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "PoolMembers", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 71u8, - 14u8, - 198u8, - 220u8, - 13u8, - 117u8, - 189u8, - 187u8, - 123u8, - 105u8, - 247u8, - 41u8, - 154u8, - 176u8, - 134u8, - 226u8, - 195u8, - 136u8, - 193u8, - 6u8, - 134u8, - 131u8, - 105u8, - 80u8, - 140u8, - 160u8, - 20u8, - 80u8, - 179u8, - 187u8, - 151u8, - 47u8, - ], - ) - } - pub fn counter_for_pool_members( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "CounterForPoolMembers", - ::alloc::vec::Vec::new(), - [ - 165u8, - 158u8, - 130u8, - 19u8, - 106u8, - 227u8, - 134u8, - 73u8, - 36u8, - 237u8, - 103u8, - 146u8, - 198u8, - 68u8, - 219u8, - 186u8, - 134u8, - 224u8, - 89u8, - 251u8, - 200u8, - 46u8, - 87u8, - 232u8, - 53u8, - 152u8, - 13u8, - 10u8, - 105u8, - 49u8, - 150u8, - 212u8, - ], - ) - } - pub fn bonded_pools_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::BondedPoolInner, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "BondedPools", - ::alloc::vec::Vec::new(), - [ - 1u8, - 3u8, - 32u8, - 159u8, - 147u8, - 134u8, - 43u8, - 51u8, - 61u8, - 157u8, - 15u8, - 216u8, - 170u8, - 1u8, - 170u8, - 75u8, - 243u8, - 25u8, - 103u8, - 237u8, - 89u8, - 90u8, - 20u8, - 233u8, - 67u8, - 3u8, - 116u8, - 6u8, - 184u8, - 112u8, - 118u8, - 232u8, - ], - ) - } - pub fn bonded_pools( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::BondedPoolInner, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "BondedPools", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 1u8, - 3u8, - 32u8, - 159u8, - 147u8, - 134u8, - 43u8, - 51u8, - 61u8, - 157u8, - 15u8, - 216u8, - 170u8, - 1u8, - 170u8, - 75u8, - 243u8, - 25u8, - 103u8, - 237u8, - 89u8, - 90u8, - 20u8, - 233u8, - 67u8, - 3u8, - 116u8, - 6u8, - 184u8, - 112u8, - 118u8, - 232u8, - ], - ) - } - pub fn counter_for_bonded_pools( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "CounterForBondedPools", - ::alloc::vec::Vec::new(), - [ - 198u8, - 6u8, - 213u8, - 92u8, - 4u8, - 114u8, - 164u8, - 244u8, - 51u8, - 55u8, - 157u8, - 20u8, - 224u8, - 183u8, - 40u8, - 236u8, - 115u8, - 86u8, - 171u8, - 207u8, - 31u8, - 111u8, - 0u8, - 210u8, - 48u8, - 198u8, - 243u8, - 153u8, - 5u8, - 216u8, - 107u8, - 113u8, - ], - ) - } - pub fn reward_pools_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::RewardPool, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "RewardPools", - ::alloc::vec::Vec::new(), - [ - 9u8, - 12u8, - 53u8, - 236u8, - 133u8, - 154u8, - 71u8, - 150u8, - 220u8, - 31u8, - 130u8, - 126u8, - 208u8, - 240u8, - 214u8, - 66u8, - 16u8, - 43u8, - 202u8, - 222u8, - 94u8, - 136u8, - 76u8, - 60u8, - 174u8, - 197u8, - 130u8, - 138u8, - 253u8, - 239u8, - 89u8, - 46u8, - ], - ) - } - pub fn reward_pools( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::RewardPool, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "RewardPools", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 9u8, - 12u8, - 53u8, - 236u8, - 133u8, - 154u8, - 71u8, - 150u8, - 220u8, - 31u8, - 130u8, - 126u8, - 208u8, - 240u8, - 214u8, - 66u8, - 16u8, - 43u8, - 202u8, - 222u8, - 94u8, - 136u8, - 76u8, - 60u8, - 174u8, - 197u8, - 130u8, - 138u8, - 253u8, - 239u8, - 89u8, - 46u8, - ], - ) - } - pub fn counter_for_reward_pools( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "CounterForRewardPools", - ::alloc::vec::Vec::new(), - [ - 218u8, - 186u8, - 28u8, - 97u8, - 205u8, - 249u8, - 187u8, - 10u8, - 127u8, - 190u8, - 213u8, - 152u8, - 103u8, - 20u8, - 157u8, - 183u8, - 86u8, - 104u8, - 186u8, - 236u8, - 84u8, - 159u8, - 117u8, - 78u8, - 5u8, - 242u8, - 193u8, - 59u8, - 112u8, - 200u8, - 34u8, - 166u8, - ], - ) - } - pub fn sub_pools_storage_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::SubPools, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "SubPoolsStorage", - ::alloc::vec::Vec::new(), - [ - 43u8, - 35u8, - 94u8, - 197u8, - 201u8, - 86u8, - 21u8, - 118u8, - 230u8, - 10u8, - 66u8, - 180u8, - 104u8, - 146u8, - 250u8, - 207u8, - 159u8, - 153u8, - 203u8, - 58u8, - 20u8, - 247u8, - 102u8, - 155u8, - 47u8, - 58u8, - 136u8, - 150u8, - 167u8, - 83u8, - 81u8, - 44u8, - ], - ) - } - pub fn sub_pools_storage( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::SubPools, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "SubPoolsStorage", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 43u8, - 35u8, - 94u8, - 197u8, - 201u8, - 86u8, - 21u8, - 118u8, - 230u8, - 10u8, - 66u8, - 180u8, - 104u8, - 146u8, - 250u8, - 207u8, - 159u8, - 153u8, - 203u8, - 58u8, - 20u8, - 247u8, - 102u8, - 155u8, - 47u8, - 58u8, - 136u8, - 150u8, - 167u8, - 83u8, - 81u8, - 44u8, - ], - ) - } - pub fn counter_for_sub_pools_storage( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "CounterForSubPoolsStorage", - ::alloc::vec::Vec::new(), - [ - 137u8, - 162u8, - 32u8, - 44u8, - 163u8, - 30u8, - 54u8, - 158u8, - 169u8, - 118u8, - 196u8, - 101u8, - 78u8, - 28u8, - 184u8, - 78u8, - 185u8, - 225u8, - 226u8, - 207u8, - 14u8, - 119u8, - 0u8, - 116u8, - 140u8, - 141u8, - 116u8, - 106u8, - 71u8, - 161u8, - 200u8, - 228u8, - ], - ) - } - pub fn metadata_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "Metadata", - ::alloc::vec::Vec::new(), - [ - 10u8, - 171u8, - 251u8, - 5u8, - 72u8, - 74u8, - 86u8, - 144u8, - 59u8, - 67u8, - 92u8, - 111u8, - 217u8, - 111u8, - 175u8, - 107u8, - 119u8, - 206u8, - 199u8, - 78u8, - 182u8, - 84u8, - 12u8, - 102u8, - 10u8, - 124u8, - 103u8, - 9u8, - 86u8, - 199u8, - 233u8, - 54u8, - ], - ) - } - pub fn metadata( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "Metadata", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 10u8, - 171u8, - 251u8, - 5u8, - 72u8, - 74u8, - 86u8, - 144u8, - 59u8, - 67u8, - 92u8, - 111u8, - 217u8, - 111u8, - 175u8, - 107u8, - 119u8, - 206u8, - 199u8, - 78u8, - 182u8, - 84u8, - 12u8, - 102u8, - 10u8, - 124u8, - 103u8, - 9u8, - 86u8, - 199u8, - 233u8, - 54u8, - ], - ) - } - pub fn counter_for_metadata( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "CounterForMetadata", - ::alloc::vec::Vec::new(), - [ - 49u8, - 76u8, - 175u8, - 236u8, - 99u8, - 120u8, - 156u8, - 116u8, - 153u8, - 173u8, - 10u8, - 102u8, - 194u8, - 139u8, - 25u8, - 149u8, - 109u8, - 195u8, - 150u8, - 21u8, - 43u8, - 24u8, - 196u8, - 180u8, - 231u8, - 101u8, - 69u8, - 98u8, - 82u8, - 159u8, - 183u8, - 174u8, - ], - ) - } - pub fn last_pool_id( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "LastPoolId", - ::alloc::vec::Vec::new(), - [ - 178u8, - 198u8, - 245u8, - 157u8, - 176u8, - 45u8, - 214u8, - 86u8, - 73u8, - 154u8, - 217u8, - 39u8, - 191u8, - 53u8, - 233u8, - 145u8, - 57u8, - 100u8, - 31u8, - 13u8, - 202u8, - 122u8, - 115u8, - 16u8, - 205u8, - 69u8, - 157u8, - 250u8, - 216u8, - 180u8, - 113u8, - 30u8, - ], - ) - } - pub fn reverse_pool_id_lookup_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "ReversePoolIdLookup", - ::alloc::vec::Vec::new(), - [ - 76u8, - 76u8, - 150u8, - 33u8, - 64u8, - 81u8, - 90u8, - 75u8, - 212u8, - 221u8, - 59u8, - 83u8, - 178u8, - 45u8, - 86u8, - 206u8, - 196u8, - 221u8, - 117u8, - 94u8, - 229u8, - 160u8, - 52u8, - 54u8, - 11u8, - 64u8, - 0u8, - 103u8, - 85u8, - 86u8, - 5u8, - 71u8, - ], - ) - } - pub fn reverse_pool_id_lookup( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "ReversePoolIdLookup", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 76u8, - 76u8, - 150u8, - 33u8, - 64u8, - 81u8, - 90u8, - 75u8, - 212u8, - 221u8, - 59u8, - 83u8, - 178u8, - 45u8, - 86u8, - 206u8, - 196u8, - 221u8, - 117u8, - 94u8, - 229u8, - 160u8, - 52u8, - 54u8, - 11u8, - 64u8, - 0u8, - 103u8, - 85u8, - 86u8, - 5u8, - 71u8, - ], - ) - } - pub fn counter_for_reverse_pool_id_lookup( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "CounterForReversePoolIdLookup", - ::alloc::vec::Vec::new(), - [ - 135u8, - 72u8, - 203u8, - 197u8, - 101u8, - 135u8, - 114u8, - 202u8, - 122u8, - 231u8, - 128u8, - 17u8, - 81u8, - 70u8, - 22u8, - 146u8, - 100u8, - 138u8, - 16u8, - 74u8, - 31u8, - 250u8, - 110u8, - 184u8, - 250u8, - 75u8, - 249u8, - 71u8, - 171u8, - 77u8, - 95u8, - 251u8, - ], - ) - } - pub fn claim_permissions_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::ClaimPermission, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "ClaimPermissions", - ::alloc::vec::Vec::new(), - [ - 98u8, - 241u8, - 185u8, - 102u8, - 61u8, - 53u8, - 215u8, - 105u8, - 2u8, - 148u8, - 197u8, - 17u8, - 107u8, - 253u8, - 74u8, - 159u8, - 14u8, - 30u8, - 213u8, - 38u8, - 35u8, - 163u8, - 249u8, - 19u8, - 140u8, - 201u8, - 182u8, - 106u8, - 0u8, - 21u8, - 102u8, - 15u8, - ], - ) - } - pub fn claim_permissions( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_nomination_pools::ClaimPermission, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "NominationPools", - "ClaimPermissions", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 98u8, - 241u8, - 185u8, - 102u8, - 61u8, - 53u8, - 215u8, - 105u8, - 2u8, - 148u8, - 197u8, - 17u8, - 107u8, - 253u8, - 74u8, - 159u8, - 14u8, - 30u8, - 213u8, - 38u8, - 35u8, - 163u8, - 249u8, - 19u8, - 140u8, - 201u8, - 182u8, - 106u8, - 0u8, - 21u8, - 102u8, - 15u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn pallet_id( - &self, - ) -> ::subxt::constants::Address< - runtime_types::frame_support::PalletId, - > { - ::subxt::constants::Address::new_static( - "NominationPools", - "PalletId", - [ - 56u8, - 243u8, - 53u8, - 83u8, - 154u8, - 179u8, - 170u8, - 80u8, - 133u8, - 173u8, - 61u8, - 161u8, - 47u8, - 225u8, - 146u8, - 21u8, - 50u8, - 229u8, - 248u8, - 27u8, - 104u8, - 58u8, - 129u8, - 197u8, - 102u8, - 160u8, - 168u8, - 205u8, - 154u8, - 42u8, - 217u8, - 53u8, - ], - ) - } - pub fn max_points_to_balance( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u8> { - ::subxt::constants::Address::new_static( - "NominationPools", - "MaxPointsToBalance", - [ - 141u8, - 130u8, - 11u8, - 35u8, - 226u8, - 114u8, - 92u8, - 179u8, - 168u8, - 110u8, - 28u8, - 91u8, - 221u8, - 64u8, - 4u8, - 148u8, - 201u8, - 193u8, - 185u8, - 66u8, - 226u8, - 114u8, - 97u8, - 79u8, - 62u8, - 212u8, - 202u8, - 114u8, - 237u8, - 228u8, - 183u8, - 165u8, - ], - ) - } - } - } - } - pub mod fast_unstake { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_fast_unstake::pallet::Error; - pub type Call = runtime_types::pallet_fast_unstake::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RegisterFastUnstake; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RegisterFastUnstake { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RegisterFastUnstake) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RegisterFastUnstake { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RegisterFastUnstake {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for RegisterFastUnstake { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RegisterFastUnstake; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(RegisterFastUnstake) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for RegisterFastUnstake { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for RegisterFastUnstake { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RegisterFastUnstake = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for RegisterFastUnstake { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RegisterFastUnstake = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RegisterFastUnstake { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "RegisterFastUnstake") - } - } - impl ::subxt::blocks::StaticExtrinsic for RegisterFastUnstake { - const PALLET: &'static str = "FastUnstake"; - const CALL: &'static str = "register_fast_unstake"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Deregister; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Deregister { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Deregister) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Deregister { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Deregister {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Deregister { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Deregister; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(Deregister) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Deregister { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Deregister { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Deregister = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Deregister { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Deregister = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Deregister { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "Deregister") - } - } - impl ::subxt::blocks::StaticExtrinsic for Deregister { - const PALLET: &'static str = "FastUnstake"; - const CALL: &'static str = "deregister"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Control { - pub eras_to_check: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Control { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.eras_to_check - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - Control, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Control { eras_to_check: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Control { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> Control { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Control { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Control { - eras_to_check: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Control::eras_to_check`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Control { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.eras_to_check) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.eras_to_check, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.eras_to_check) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.eras_to_check, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Control {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Control { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Control; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Control { - eras_to_check: { - let val = *vals - .get(&Some("eras_to_check")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "eras_to_check".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("eras_to_check"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Control { - eras_to_check: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("eras_to_check"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Control { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Control { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Control { eras_to_check } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("eras_to_check"), - eras_to_check - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Control { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Control { eras_to_check } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("eras_to_check"), - eras_to_check - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Control { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Control", - "eras_to_check", - &&self.eras_to_check, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Control { - const PALLET: &'static str = "FastUnstake"; - const CALL: &'static str = "control"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn register_fast_unstake( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "FastUnstake", - "register_fast_unstake", - types::RegisterFastUnstake {}, - [ - 25u8, - 175u8, - 236u8, - 174u8, - 69u8, - 228u8, - 25u8, - 109u8, - 166u8, - 101u8, - 80u8, - 189u8, - 17u8, - 201u8, - 95u8, - 152u8, - 209u8, - 42u8, - 140u8, - 186u8, - 61u8, - 73u8, - 147u8, - 103u8, - 158u8, - 39u8, - 26u8, - 54u8, - 98u8, - 3u8, - 2u8, - 49u8, - ], - ) - } - pub fn deregister(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "FastUnstake", - "deregister", - types::Deregister {}, - [ - 228u8, - 7u8, - 6u8, - 52u8, - 110u8, - 101u8, - 41u8, - 226u8, - 254u8, - 53u8, - 44u8, - 229u8, - 20u8, - 205u8, - 131u8, - 91u8, - 118u8, - 71u8, - 43u8, - 97u8, - 99u8, - 205u8, - 75u8, - 146u8, - 27u8, - 144u8, - 219u8, - 167u8, - 98u8, - 120u8, - 11u8, - 151u8, - ], - ) - } - pub fn control( - &self, - eras_to_check: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "FastUnstake", - "control", - types::Control { eras_to_check }, - [ - 93u8, - 245u8, - 35u8, - 21u8, - 125u8, - 71u8, - 144u8, - 99u8, - 90u8, - 41u8, - 161u8, - 90u8, - 93u8, - 132u8, - 45u8, - 155u8, - 99u8, - 175u8, - 180u8, - 1u8, - 219u8, - 37u8, - 182u8, - 95u8, - 203u8, - 91u8, - 181u8, - 159u8, - 169u8, - 134u8, - 139u8, - 9u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_fast_unstake::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Unstaked { - pub stash: ::subxt::utils::AccountId32, - pub result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Unstaked { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Unstaked { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unstaked::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unstaked::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Unstaked { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.result), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.result, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Unstaked {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Unstaked { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Unstaked; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Unstaked { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Unstaked { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Unstaked { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Unstaked { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unstaked { stash, result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Unstaked { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unstaked { stash, result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Unstaked { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Unstaked", - "stash", - &self.stash, - "result", - &&self.result, - ) - } - } - impl ::subxt::events::StaticEvent for Unstaked { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "Unstaked"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Slashed { - pub stash: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Slashed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Slashed { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Slashed::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Slashed::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Slashed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Slashed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Slashed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Slashed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Slashed { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Slashed { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Slashed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Slashed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Slashed { stash, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Slashed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Slashed { stash, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Slashed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Slashed", - "stash", - &self.stash, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Slashed { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "Slashed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InternalError; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for InternalError { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(InternalError) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for InternalError { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for InternalError {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for InternalError { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = InternalError; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(InternalError) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for InternalError { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for InternalError { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let InternalError = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for InternalError { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let InternalError = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for InternalError { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "InternalError") - } - } - impl ::subxt::events::StaticEvent for InternalError { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "InternalError"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BatchChecked { - pub eras: ::std::vec::Vec<::core::primitive::u32>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BatchChecked { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BatchChecked { - eras: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BatchChecked::eras`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BatchChecked { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.eras) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.eras, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.eras) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.eras, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BatchChecked {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BatchChecked { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BatchChecked; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BatchChecked { - eras: { - let val = *vals - .get(&Some("eras")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "eras".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("eras"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(BatchChecked { - eras: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("eras"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for BatchChecked { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BatchChecked { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BatchChecked { eras } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("eras"), - eras as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BatchChecked { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BatchChecked { eras } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("eras"), - eras as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BatchChecked { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "BatchChecked", - "eras", - &&self.eras, - ) - } - } - impl ::subxt::events::StaticEvent for BatchChecked { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "BatchChecked"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BatchFinished { - pub size: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for BatchFinished { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.size - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - BatchFinished, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(BatchFinished { size: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for BatchFinished { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> BatchFinished { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BatchFinished { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BatchFinished { - size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BatchFinished::size`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BatchFinished { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.size) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.size, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.size) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.size, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BatchFinished {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BatchFinished { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BatchFinished; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BatchFinished { - size: { - let val = *vals - .get(&Some("size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "size".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("size"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(BatchFinished { - size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("size"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for BatchFinished { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BatchFinished { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BatchFinished { size } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("size"), - size as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BatchFinished { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BatchFinished { size } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("size"), - size as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BatchFinished { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "BatchFinished", - "size", - &&self.size, - ) - } - } - 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 { - 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", - ::alloc::vec::Vec::new(), - [ - 15u8, - 207u8, - 39u8, - 233u8, - 50u8, - 252u8, - 32u8, - 127u8, - 77u8, - 94u8, - 170u8, - 209u8, - 72u8, - 222u8, - 77u8, - 171u8, - 175u8, - 204u8, - 191u8, - 25u8, - 15u8, - 104u8, - 52u8, - 129u8, - 42u8, - 199u8, - 77u8, - 44u8, - 11u8, - 242u8, - 234u8, - 6u8, - ], - ) - } - pub fn queue_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "FastUnstake", - "Queue", - ::alloc::vec::Vec::new(), - [ - 72u8, - 219u8, - 212u8, - 99u8, - 189u8, - 234u8, - 57u8, - 32u8, - 80u8, - 130u8, - 178u8, - 101u8, - 71u8, - 186u8, - 106u8, - 129u8, - 135u8, - 165u8, - 225u8, - 112u8, - 82u8, - 4u8, - 215u8, - 104u8, - 107u8, - 192u8, - 118u8, - 238u8, - 70u8, - 205u8, - 205u8, - 148u8, - ], - ) - } - 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::Address::new_static( - "FastUnstake", - "Queue", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 72u8, - 219u8, - 212u8, - 99u8, - 189u8, - 234u8, - 57u8, - 32u8, - 80u8, - 130u8, - 178u8, - 101u8, - 71u8, - 186u8, - 106u8, - 129u8, - 135u8, - 165u8, - 225u8, - 112u8, - 82u8, - 4u8, - 215u8, - 104u8, - 107u8, - 192u8, - 118u8, - 238u8, - 70u8, - 205u8, - 205u8, - 148u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 236u8, - 101u8, - 74u8, - 61u8, - 59u8, - 250u8, - 165u8, - 139u8, - 110u8, - 79u8, - 165u8, - 124u8, - 24u8, - 188u8, - 245u8, - 175u8, - 175u8, - 102u8, - 91u8, - 121u8, - 215u8, - 21u8, - 12u8, - 11u8, - 194u8, - 69u8, - 180u8, - 161u8, - 160u8, - 27u8, - 39u8, - 17u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 231u8, - 147u8, - 37u8, - 154u8, - 97u8, - 151u8, - 16u8, - 240u8, - 87u8, - 38u8, - 218u8, - 127u8, - 68u8, - 131u8, - 2u8, - 19u8, - 46u8, - 68u8, - 232u8, - 148u8, - 197u8, - 73u8, - 129u8, - 102u8, - 60u8, - 19u8, - 200u8, - 77u8, - 74u8, - 31u8, - 251u8, - 27u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn deposit( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "FastUnstake", - "Deposit", - [ - 84u8, - 157u8, - 140u8, - 4u8, - 93u8, - 57u8, - 29u8, - 133u8, - 105u8, - 200u8, - 214u8, - 27u8, - 144u8, - 208u8, - 218u8, - 160u8, - 130u8, - 109u8, - 101u8, - 54u8, - 210u8, - 136u8, - 71u8, - 63u8, - 49u8, - 237u8, - 234u8, - 15u8, - 178u8, - 98u8, - 148u8, - 156u8, - ], - ) - } - } - } - } - pub mod parachains_origin { - use super::root_mod; - use super::runtime_types; - } - pub mod configuration { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::polkadot_runtime_parachains::configuration::pallet::Error; - pub type Call = runtime_types::polkadot_runtime_parachains::configuration::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetValidationUpgradeCooldown { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetValidationUpgradeCooldown { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetValidationUpgradeCooldown, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetValidationUpgradeCooldown { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact, - > for SetValidationUpgradeCooldown { - fn from( - x: ::subxt::ext::codec::Compact< - SetValidationUpgradeCooldown, - >, - ) -> SetValidationUpgradeCooldown { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode - for SetValidationUpgradeCooldown { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetValidationUpgradeCooldown { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetValidationUpgradeCooldown::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode - for SetValidationUpgradeCooldown { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetValidationUpgradeCooldown {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetValidationUpgradeCooldown { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetValidationUpgradeCooldown; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetValidationUpgradeCooldown { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetValidationUpgradeCooldown { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetValidationUpgradeCooldown { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetValidationUpgradeCooldown { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetValidationUpgradeCooldown { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetValidationUpgradeCooldown { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetValidationUpgradeCooldown { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetValidationUpgradeCooldown { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetValidationUpgradeCooldown", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for SetValidationUpgradeCooldown { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_validation_upgrade_cooldown"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetValidationUpgradeDelay { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetValidationUpgradeDelay { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetValidationUpgradeDelay, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetValidationUpgradeDelay { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact, - > for SetValidationUpgradeDelay { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetValidationUpgradeDelay { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetValidationUpgradeDelay { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetValidationUpgradeDelay { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetValidationUpgradeDelay::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetValidationUpgradeDelay { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetValidationUpgradeDelay {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetValidationUpgradeDelay { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetValidationUpgradeDelay; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetValidationUpgradeDelay { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetValidationUpgradeDelay { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetValidationUpgradeDelay { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetValidationUpgradeDelay { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetValidationUpgradeDelay { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetValidationUpgradeDelay { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetValidationUpgradeDelay { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetValidationUpgradeDelay { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetValidationUpgradeDelay", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetValidationUpgradeDelay { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_validation_upgrade_delay"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCodeRetentionPeriod { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetCodeRetentionPeriod { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetCodeRetentionPeriod, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetCodeRetentionPeriod { - new: x, - }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetCodeRetentionPeriod { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetCodeRetentionPeriod { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetCodeRetentionPeriod { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetCodeRetentionPeriod { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetCodeRetentionPeriod::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetCodeRetentionPeriod { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetCodeRetentionPeriod {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetCodeRetentionPeriod { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetCodeRetentionPeriod; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetCodeRetentionPeriod { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetCodeRetentionPeriod { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetCodeRetentionPeriod { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetCodeRetentionPeriod { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetCodeRetentionPeriod { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetCodeRetentionPeriod { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetCodeRetentionPeriod { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetCodeRetentionPeriod { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetCodeRetentionPeriod", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetCodeRetentionPeriod { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_code_retention_period"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxCodeSize { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetMaxCodeSize { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetMaxCodeSize, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxCodeSize { new: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetMaxCodeSize { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetMaxCodeSize { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetMaxCodeSize { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxCodeSize { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMaxCodeSize::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetMaxCodeSize { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetMaxCodeSize {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetMaxCodeSize { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMaxCodeSize; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMaxCodeSize { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetMaxCodeSize { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetMaxCodeSize { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetMaxCodeSize { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxCodeSize { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetMaxCodeSize { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxCodeSize { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMaxCodeSize { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetMaxCodeSize", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetMaxCodeSize { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_max_code_size"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxPovSize { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetMaxPovSize { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetMaxPovSize, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxPovSize { new: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetMaxPovSize { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetMaxPovSize { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetMaxPovSize { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxPovSize { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMaxPovSize::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetMaxPovSize { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetMaxPovSize {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetMaxPovSize { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMaxPovSize; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMaxPovSize { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetMaxPovSize { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetMaxPovSize { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetMaxPovSize { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxPovSize { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetMaxPovSize { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxPovSize { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMaxPovSize { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetMaxPovSize", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetMaxPovSize { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_max_pov_size"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxHeadDataSize { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetMaxHeadDataSize { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetMaxHeadDataSize, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxHeadDataSize { new: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetMaxHeadDataSize { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetMaxHeadDataSize { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetMaxHeadDataSize { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxHeadDataSize { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMaxHeadDataSize::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetMaxHeadDataSize { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetMaxHeadDataSize {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetMaxHeadDataSize { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMaxHeadDataSize; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMaxHeadDataSize { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetMaxHeadDataSize { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetMaxHeadDataSize { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetMaxHeadDataSize { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxHeadDataSize { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetMaxHeadDataSize { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxHeadDataSize { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMaxHeadDataSize { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetMaxHeadDataSize", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetMaxHeadDataSize { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_max_head_data_size"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetParathreadCores { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetParathreadCores { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetParathreadCores, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetParathreadCores { new: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetParathreadCores { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetParathreadCores { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetParathreadCores { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetParathreadCores { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetParathreadCores::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetParathreadCores { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetParathreadCores {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetParathreadCores { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetParathreadCores; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetParathreadCores { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetParathreadCores { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetParathreadCores { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetParathreadCores { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetParathreadCores { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetParathreadCores { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetParathreadCores { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetParathreadCores { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetParathreadCores", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetParathreadCores { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_parathread_cores"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetParathreadRetries { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetParathreadRetries { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetParathreadRetries, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetParathreadRetries { new: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetParathreadRetries { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetParathreadRetries { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetParathreadRetries { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetParathreadRetries { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetParathreadRetries::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetParathreadRetries { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetParathreadRetries {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetParathreadRetries { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetParathreadRetries; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetParathreadRetries { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetParathreadRetries { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetParathreadRetries { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetParathreadRetries { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetParathreadRetries { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetParathreadRetries { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetParathreadRetries { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetParathreadRetries { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetParathreadRetries", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetParathreadRetries { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_parathread_retries"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetGroupRotationFrequency { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetGroupRotationFrequency { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetGroupRotationFrequency, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetGroupRotationFrequency { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact, - > for SetGroupRotationFrequency { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetGroupRotationFrequency { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetGroupRotationFrequency { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetGroupRotationFrequency { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetGroupRotationFrequency::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetGroupRotationFrequency { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetGroupRotationFrequency {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetGroupRotationFrequency { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetGroupRotationFrequency; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetGroupRotationFrequency { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetGroupRotationFrequency { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetGroupRotationFrequency { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetGroupRotationFrequency { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetGroupRotationFrequency { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetGroupRotationFrequency { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetGroupRotationFrequency { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetGroupRotationFrequency { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetGroupRotationFrequency", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetGroupRotationFrequency { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_group_rotation_frequency"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetChainAvailabilityPeriod { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetChainAvailabilityPeriod { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetChainAvailabilityPeriod, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetChainAvailabilityPeriod { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact, - > for SetChainAvailabilityPeriod { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetChainAvailabilityPeriod { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetChainAvailabilityPeriod { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetChainAvailabilityPeriod { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `SetChainAvailabilityPeriod::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetChainAvailabilityPeriod { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetChainAvailabilityPeriod {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetChainAvailabilityPeriod { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetChainAvailabilityPeriod; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetChainAvailabilityPeriod { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetChainAvailabilityPeriod { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetChainAvailabilityPeriod { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetChainAvailabilityPeriod { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetChainAvailabilityPeriod { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetChainAvailabilityPeriod { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetChainAvailabilityPeriod { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetChainAvailabilityPeriod { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetChainAvailabilityPeriod", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for SetChainAvailabilityPeriod { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_chain_availability_period"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetThreadAvailabilityPeriod { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetThreadAvailabilityPeriod { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetThreadAvailabilityPeriod, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetThreadAvailabilityPeriod { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact, - > for SetThreadAvailabilityPeriod { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetThreadAvailabilityPeriod { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode - for SetThreadAvailabilityPeriod { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetThreadAvailabilityPeriod { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetThreadAvailabilityPeriod::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode - for SetThreadAvailabilityPeriod { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetThreadAvailabilityPeriod {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetThreadAvailabilityPeriod { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetThreadAvailabilityPeriod; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetThreadAvailabilityPeriod { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetThreadAvailabilityPeriod { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetThreadAvailabilityPeriod { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetThreadAvailabilityPeriod { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetThreadAvailabilityPeriod { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetThreadAvailabilityPeriod { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetThreadAvailabilityPeriod { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetThreadAvailabilityPeriod { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetThreadAvailabilityPeriod", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for SetThreadAvailabilityPeriod { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_thread_availability_period"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetSchedulingLookahead { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetSchedulingLookahead { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetSchedulingLookahead, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetSchedulingLookahead { - new: x, - }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetSchedulingLookahead { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetSchedulingLookahead { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetSchedulingLookahead { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetSchedulingLookahead { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetSchedulingLookahead::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetSchedulingLookahead { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetSchedulingLookahead {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetSchedulingLookahead { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetSchedulingLookahead; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetSchedulingLookahead { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetSchedulingLookahead { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetSchedulingLookahead { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetSchedulingLookahead { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetSchedulingLookahead { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetSchedulingLookahead { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetSchedulingLookahead { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetSchedulingLookahead { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetSchedulingLookahead", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetSchedulingLookahead { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_scheduling_lookahead"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxValidatorsPerCore { - pub new: ::core::option::Option<::core::primitive::u32>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetMaxValidatorsPerCore { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxValidatorsPerCore { - new: { - let __codec_res_edqy = <::core::option::Option< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMaxValidatorsPerCore::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetMaxValidatorsPerCore { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetMaxValidatorsPerCore {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetMaxValidatorsPerCore { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMaxValidatorsPerCore; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMaxValidatorsPerCore { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetMaxValidatorsPerCore { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetMaxValidatorsPerCore { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetMaxValidatorsPerCore { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxValidatorsPerCore { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetMaxValidatorsPerCore { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxValidatorsPerCore { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMaxValidatorsPerCore { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetMaxValidatorsPerCore", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetMaxValidatorsPerCore { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_max_validators_per_core"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxValidators { - pub new: ::core::option::Option<::core::primitive::u32>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetMaxValidators { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxValidators { - new: { - let __codec_res_edqy = <::core::option::Option< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMaxValidators::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetMaxValidators { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetMaxValidators {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetMaxValidators { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMaxValidators; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMaxValidators { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetMaxValidators { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetMaxValidators { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetMaxValidators { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxValidators { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetMaxValidators { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxValidators { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMaxValidators { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetMaxValidators", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetMaxValidators { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_max_validators"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetDisputePeriod { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetDisputePeriod { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetDisputePeriod, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetDisputePeriod { new: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetDisputePeriod { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetDisputePeriod { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetDisputePeriod { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetDisputePeriod { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetDisputePeriod::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetDisputePeriod { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetDisputePeriod {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetDisputePeriod { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetDisputePeriod; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetDisputePeriod { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetDisputePeriod { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetDisputePeriod { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetDisputePeriod { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetDisputePeriod { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetDisputePeriod { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetDisputePeriod { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetDisputePeriod { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetDisputePeriod", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetDisputePeriod { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_dispute_period"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetDisputePostConclusionAcceptancePeriod { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetDisputePostConclusionAcceptancePeriod { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetDisputePostConclusionAcceptancePeriod, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetDisputePostConclusionAcceptancePeriod { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact< - SetDisputePostConclusionAcceptancePeriod, - >, - > for SetDisputePostConclusionAcceptancePeriod { - fn from( - x: ::subxt::ext::codec::Compact< - SetDisputePostConclusionAcceptancePeriod, - >, - ) -> SetDisputePostConclusionAcceptancePeriod { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode - for SetDisputePostConclusionAcceptancePeriod { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetDisputePostConclusionAcceptancePeriod { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetDisputePostConclusionAcceptancePeriod::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode - for SetDisputePostConclusionAcceptancePeriod { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetDisputePostConclusionAcceptancePeriod {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetDisputePostConclusionAcceptancePeriod { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetDisputePostConclusionAcceptancePeriod; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetDisputePostConclusionAcceptancePeriod { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetDisputePostConclusionAcceptancePeriod { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetDisputePostConclusionAcceptancePeriod { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetDisputePostConclusionAcceptancePeriod { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetDisputePostConclusionAcceptancePeriod { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetDisputePostConclusionAcceptancePeriod { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetDisputePostConclusionAcceptancePeriod { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug - for SetDisputePostConclusionAcceptancePeriod { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetDisputePostConclusionAcceptancePeriod", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for SetDisputePostConclusionAcceptancePeriod { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_dispute_post_conclusion_acceptance_period"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetNoShowSlots { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetNoShowSlots { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetNoShowSlots, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetNoShowSlots { new: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetNoShowSlots { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetNoShowSlots { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetNoShowSlots { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetNoShowSlots { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetNoShowSlots::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetNoShowSlots { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetNoShowSlots {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetNoShowSlots { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetNoShowSlots; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetNoShowSlots { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetNoShowSlots { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetNoShowSlots { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetNoShowSlots { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetNoShowSlots { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetNoShowSlots { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetNoShowSlots { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetNoShowSlots { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetNoShowSlots", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetNoShowSlots { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_no_show_slots"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetNDelayTranches { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetNDelayTranches { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetNDelayTranches, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetNDelayTranches { new: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetNDelayTranches { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetNDelayTranches { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetNDelayTranches { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetNDelayTranches { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetNDelayTranches::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetNDelayTranches { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetNDelayTranches {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetNDelayTranches { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetNDelayTranches; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetNDelayTranches { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetNDelayTranches { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetNDelayTranches { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetNDelayTranches { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetNDelayTranches { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetNDelayTranches { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetNDelayTranches { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetNDelayTranches { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetNDelayTranches", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetNDelayTranches { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_n_delay_tranches"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetZerothDelayTrancheWidth { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetZerothDelayTrancheWidth { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetZerothDelayTrancheWidth, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetZerothDelayTrancheWidth { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact, - > for SetZerothDelayTrancheWidth { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetZerothDelayTrancheWidth { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetZerothDelayTrancheWidth { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetZerothDelayTrancheWidth { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `SetZerothDelayTrancheWidth::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetZerothDelayTrancheWidth { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetZerothDelayTrancheWidth {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetZerothDelayTrancheWidth { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetZerothDelayTrancheWidth; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetZerothDelayTrancheWidth { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetZerothDelayTrancheWidth { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetZerothDelayTrancheWidth { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetZerothDelayTrancheWidth { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetZerothDelayTrancheWidth { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetZerothDelayTrancheWidth { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetZerothDelayTrancheWidth { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetZerothDelayTrancheWidth { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetZerothDelayTrancheWidth", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for SetZerothDelayTrancheWidth { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_zeroth_delay_tranche_width"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetNeededApprovals { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetNeededApprovals { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetNeededApprovals, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetNeededApprovals { new: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetNeededApprovals { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetNeededApprovals { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetNeededApprovals { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetNeededApprovals { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetNeededApprovals::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetNeededApprovals { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetNeededApprovals {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetNeededApprovals { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetNeededApprovals; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetNeededApprovals { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetNeededApprovals { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetNeededApprovals { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetNeededApprovals { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetNeededApprovals { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetNeededApprovals { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetNeededApprovals { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetNeededApprovals { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetNeededApprovals", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetNeededApprovals { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_needed_approvals"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetRelayVrfModuloSamples { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetRelayVrfModuloSamples { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetRelayVrfModuloSamples, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetRelayVrfModuloSamples { - new: x, - }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetRelayVrfModuloSamples { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetRelayVrfModuloSamples { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetRelayVrfModuloSamples { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetRelayVrfModuloSamples { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetRelayVrfModuloSamples::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetRelayVrfModuloSamples { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetRelayVrfModuloSamples {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetRelayVrfModuloSamples { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetRelayVrfModuloSamples; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetRelayVrfModuloSamples { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetRelayVrfModuloSamples { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetRelayVrfModuloSamples { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetRelayVrfModuloSamples { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetRelayVrfModuloSamples { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetRelayVrfModuloSamples { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetRelayVrfModuloSamples { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetRelayVrfModuloSamples { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetRelayVrfModuloSamples", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetRelayVrfModuloSamples { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_relay_vrf_modulo_samples"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxUpwardQueueCount { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetMaxUpwardQueueCount { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetMaxUpwardQueueCount, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxUpwardQueueCount { - new: x, - }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetMaxUpwardQueueCount { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetMaxUpwardQueueCount { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetMaxUpwardQueueCount { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxUpwardQueueCount { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMaxUpwardQueueCount::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetMaxUpwardQueueCount { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetMaxUpwardQueueCount {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetMaxUpwardQueueCount { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMaxUpwardQueueCount; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMaxUpwardQueueCount { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetMaxUpwardQueueCount { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetMaxUpwardQueueCount { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetMaxUpwardQueueCount { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxUpwardQueueCount { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetMaxUpwardQueueCount { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxUpwardQueueCount { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMaxUpwardQueueCount { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetMaxUpwardQueueCount", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetMaxUpwardQueueCount { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_max_upward_queue_count"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxUpwardQueueSize { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetMaxUpwardQueueSize { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetMaxUpwardQueueSize, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxUpwardQueueSize { new: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetMaxUpwardQueueSize { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetMaxUpwardQueueSize { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetMaxUpwardQueueSize { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxUpwardQueueSize { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMaxUpwardQueueSize::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetMaxUpwardQueueSize { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetMaxUpwardQueueSize {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetMaxUpwardQueueSize { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMaxUpwardQueueSize; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMaxUpwardQueueSize { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetMaxUpwardQueueSize { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetMaxUpwardQueueSize { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetMaxUpwardQueueSize { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxUpwardQueueSize { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetMaxUpwardQueueSize { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxUpwardQueueSize { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMaxUpwardQueueSize { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetMaxUpwardQueueSize", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetMaxUpwardQueueSize { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_max_upward_queue_size"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxDownwardMessageSize { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetMaxDownwardMessageSize { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetMaxDownwardMessageSize, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxDownwardMessageSize { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact, - > for SetMaxDownwardMessageSize { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetMaxDownwardMessageSize { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetMaxDownwardMessageSize { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxDownwardMessageSize { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMaxDownwardMessageSize::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetMaxDownwardMessageSize { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetMaxDownwardMessageSize {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetMaxDownwardMessageSize { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMaxDownwardMessageSize; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMaxDownwardMessageSize { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetMaxDownwardMessageSize { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetMaxDownwardMessageSize { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetMaxDownwardMessageSize { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxDownwardMessageSize { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetMaxDownwardMessageSize { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxDownwardMessageSize { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMaxDownwardMessageSize { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetMaxDownwardMessageSize", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetMaxDownwardMessageSize { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_max_downward_message_size"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxUpwardMessageSize { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetMaxUpwardMessageSize { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetMaxUpwardMessageSize, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxUpwardMessageSize { - new: x, - }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetMaxUpwardMessageSize { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetMaxUpwardMessageSize { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetMaxUpwardMessageSize { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxUpwardMessageSize { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetMaxUpwardMessageSize::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetMaxUpwardMessageSize { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetMaxUpwardMessageSize {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetMaxUpwardMessageSize { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMaxUpwardMessageSize; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMaxUpwardMessageSize { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetMaxUpwardMessageSize { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetMaxUpwardMessageSize { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetMaxUpwardMessageSize { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxUpwardMessageSize { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetMaxUpwardMessageSize { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxUpwardMessageSize { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMaxUpwardMessageSize { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetMaxUpwardMessageSize", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetMaxUpwardMessageSize { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_max_upward_message_size"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxUpwardMessageNumPerCandidate { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetMaxUpwardMessageNumPerCandidate { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetMaxUpwardMessageNumPerCandidate, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxUpwardMessageNumPerCandidate { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact< - SetMaxUpwardMessageNumPerCandidate, - >, - > for SetMaxUpwardMessageNumPerCandidate { - fn from( - x: ::subxt::ext::codec::Compact< - SetMaxUpwardMessageNumPerCandidate, - >, - ) -> SetMaxUpwardMessageNumPerCandidate { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode - for SetMaxUpwardMessageNumPerCandidate { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMaxUpwardMessageNumPerCandidate { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetMaxUpwardMessageNumPerCandidate::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode - for SetMaxUpwardMessageNumPerCandidate { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetMaxUpwardMessageNumPerCandidate {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetMaxUpwardMessageNumPerCandidate { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMaxUpwardMessageNumPerCandidate; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMaxUpwardMessageNumPerCandidate { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetMaxUpwardMessageNumPerCandidate { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetMaxUpwardMessageNumPerCandidate { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetMaxUpwardMessageNumPerCandidate { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxUpwardMessageNumPerCandidate { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetMaxUpwardMessageNumPerCandidate { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMaxUpwardMessageNumPerCandidate { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMaxUpwardMessageNumPerCandidate { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetMaxUpwardMessageNumPerCandidate", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for SetMaxUpwardMessageNumPerCandidate { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_max_upward_message_num_per_candidate"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpOpenRequestTtl { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetHrmpOpenRequestTtl { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetHrmpOpenRequestTtl, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpOpenRequestTtl { new: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetHrmpOpenRequestTtl { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetHrmpOpenRequestTtl { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetHrmpOpenRequestTtl { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpOpenRequestTtl { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetHrmpOpenRequestTtl::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetHrmpOpenRequestTtl { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetHrmpOpenRequestTtl {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetHrmpOpenRequestTtl { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetHrmpOpenRequestTtl; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetHrmpOpenRequestTtl { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetHrmpOpenRequestTtl { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetHrmpOpenRequestTtl { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetHrmpOpenRequestTtl { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpOpenRequestTtl { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetHrmpOpenRequestTtl { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpOpenRequestTtl { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetHrmpOpenRequestTtl { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetHrmpOpenRequestTtl", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetHrmpOpenRequestTtl { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_hrmp_open_request_ttl"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpSenderDeposit { - pub new: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetHrmpSenderDeposit { - type As = ::core::primitive::u128; - fn encode_as(&self) -> &::core::primitive::u128 { - &self.new - } - fn decode_from( - x: ::core::primitive::u128, - ) -> ::core::result::Result< - SetHrmpSenderDeposit, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpSenderDeposit { new: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetHrmpSenderDeposit { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetHrmpSenderDeposit { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetHrmpSenderDeposit { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpSenderDeposit { - new: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetHrmpSenderDeposit::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetHrmpSenderDeposit { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetHrmpSenderDeposit {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetHrmpSenderDeposit { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetHrmpSenderDeposit; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetHrmpSenderDeposit { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetHrmpSenderDeposit { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetHrmpSenderDeposit { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetHrmpSenderDeposit { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpSenderDeposit { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetHrmpSenderDeposit { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpSenderDeposit { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetHrmpSenderDeposit { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetHrmpSenderDeposit", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetHrmpSenderDeposit { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_hrmp_sender_deposit"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpRecipientDeposit { - pub new: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetHrmpRecipientDeposit { - type As = ::core::primitive::u128; - fn encode_as(&self) -> &::core::primitive::u128 { - &self.new - } - fn decode_from( - x: ::core::primitive::u128, - ) -> ::core::result::Result< - SetHrmpRecipientDeposit, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpRecipientDeposit { - new: x, - }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetHrmpRecipientDeposit { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetHrmpRecipientDeposit { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetHrmpRecipientDeposit { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpRecipientDeposit { - new: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetHrmpRecipientDeposit::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetHrmpRecipientDeposit { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetHrmpRecipientDeposit {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetHrmpRecipientDeposit { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetHrmpRecipientDeposit; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetHrmpRecipientDeposit { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetHrmpRecipientDeposit { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetHrmpRecipientDeposit { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetHrmpRecipientDeposit { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpRecipientDeposit { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetHrmpRecipientDeposit { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpRecipientDeposit { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetHrmpRecipientDeposit { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetHrmpRecipientDeposit", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetHrmpRecipientDeposit { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_hrmp_recipient_deposit"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpChannelMaxCapacity { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetHrmpChannelMaxCapacity { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetHrmpChannelMaxCapacity, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpChannelMaxCapacity { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact, - > for SetHrmpChannelMaxCapacity { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetHrmpChannelMaxCapacity { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetHrmpChannelMaxCapacity { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpChannelMaxCapacity { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetHrmpChannelMaxCapacity::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetHrmpChannelMaxCapacity { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetHrmpChannelMaxCapacity {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetHrmpChannelMaxCapacity { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetHrmpChannelMaxCapacity; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetHrmpChannelMaxCapacity { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetHrmpChannelMaxCapacity { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetHrmpChannelMaxCapacity { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetHrmpChannelMaxCapacity { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpChannelMaxCapacity { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetHrmpChannelMaxCapacity { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpChannelMaxCapacity { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetHrmpChannelMaxCapacity { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetHrmpChannelMaxCapacity", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetHrmpChannelMaxCapacity { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_hrmp_channel_max_capacity"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpChannelMaxTotalSize { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetHrmpChannelMaxTotalSize { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetHrmpChannelMaxTotalSize, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpChannelMaxTotalSize { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact, - > for SetHrmpChannelMaxTotalSize { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetHrmpChannelMaxTotalSize { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetHrmpChannelMaxTotalSize { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpChannelMaxTotalSize { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `SetHrmpChannelMaxTotalSize::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetHrmpChannelMaxTotalSize { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetHrmpChannelMaxTotalSize {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetHrmpChannelMaxTotalSize { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetHrmpChannelMaxTotalSize; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetHrmpChannelMaxTotalSize { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetHrmpChannelMaxTotalSize { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetHrmpChannelMaxTotalSize { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetHrmpChannelMaxTotalSize { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpChannelMaxTotalSize { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetHrmpChannelMaxTotalSize { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpChannelMaxTotalSize { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetHrmpChannelMaxTotalSize { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetHrmpChannelMaxTotalSize", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for SetHrmpChannelMaxTotalSize { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_hrmp_channel_max_total_size"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpMaxParachainInboundChannels { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetHrmpMaxParachainInboundChannels { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetHrmpMaxParachainInboundChannels, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpMaxParachainInboundChannels { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact< - SetHrmpMaxParachainInboundChannels, - >, - > for SetHrmpMaxParachainInboundChannels { - fn from( - x: ::subxt::ext::codec::Compact< - SetHrmpMaxParachainInboundChannels, - >, - ) -> SetHrmpMaxParachainInboundChannels { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode - for SetHrmpMaxParachainInboundChannels { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpMaxParachainInboundChannels { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetHrmpMaxParachainInboundChannels::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode - for SetHrmpMaxParachainInboundChannels { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetHrmpMaxParachainInboundChannels {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetHrmpMaxParachainInboundChannels { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetHrmpMaxParachainInboundChannels; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetHrmpMaxParachainInboundChannels { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetHrmpMaxParachainInboundChannels { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetHrmpMaxParachainInboundChannels { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetHrmpMaxParachainInboundChannels { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpMaxParachainInboundChannels { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetHrmpMaxParachainInboundChannels { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpMaxParachainInboundChannels { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetHrmpMaxParachainInboundChannels { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetHrmpMaxParachainInboundChannels", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for SetHrmpMaxParachainInboundChannels { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_hrmp_max_parachain_inbound_channels"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpMaxParathreadInboundChannels { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetHrmpMaxParathreadInboundChannels { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetHrmpMaxParathreadInboundChannels, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpMaxParathreadInboundChannels { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact< - SetHrmpMaxParathreadInboundChannels, - >, - > for SetHrmpMaxParathreadInboundChannels { - fn from( - x: ::subxt::ext::codec::Compact< - SetHrmpMaxParathreadInboundChannels, - >, - ) -> SetHrmpMaxParathreadInboundChannels { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode - for SetHrmpMaxParathreadInboundChannels { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpMaxParathreadInboundChannels { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetHrmpMaxParathreadInboundChannels::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode - for SetHrmpMaxParathreadInboundChannels { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetHrmpMaxParathreadInboundChannels {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetHrmpMaxParathreadInboundChannels { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetHrmpMaxParathreadInboundChannels; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetHrmpMaxParathreadInboundChannels { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetHrmpMaxParathreadInboundChannels { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetHrmpMaxParathreadInboundChannels { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetHrmpMaxParathreadInboundChannels { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpMaxParathreadInboundChannels { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetHrmpMaxParathreadInboundChannels { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpMaxParathreadInboundChannels { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetHrmpMaxParathreadInboundChannels { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetHrmpMaxParathreadInboundChannels", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for SetHrmpMaxParathreadInboundChannels { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_hrmp_max_parathread_inbound_channels"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpChannelMaxMessageSize { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetHrmpChannelMaxMessageSize { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetHrmpChannelMaxMessageSize, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpChannelMaxMessageSize { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact, - > for SetHrmpChannelMaxMessageSize { - fn from( - x: ::subxt::ext::codec::Compact< - SetHrmpChannelMaxMessageSize, - >, - ) -> SetHrmpChannelMaxMessageSize { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode - for SetHrmpChannelMaxMessageSize { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpChannelMaxMessageSize { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetHrmpChannelMaxMessageSize::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode - for SetHrmpChannelMaxMessageSize { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetHrmpChannelMaxMessageSize {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetHrmpChannelMaxMessageSize { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetHrmpChannelMaxMessageSize; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetHrmpChannelMaxMessageSize { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetHrmpChannelMaxMessageSize { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetHrmpChannelMaxMessageSize { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetHrmpChannelMaxMessageSize { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpChannelMaxMessageSize { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetHrmpChannelMaxMessageSize { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpChannelMaxMessageSize { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetHrmpChannelMaxMessageSize { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetHrmpChannelMaxMessageSize", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for SetHrmpChannelMaxMessageSize { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_hrmp_channel_max_message_size"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpMaxParachainOutboundChannels { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetHrmpMaxParachainOutboundChannels { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetHrmpMaxParachainOutboundChannels, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpMaxParachainOutboundChannels { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact< - SetHrmpMaxParachainOutboundChannels, - >, - > for SetHrmpMaxParachainOutboundChannels { - fn from( - x: ::subxt::ext::codec::Compact< - SetHrmpMaxParachainOutboundChannels, - >, - ) -> SetHrmpMaxParachainOutboundChannels { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode - for SetHrmpMaxParachainOutboundChannels { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpMaxParachainOutboundChannels { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetHrmpMaxParachainOutboundChannels::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode - for SetHrmpMaxParachainOutboundChannels { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetHrmpMaxParachainOutboundChannels {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetHrmpMaxParachainOutboundChannels { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetHrmpMaxParachainOutboundChannels; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetHrmpMaxParachainOutboundChannels { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetHrmpMaxParachainOutboundChannels { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetHrmpMaxParachainOutboundChannels { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetHrmpMaxParachainOutboundChannels { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpMaxParachainOutboundChannels { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetHrmpMaxParachainOutboundChannels { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpMaxParachainOutboundChannels { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetHrmpMaxParachainOutboundChannels { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetHrmpMaxParachainOutboundChannels", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for SetHrmpMaxParachainOutboundChannels { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_hrmp_max_parachain_outbound_channels"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpMaxParathreadOutboundChannels { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetHrmpMaxParathreadOutboundChannels { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetHrmpMaxParathreadOutboundChannels, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpMaxParathreadOutboundChannels { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact< - SetHrmpMaxParathreadOutboundChannels, - >, - > for SetHrmpMaxParathreadOutboundChannels { - fn from( - x: ::subxt::ext::codec::Compact< - SetHrmpMaxParathreadOutboundChannels, - >, - ) -> SetHrmpMaxParathreadOutboundChannels { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode - for SetHrmpMaxParathreadOutboundChannels { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpMaxParathreadOutboundChannels { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetHrmpMaxParathreadOutboundChannels::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode - for SetHrmpMaxParathreadOutboundChannels { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetHrmpMaxParathreadOutboundChannels {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetHrmpMaxParathreadOutboundChannels { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetHrmpMaxParathreadOutboundChannels; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetHrmpMaxParathreadOutboundChannels { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetHrmpMaxParathreadOutboundChannels { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetHrmpMaxParathreadOutboundChannels { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetHrmpMaxParathreadOutboundChannels { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpMaxParathreadOutboundChannels { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetHrmpMaxParathreadOutboundChannels { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpMaxParathreadOutboundChannels { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetHrmpMaxParathreadOutboundChannels { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetHrmpMaxParathreadOutboundChannels", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for SetHrmpMaxParathreadOutboundChannels { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_hrmp_max_parathread_outbound_channels"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpMaxMessageNumPerCandidate { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetHrmpMaxMessageNumPerCandidate { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetHrmpMaxMessageNumPerCandidate, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpMaxMessageNumPerCandidate { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact< - SetHrmpMaxMessageNumPerCandidate, - >, - > for SetHrmpMaxMessageNumPerCandidate { - fn from( - x: ::subxt::ext::codec::Compact< - SetHrmpMaxMessageNumPerCandidate, - >, - ) -> SetHrmpMaxMessageNumPerCandidate { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode - for SetHrmpMaxMessageNumPerCandidate { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetHrmpMaxMessageNumPerCandidate { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetHrmpMaxMessageNumPerCandidate::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode - for SetHrmpMaxMessageNumPerCandidate { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetHrmpMaxMessageNumPerCandidate {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetHrmpMaxMessageNumPerCandidate { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetHrmpMaxMessageNumPerCandidate; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetHrmpMaxMessageNumPerCandidate { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetHrmpMaxMessageNumPerCandidate { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetHrmpMaxMessageNumPerCandidate { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetHrmpMaxMessageNumPerCandidate { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpMaxMessageNumPerCandidate { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetHrmpMaxMessageNumPerCandidate { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetHrmpMaxMessageNumPerCandidate { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetHrmpMaxMessageNumPerCandidate { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetHrmpMaxMessageNumPerCandidate", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for SetHrmpMaxMessageNumPerCandidate { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_hrmp_max_message_num_per_candidate"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetPvfCheckingEnabled { - pub new: ::core::primitive::bool, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetPvfCheckingEnabled { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetPvfCheckingEnabled { - new: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetPvfCheckingEnabled::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetPvfCheckingEnabled { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetPvfCheckingEnabled {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetPvfCheckingEnabled { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetPvfCheckingEnabled; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetPvfCheckingEnabled { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetPvfCheckingEnabled { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetPvfCheckingEnabled { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetPvfCheckingEnabled { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetPvfCheckingEnabled { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetPvfCheckingEnabled { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetPvfCheckingEnabled { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetPvfCheckingEnabled { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetPvfCheckingEnabled", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetPvfCheckingEnabled { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_pvf_checking_enabled"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetPvfVotingTtl { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for SetPvfVotingTtl { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetPvfVotingTtl, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetPvfVotingTtl { new: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for SetPvfVotingTtl { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> SetPvfVotingTtl { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetPvfVotingTtl { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetPvfVotingTtl { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetPvfVotingTtl::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetPvfVotingTtl { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetPvfVotingTtl {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetPvfVotingTtl { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetPvfVotingTtl; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetPvfVotingTtl { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetPvfVotingTtl { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetPvfVotingTtl { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetPvfVotingTtl { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetPvfVotingTtl { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetPvfVotingTtl { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetPvfVotingTtl { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetPvfVotingTtl { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetPvfVotingTtl", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetPvfVotingTtl { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_pvf_voting_ttl"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMinimumValidationUpgradeDelay { - pub new: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs - for SetMinimumValidationUpgradeDelay { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.new - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - SetMinimumValidationUpgradeDelay, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMinimumValidationUpgradeDelay { - new: x, - }) - } - } - #[automatically_derived] - impl From< - ::subxt::ext::codec::Compact< - SetMinimumValidationUpgradeDelay, - >, - > for SetMinimumValidationUpgradeDelay { - fn from( - x: ::subxt::ext::codec::Compact< - SetMinimumValidationUpgradeDelay, - >, - ) -> SetMinimumValidationUpgradeDelay { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode - for SetMinimumValidationUpgradeDelay { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetMinimumValidationUpgradeDelay { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SetMinimumValidationUpgradeDelay::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode - for SetMinimumValidationUpgradeDelay { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetMinimumValidationUpgradeDelay {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetMinimumValidationUpgradeDelay { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetMinimumValidationUpgradeDelay; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetMinimumValidationUpgradeDelay { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetMinimumValidationUpgradeDelay { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetMinimumValidationUpgradeDelay { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetMinimumValidationUpgradeDelay { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMinimumValidationUpgradeDelay { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetMinimumValidationUpgradeDelay { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetMinimumValidationUpgradeDelay { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetMinimumValidationUpgradeDelay { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetMinimumValidationUpgradeDelay", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for SetMinimumValidationUpgradeDelay { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_minimum_validation_upgrade_delay"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetBypassConsistencyCheck { - pub new: ::core::primitive::bool, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetBypassConsistencyCheck { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetBypassConsistencyCheck { - new: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetBypassConsistencyCheck::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetBypassConsistencyCheck { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SetBypassConsistencyCheck {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetBypassConsistencyCheck { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetBypassConsistencyCheck; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetBypassConsistencyCheck { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetBypassConsistencyCheck { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetBypassConsistencyCheck { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetBypassConsistencyCheck { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetBypassConsistencyCheck { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetBypassConsistencyCheck { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetBypassConsistencyCheck { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetBypassConsistencyCheck { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetBypassConsistencyCheck", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetBypassConsistencyCheck { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_bypass_consistency_check"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetAsyncBackingParams { - pub new: runtime_types::polkadot_primitives::vstaging::AsyncBackingParams, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetAsyncBackingParams { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetAsyncBackingParams { - new: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetAsyncBackingParams::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetAsyncBackingParams { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetAsyncBackingParams {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetAsyncBackingParams { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetAsyncBackingParams; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetAsyncBackingParams { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetAsyncBackingParams { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetAsyncBackingParams { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SetAsyncBackingParams { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetAsyncBackingParams { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetAsyncBackingParams { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetAsyncBackingParams { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetAsyncBackingParams { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetAsyncBackingParams", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetAsyncBackingParams { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_async_backing_params"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetExecutorParams { - pub new: runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetExecutorParams { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetExecutorParams { - new: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetExecutorParams::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetExecutorParams { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.new) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.new, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.new) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.new, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetExecutorParams {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SetExecutorParams { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetExecutorParams; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetExecutorParams { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(SetExecutorParams { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetExecutorParams { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetExecutorParams { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetExecutorParams { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SetExecutorParams { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetExecutorParams { new } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetExecutorParams { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetExecutorParams", - "new", - &&self.new, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetExecutorParams { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_executor_params"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn set_validation_upgrade_cooldown( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_validation_upgrade_cooldown", - types::SetValidationUpgradeCooldown { - new, - }, - [ - 233u8, - 224u8, - 19u8, - 198u8, - 27u8, - 104u8, - 64u8, - 248u8, - 223u8, - 51u8, - 175u8, - 162u8, - 183u8, - 43u8, - 108u8, - 246u8, - 162u8, - 210u8, - 53u8, - 56u8, - 174u8, - 203u8, - 79u8, - 143u8, - 13u8, - 101u8, - 100u8, - 11u8, - 127u8, - 76u8, - 71u8, - 228u8, - ], - ) - } - pub fn set_validation_upgrade_delay( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_validation_upgrade_delay", - types::SetValidationUpgradeDelay { - new, - }, - [ - 13u8, - 139u8, - 210u8, - 115u8, - 20u8, - 121u8, - 55u8, - 118u8, - 101u8, - 236u8, - 95u8, - 79u8, - 46u8, - 44u8, - 129u8, - 129u8, - 60u8, - 198u8, - 13u8, - 17u8, - 115u8, - 187u8, - 181u8, - 37u8, - 75u8, - 153u8, - 13u8, - 196u8, - 49u8, - 204u8, - 26u8, - 198u8, - ], - ) - } - pub fn set_code_retention_period( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_code_retention_period", - types::SetCodeRetentionPeriod { - new, - }, - [ - 169u8, - 77u8, - 107u8, - 175u8, - 172u8, - 177u8, - 169u8, - 194u8, - 219u8, - 6u8, - 192u8, - 40u8, - 55u8, - 241u8, - 128u8, - 111u8, - 95u8, - 67u8, - 173u8, - 247u8, - 220u8, - 66u8, - 45u8, - 76u8, - 108u8, - 137u8, - 220u8, - 194u8, - 86u8, - 41u8, - 245u8, - 226u8, - ], - ) - } - pub fn set_max_code_size( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_code_size", - types::SetMaxCodeSize { new }, - [ - 122u8, - 74u8, - 244u8, - 226u8, - 89u8, - 175u8, - 191u8, - 163u8, - 34u8, - 79u8, - 118u8, - 254u8, - 236u8, - 215u8, - 8u8, - 182u8, - 71u8, - 180u8, - 224u8, - 165u8, - 226u8, - 242u8, - 124u8, - 34u8, - 38u8, - 27u8, - 29u8, - 140u8, - 187u8, - 93u8, - 131u8, - 168u8, - ], - ) - } - pub fn set_max_pov_size( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_pov_size", - types::SetMaxPovSize { new }, - [ - 170u8, - 106u8, - 163u8, - 4u8, - 27u8, - 72u8, - 250u8, - 59u8, - 133u8, - 128u8, - 177u8, - 209u8, - 22u8, - 42u8, - 230u8, - 40u8, - 192u8, - 198u8, - 56u8, - 195u8, - 31u8, - 20u8, - 35u8, - 196u8, - 119u8, - 183u8, - 141u8, - 38u8, - 52u8, - 54u8, - 31u8, - 122u8, - ], - ) - } - pub fn set_max_head_data_size( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_head_data_size", - types::SetMaxHeadDataSize { new }, - [ - 216u8, - 146u8, - 104u8, - 253u8, - 123u8, - 192u8, - 123u8, - 82u8, - 149u8, - 22u8, - 31u8, - 107u8, - 67u8, - 102u8, - 163u8, - 239u8, - 57u8, - 183u8, - 93u8, - 20u8, - 126u8, - 39u8, - 36u8, - 242u8, - 252u8, - 68u8, - 150u8, - 121u8, - 147u8, - 186u8, - 39u8, - 181u8, - ], - ) - } - pub fn set_parathread_cores( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_parathread_cores", - types::SetParathreadCores { new }, - [ - 230u8, - 175u8, - 182u8, - 232u8, - 5u8, - 251u8, - 196u8, - 197u8, - 246u8, - 111u8, - 65u8, - 165u8, - 39u8, - 174u8, - 17u8, - 30u8, - 147u8, - 116u8, - 53u8, - 254u8, - 243u8, - 53u8, - 110u8, - 122u8, - 211u8, - 69u8, - 122u8, - 225u8, - 16u8, - 128u8, - 250u8, - 172u8, - ], - ) - } - pub fn set_parathread_retries( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_parathread_retries", - types::SetParathreadRetries { new }, - [ - 12u8, - 100u8, - 94u8, - 156u8, - 161u8, - 134u8, - 229u8, - 28u8, - 106u8, - 41u8, - 138u8, - 162u8, - 196u8, - 224u8, - 56u8, - 149u8, - 42u8, - 141u8, - 184u8, - 192u8, - 53u8, - 9u8, - 18u8, - 21u8, - 143u8, - 188u8, - 244u8, - 254u8, - 101u8, - 206u8, - 102u8, - 187u8, - ], - ) - } - pub fn set_group_rotation_frequency( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_group_rotation_frequency", - types::SetGroupRotationFrequency { - new, - }, - [ - 33u8, - 142u8, - 63u8, - 205u8, - 128u8, - 109u8, - 157u8, - 33u8, - 122u8, - 91u8, - 57u8, - 223u8, - 134u8, - 80u8, - 108u8, - 187u8, - 147u8, - 120u8, - 104u8, - 170u8, - 32u8, - 135u8, - 102u8, - 38u8, - 82u8, - 20u8, - 123u8, - 211u8, - 245u8, - 91u8, - 134u8, - 44u8, - ], - ) - } - pub fn set_chain_availability_period( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_chain_availability_period", - types::SetChainAvailabilityPeriod { - new, - }, - [ - 117u8, - 26u8, - 125u8, - 221u8, - 25u8, - 252u8, - 92u8, - 61u8, - 28u8, - 172u8, - 164u8, - 43u8, - 55u8, - 7u8, - 100u8, - 219u8, - 234u8, - 157u8, - 180u8, - 216u8, - 165u8, - 145u8, - 1u8, - 43u8, - 133u8, - 203u8, - 160u8, - 147u8, - 46u8, - 227u8, - 153u8, - 112u8, - ], - ) - } - pub fn set_thread_availability_period( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_thread_availability_period", - types::SetThreadAvailabilityPeriod { - new, - }, - [ - 223u8, - 248u8, - 231u8, - 210u8, - 234u8, - 168u8, - 224u8, - 226u8, - 175u8, - 76u8, - 161u8, - 222u8, - 45u8, - 238u8, - 232u8, - 169u8, - 11u8, - 210u8, - 22u8, - 13u8, - 145u8, - 61u8, - 17u8, - 203u8, - 132u8, - 105u8, - 196u8, - 18u8, - 12u8, - 156u8, - 243u8, - 231u8, - ], - ) - } - pub fn set_scheduling_lookahead( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_scheduling_lookahead", - types::SetSchedulingLookahead { - new, - }, - [ - 176u8, - 115u8, - 251u8, - 197u8, - 19u8, - 106u8, - 253u8, - 224u8, - 149u8, - 96u8, - 238u8, - 106u8, - 19u8, - 19u8, - 89u8, - 249u8, - 186u8, - 89u8, - 144u8, - 116u8, - 251u8, - 30u8, - 157u8, - 237u8, - 125u8, - 153u8, - 86u8, - 6u8, - 251u8, - 170u8, - 73u8, - 216u8, - ], - ) - } - 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", - types::SetMaxValidatorsPerCore { - new, - }, - [ - 152u8, - 112u8, - 244u8, - 133u8, - 209u8, - 166u8, - 55u8, - 155u8, - 12u8, - 216u8, - 62u8, - 111u8, - 81u8, - 52u8, - 194u8, - 121u8, - 172u8, - 201u8, - 204u8, - 139u8, - 198u8, - 238u8, - 9u8, - 49u8, - 119u8, - 236u8, - 46u8, - 0u8, - 179u8, - 234u8, - 92u8, - 45u8, - ], - ) - } - 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", - types::SetMaxValidators { new }, - [ - 219u8, - 76u8, - 191u8, - 139u8, - 250u8, - 154u8, - 232u8, - 176u8, - 248u8, - 154u8, - 185u8, - 89u8, - 135u8, - 151u8, - 183u8, - 132u8, - 72u8, - 63u8, - 101u8, - 183u8, - 142u8, - 169u8, - 163u8, - 226u8, - 24u8, - 139u8, - 78u8, - 155u8, - 3u8, - 136u8, - 142u8, - 137u8, - ], - ) - } - pub fn set_dispute_period( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_dispute_period", - types::SetDisputePeriod { new }, - [ - 104u8, - 229u8, - 235u8, - 207u8, - 136u8, - 207u8, - 181u8, - 99u8, - 0u8, - 84u8, - 200u8, - 244u8, - 220u8, - 52u8, - 64u8, - 26u8, - 232u8, - 212u8, - 242u8, - 190u8, - 67u8, - 180u8, - 171u8, - 200u8, - 181u8, - 23u8, - 32u8, - 240u8, - 231u8, - 217u8, - 23u8, - 146u8, - ], - ) - } - pub fn set_dispute_post_conclusion_acceptance_period( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload< - types::SetDisputePostConclusionAcceptancePeriod, - > { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_dispute_post_conclusion_acceptance_period", - types::SetDisputePostConclusionAcceptancePeriod { - new, - }, - [ - 251u8, - 176u8, - 139u8, - 76u8, - 7u8, - 246u8, - 198u8, - 190u8, - 39u8, - 249u8, - 95u8, - 226u8, - 53u8, - 186u8, - 112u8, - 101u8, - 229u8, - 80u8, - 240u8, - 185u8, - 108u8, - 228u8, - 91u8, - 103u8, - 128u8, - 218u8, - 231u8, - 210u8, - 164u8, - 197u8, - 84u8, - 149u8, - ], - ) - } - pub fn set_no_show_slots( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_no_show_slots", - types::SetNoShowSlots { new }, - [ - 123u8, - 204u8, - 253u8, - 222u8, - 224u8, - 215u8, - 247u8, - 154u8, - 225u8, - 79u8, - 29u8, - 171u8, - 107u8, - 216u8, - 215u8, - 14u8, - 8u8, - 230u8, - 49u8, - 97u8, - 20u8, - 84u8, - 70u8, - 33u8, - 254u8, - 63u8, - 186u8, - 7u8, - 184u8, - 135u8, - 74u8, - 139u8, - ], - ) - } - pub fn set_n_delay_tranches( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_n_delay_tranches", - types::SetNDelayTranches { new }, - [ - 157u8, - 177u8, - 251u8, - 227u8, - 118u8, - 250u8, - 129u8, - 254u8, - 33u8, - 250u8, - 61u8, - 148u8, - 189u8, - 92u8, - 49u8, - 119u8, - 107u8, - 40u8, - 255u8, - 119u8, - 241u8, - 188u8, - 109u8, - 240u8, - 229u8, - 169u8, - 31u8, - 62u8, - 174u8, - 14u8, - 247u8, - 235u8, - ], - ) - } - pub fn set_zeroth_delay_tranche_width( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_zeroth_delay_tranche_width", - types::SetZerothDelayTrancheWidth { - new, - }, - [ - 30u8, - 195u8, - 15u8, - 51u8, - 210u8, - 159u8, - 254u8, - 207u8, - 121u8, - 172u8, - 107u8, - 241u8, - 55u8, - 100u8, - 159u8, - 55u8, - 76u8, - 47u8, - 86u8, - 93u8, - 221u8, - 34u8, - 136u8, - 97u8, - 224u8, - 141u8, - 46u8, - 181u8, - 246u8, - 137u8, - 79u8, - 57u8, - ], - ) - } - pub fn set_needed_approvals( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_needed_approvals", - types::SetNeededApprovals { new }, - [ - 245u8, - 105u8, - 16u8, - 120u8, - 28u8, - 231u8, - 6u8, - 50u8, - 143u8, - 102u8, - 1u8, - 97u8, - 224u8, - 232u8, - 187u8, - 164u8, - 200u8, - 31u8, - 129u8, - 139u8, - 79u8, - 170u8, - 14u8, - 147u8, - 117u8, - 13u8, - 98u8, - 16u8, - 64u8, - 169u8, - 46u8, - 41u8, - ], - ) - } - pub fn set_relay_vrf_modulo_samples( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_relay_vrf_modulo_samples", - types::SetRelayVrfModuloSamples { - new, - }, - [ - 96u8, - 100u8, - 42u8, - 61u8, - 244u8, - 226u8, - 135u8, - 187u8, - 56u8, - 193u8, - 247u8, - 236u8, - 38u8, - 40u8, - 242u8, - 222u8, - 176u8, - 209u8, - 211u8, - 217u8, - 178u8, - 32u8, - 160u8, - 56u8, - 23u8, - 60u8, - 222u8, - 166u8, - 134u8, - 72u8, - 153u8, - 14u8, - ], - ) - } - pub fn set_max_upward_queue_count( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_upward_queue_count", - types::SetMaxUpwardQueueCount { - new, - }, - [ - 187u8, - 102u8, - 178u8, - 141u8, - 245u8, - 8u8, - 221u8, - 174u8, - 128u8, - 239u8, - 104u8, - 120u8, - 202u8, - 220u8, - 46u8, - 27u8, - 175u8, - 26u8, - 1u8, - 170u8, - 193u8, - 70u8, - 176u8, - 13u8, - 223u8, - 57u8, - 153u8, - 161u8, - 228u8, - 175u8, - 226u8, - 202u8, - ], - ) - } - pub fn set_max_upward_queue_size( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_upward_queue_size", - types::SetMaxUpwardQueueSize { - new, - }, - [ - 245u8, - 234u8, - 151u8, - 232u8, - 49u8, - 193u8, - 60u8, - 21u8, - 103u8, - 238u8, - 194u8, - 73u8, - 238u8, - 160u8, - 48u8, - 88u8, - 143u8, - 197u8, - 110u8, - 230u8, - 213u8, - 149u8, - 171u8, - 94u8, - 77u8, - 6u8, - 139u8, - 191u8, - 158u8, - 62u8, - 181u8, - 32u8, - ], - ) - } - pub fn set_max_downward_message_size( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_downward_message_size", - types::SetMaxDownwardMessageSize { - new, - }, - [ - 63u8, - 112u8, - 231u8, - 193u8, - 226u8, - 6u8, - 119u8, - 35u8, - 60u8, - 34u8, - 85u8, - 15u8, - 168u8, - 16u8, - 176u8, - 116u8, - 169u8, - 114u8, - 42u8, - 208u8, - 89u8, - 188u8, - 22u8, - 145u8, - 248u8, - 87u8, - 74u8, - 168u8, - 0u8, - 202u8, - 112u8, - 13u8, - ], - ) - } - pub fn set_max_upward_message_size( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_upward_message_size", - types::SetMaxUpwardMessageSize { - new, - }, - [ - 237u8, - 108u8, - 33u8, - 245u8, - 65u8, - 209u8, - 201u8, - 97u8, - 126u8, - 194u8, - 195u8, - 8u8, - 144u8, - 223u8, - 148u8, - 242u8, - 97u8, - 214u8, - 38u8, - 231u8, - 123u8, - 143u8, - 34u8, - 199u8, - 100u8, - 183u8, - 211u8, - 111u8, - 250u8, - 245u8, - 10u8, - 38u8, - ], - ) - } - pub fn set_max_upward_message_num_per_candidate( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload< - types::SetMaxUpwardMessageNumPerCandidate, - > { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_max_upward_message_num_per_candidate", - types::SetMaxUpwardMessageNumPerCandidate { - new, - }, - [ - 183u8, - 121u8, - 87u8, - 193u8, - 8u8, - 160u8, - 107u8, - 80u8, - 50u8, - 8u8, - 75u8, - 185u8, - 195u8, - 248u8, - 75u8, - 174u8, - 210u8, - 108u8, - 149u8, - 20u8, - 66u8, - 153u8, - 20u8, - 203u8, - 92u8, - 99u8, - 27u8, - 69u8, - 212u8, - 212u8, - 35u8, - 49u8, - ], - ) - } - pub fn set_hrmp_open_request_ttl( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_open_request_ttl", - types::SetHrmpOpenRequestTtl { - new, - }, - [ - 233u8, - 46u8, - 165u8, - 59u8, - 196u8, - 77u8, - 161u8, - 124u8, - 252u8, - 98u8, - 8u8, - 52u8, - 80u8, - 17u8, - 12u8, - 50u8, - 25u8, - 127u8, - 143u8, - 252u8, - 230u8, - 10u8, - 193u8, - 251u8, - 167u8, - 73u8, - 40u8, - 63u8, - 203u8, - 119u8, - 208u8, - 254u8, - ], - ) - } - pub fn set_hrmp_sender_deposit( - &self, - new: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_sender_deposit", - types::SetHrmpSenderDeposit { new }, - [ - 4u8, - 141u8, - 15u8, - 87u8, - 237u8, - 39u8, - 225u8, - 108u8, - 159u8, - 240u8, - 121u8, - 212u8, - 225u8, - 155u8, - 168u8, - 28u8, - 61u8, - 119u8, - 232u8, - 216u8, - 194u8, - 172u8, - 147u8, - 16u8, - 50u8, - 100u8, - 146u8, - 146u8, - 69u8, - 252u8, - 94u8, - 47u8, - ], - ) - } - pub fn set_hrmp_recipient_deposit( - &self, - new: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_recipient_deposit", - types::SetHrmpRecipientDeposit { - new, - }, - [ - 242u8, - 193u8, - 202u8, - 91u8, - 69u8, - 252u8, - 101u8, - 52u8, - 162u8, - 107u8, - 165u8, - 69u8, - 90u8, - 150u8, - 62u8, - 239u8, - 167u8, - 2u8, - 221u8, - 3u8, - 231u8, - 252u8, - 82u8, - 125u8, - 212u8, - 174u8, - 47u8, - 216u8, - 219u8, - 237u8, - 242u8, - 144u8, - ], - ) - } - 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", - types::SetHrmpChannelMaxCapacity { - new, - }, - [ - 140u8, - 138u8, - 197u8, - 45u8, - 144u8, - 102u8, - 150u8, - 172u8, - 110u8, - 6u8, - 99u8, - 130u8, - 62u8, - 217u8, - 119u8, - 110u8, - 180u8, - 132u8, - 102u8, - 161u8, - 78u8, - 59u8, - 209u8, - 44u8, - 120u8, - 183u8, - 13u8, - 88u8, - 89u8, - 15u8, - 224u8, - 224u8, - ], - ) - } - 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", - types::SetHrmpChannelMaxTotalSize { - new, - }, - [ - 149u8, - 21u8, - 229u8, - 107u8, - 125u8, - 28u8, - 17u8, - 155u8, - 45u8, - 230u8, - 50u8, - 64u8, - 16u8, - 171u8, - 24u8, - 58u8, - 246u8, - 57u8, - 247u8, - 20u8, - 34u8, - 217u8, - 206u8, - 157u8, - 40u8, - 205u8, - 187u8, - 205u8, - 199u8, - 24u8, - 115u8, - 214u8, - ], - ) - } - pub fn set_hrmp_max_parachain_inbound_channels( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload< - types::SetHrmpMaxParachainInboundChannels, - > { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_max_parachain_inbound_channels", - types::SetHrmpMaxParachainInboundChannels { - new, - }, - [ - 203u8, - 10u8, - 55u8, - 21u8, - 21u8, - 254u8, - 74u8, - 97u8, - 34u8, - 117u8, - 160u8, - 183u8, - 168u8, - 235u8, - 11u8, - 9u8, - 137u8, - 141u8, - 150u8, - 80u8, - 32u8, - 41u8, - 118u8, - 40u8, - 28u8, - 74u8, - 155u8, - 7u8, - 63u8, - 217u8, - 39u8, - 104u8, - ], - ) - } - pub fn set_hrmp_max_parathread_inbound_channels( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload< - types::SetHrmpMaxParathreadInboundChannels, - > { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_max_parathread_inbound_channels", - types::SetHrmpMaxParathreadInboundChannels { - new, - }, - [ - 229u8, - 236u8, - 209u8, - 63u8, - 160u8, - 95u8, - 117u8, - 90u8, - 240u8, - 144u8, - 238u8, - 227u8, - 129u8, - 77u8, - 234u8, - 208u8, - 217u8, - 186u8, - 54u8, - 49u8, - 6u8, - 142u8, - 3u8, - 0u8, - 90u8, - 199u8, - 237u8, - 37u8, - 89u8, - 201u8, - 76u8, - 224u8, - ], - ) - } - pub fn set_hrmp_channel_max_message_size( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_channel_max_message_size", - types::SetHrmpChannelMaxMessageSize { - new, - }, - [ - 153u8, - 216u8, - 55u8, - 31u8, - 189u8, - 173u8, - 23u8, - 6u8, - 213u8, - 103u8, - 205u8, - 154u8, - 115u8, - 105u8, - 84u8, - 133u8, - 94u8, - 254u8, - 47u8, - 128u8, - 130u8, - 114u8, - 227u8, - 102u8, - 214u8, - 146u8, - 215u8, - 183u8, - 179u8, - 151u8, - 43u8, - 187u8, - ], - ) - } - pub fn set_hrmp_max_parachain_outbound_channels( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload< - types::SetHrmpMaxParachainOutboundChannels, - > { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_max_parachain_outbound_channels", - types::SetHrmpMaxParachainOutboundChannels { - new, - }, - [ - 91u8, - 100u8, - 158u8, - 17u8, - 123u8, - 31u8, - 6u8, - 92u8, - 80u8, - 92u8, - 83u8, - 195u8, - 234u8, - 207u8, - 55u8, - 88u8, - 75u8, - 81u8, - 219u8, - 131u8, - 234u8, - 5u8, - 75u8, - 236u8, - 57u8, - 93u8, - 70u8, - 145u8, - 255u8, - 171u8, - 25u8, - 174u8, - ], - ) - } - pub fn set_hrmp_max_parathread_outbound_channels( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload< - types::SetHrmpMaxParathreadOutboundChannels, - > { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_max_parathread_outbound_channels", - types::SetHrmpMaxParathreadOutboundChannels { - new, - }, - [ - 147u8, - 44u8, - 219u8, - 160u8, - 208u8, - 228u8, - 97u8, - 106u8, - 247u8, - 254u8, - 48u8, - 90u8, - 62u8, - 151u8, - 207u8, - 214u8, - 98u8, - 163u8, - 76u8, - 175u8, - 47u8, - 218u8, - 52u8, - 88u8, - 165u8, - 159u8, - 169u8, - 165u8, - 192u8, - 163u8, - 37u8, - 110u8, - ], - ) - } - pub fn set_hrmp_max_message_num_per_candidate( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_hrmp_max_message_num_per_candidate", - types::SetHrmpMaxMessageNumPerCandidate { - new, - }, - [ - 179u8, - 44u8, - 231u8, - 12u8, - 166u8, - 160u8, - 223u8, - 164u8, - 218u8, - 173u8, - 157u8, - 49u8, - 16u8, - 220u8, - 0u8, - 224u8, - 67u8, - 194u8, - 210u8, - 207u8, - 237u8, - 96u8, - 96u8, - 24u8, - 71u8, - 237u8, - 30u8, - 152u8, - 105u8, - 245u8, - 157u8, - 218u8, - ], - ) - } - pub fn set_pvf_checking_enabled( - &self, - new: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_pvf_checking_enabled", - types::SetPvfCheckingEnabled { - new, - }, - [ - 27u8, - 146u8, - 204u8, - 24u8, - 52u8, - 183u8, - 126u8, - 151u8, - 243u8, - 172u8, - 175u8, - 96u8, - 36u8, - 210u8, - 162u8, - 142u8, - 71u8, - 211u8, - 51u8, - 12u8, - 105u8, - 148u8, - 181u8, - 111u8, - 182u8, - 161u8, - 196u8, - 163u8, - 99u8, - 149u8, - 139u8, - 12u8, - ], - ) - } - pub fn set_pvf_voting_ttl( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_pvf_voting_ttl", - types::SetPvfVotingTtl { new }, - [ - 115u8, - 135u8, - 76u8, - 222u8, - 214u8, - 80u8, - 103u8, - 250u8, - 194u8, - 34u8, - 129u8, - 245u8, - 216u8, - 69u8, - 166u8, - 247u8, - 138u8, - 94u8, - 135u8, - 228u8, - 90u8, - 145u8, - 2u8, - 244u8, - 73u8, - 178u8, - 61u8, - 251u8, - 21u8, - 197u8, - 202u8, - 246u8, - ], - ) - } - pub fn set_minimum_validation_upgrade_delay( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_minimum_validation_upgrade_delay", - types::SetMinimumValidationUpgradeDelay { - new, - }, - [ - 143u8, - 217u8, - 201u8, - 206u8, - 206u8, - 244u8, - 116u8, - 118u8, - 13u8, - 169u8, - 132u8, - 125u8, - 253u8, - 178u8, - 196u8, - 12u8, - 251u8, - 32u8, - 201u8, - 133u8, - 50u8, - 59u8, - 37u8, - 169u8, - 198u8, - 112u8, - 136u8, - 47u8, - 205u8, - 141u8, - 191u8, - 212u8, - ], - ) - } - pub fn set_bypass_consistency_check( - &self, - new: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_bypass_consistency_check", - types::SetBypassConsistencyCheck { - new, - }, - [ - 11u8, - 211u8, - 68u8, - 221u8, - 178u8, - 108u8, - 101u8, - 55u8, - 107u8, - 135u8, - 203u8, - 112u8, - 173u8, - 161u8, - 23u8, - 104u8, - 95u8, - 200u8, - 46u8, - 231u8, - 114u8, - 3u8, - 8u8, - 89u8, - 147u8, - 141u8, - 55u8, - 65u8, - 125u8, - 45u8, - 218u8, - 78u8, - ], - ) - } - pub fn set_async_backing_params( - &self, - new: runtime_types::polkadot_primitives::vstaging::AsyncBackingParams, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_async_backing_params", - types::SetAsyncBackingParams { - new, - }, - [ - 28u8, - 148u8, - 243u8, - 41u8, - 68u8, - 91u8, - 113u8, - 162u8, - 126u8, - 115u8, - 122u8, - 220u8, - 126u8, - 19u8, - 119u8, - 236u8, - 20u8, - 112u8, - 181u8, - 76u8, - 191u8, - 225u8, - 44u8, - 207u8, - 85u8, - 246u8, - 10u8, - 167u8, - 132u8, - 211u8, - 14u8, - 83u8, - ], - ) - } - pub fn set_executor_params( - &self, - new: runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_executor_params", - types::SetExecutorParams { new }, - [ - 219u8, - 27u8, - 25u8, - 162u8, - 61u8, - 189u8, - 61u8, - 32u8, - 101u8, - 139u8, - 89u8, - 51u8, - 191u8, - 223u8, - 94u8, - 145u8, - 109u8, - 247u8, - 22u8, - 64u8, - 178u8, - 97u8, - 239u8, - 0u8, - 125u8, - 20u8, - 62u8, - 210u8, - 110u8, - 79u8, - 225u8, - 43u8, - ], - ) - } - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - 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", - ::alloc::vec::Vec::new(), - [ - 205u8, - 102u8, - 42u8, - 9u8, - 144u8, - 0u8, - 31u8, - 85u8, - 111u8, - 44u8, - 145u8, - 123u8, - 200u8, - 195u8, - 163u8, - 59u8, - 202u8, - 66u8, - 156u8, - 196u8, - 32u8, - 204u8, - 209u8, - 201u8, - 133u8, - 103u8, - 66u8, - 179u8, - 28u8, - 41u8, - 196u8, - 154u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 18u8, - 179u8, - 253u8, - 26u8, - 153u8, - 33u8, - 99u8, - 167u8, - 90u8, - 57u8, - 97u8, - 114u8, - 99u8, - 71u8, - 69u8, - 76u8, - 176u8, - 90u8, - 240u8, - 137u8, - 231u8, - 24u8, - 75u8, - 138u8, - 149u8, - 176u8, - 197u8, - 96u8, - 90u8, - 154u8, - 109u8, - 218u8, - ], - ) - } - pub fn bypass_consistency_check( - &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( - "Configuration", - "BypassConsistencyCheck", - ::alloc::vec::Vec::new(), - [ - 109u8, - 201u8, - 130u8, - 189u8, - 167u8, - 112u8, - 171u8, - 180u8, - 100u8, - 146u8, - 23u8, - 174u8, - 199u8, - 230u8, - 185u8, - 155u8, - 178u8, - 45u8, - 24u8, - 66u8, - 211u8, - 234u8, - 11u8, - 103u8, - 148u8, - 12u8, - 247u8, - 101u8, - 147u8, - 18u8, - 11u8, - 89u8, - ], - ) - } - } - } - } - pub mod paras_shared { - use super::root_mod; - use super::runtime_types; - pub type Call = runtime_types::polkadot_runtime_parachains::shared::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - } - pub struct TransactionApi; - impl TransactionApi {} - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn current_session_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( - "ParasShared", - "CurrentSessionIndex", - ::alloc::vec::Vec::new(), - [ - 250u8, - 164u8, - 179u8, - 84u8, - 199u8, - 245u8, - 116u8, - 48u8, - 86u8, - 127u8, - 50u8, - 117u8, - 236u8, - 41u8, - 107u8, - 238u8, - 151u8, - 236u8, - 68u8, - 78u8, - 152u8, - 5u8, - 155u8, - 107u8, - 69u8, - 197u8, - 222u8, - 94u8, - 150u8, - 2u8, - 31u8, - 191u8, - ], - ) - } - pub fn active_validator_indices( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::ValidatorIndex, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ParasShared", - "ActiveValidatorIndices", - ::alloc::vec::Vec::new(), - [ - 80u8, - 207u8, - 217u8, - 195u8, - 69u8, - 151u8, - 27u8, - 205u8, - 227u8, - 89u8, - 71u8, - 180u8, - 91u8, - 116u8, - 82u8, - 193u8, - 108u8, - 115u8, - 40u8, - 247u8, - 160u8, - 39u8, - 85u8, - 99u8, - 42u8, - 87u8, - 54u8, - 168u8, - 230u8, - 201u8, - 212u8, - 39u8, - ], - ) - } - pub fn active_validator_keys( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::validator_app::Public, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ParasShared", - "ActiveValidatorKeys", - ::alloc::vec::Vec::new(), - [ - 155u8, - 151u8, - 155u8, - 8u8, - 23u8, - 38u8, - 91u8, - 12u8, - 94u8, - 69u8, - 228u8, - 185u8, - 14u8, - 219u8, - 215u8, - 98u8, - 235u8, - 222u8, - 157u8, - 180u8, - 230u8, - 121u8, - 205u8, - 167u8, - 156u8, - 134u8, - 180u8, - 213u8, - 87u8, - 61u8, - 174u8, - 222u8, - ], - ) - } - } - } - } - pub mod para_inclusion { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::polkadot_runtime_parachains::inclusion::pallet::Error; - pub type Call = runtime_types::polkadot_runtime_parachains::inclusion::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - } - pub struct TransactionApi; - impl TransactionApi {} - } - pub type Event = runtime_types::polkadot_runtime_parachains::inclusion::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CandidateBacked( - pub runtime_types::polkadot_primitives::v4::CandidateReceipt< - ::subxt::utils::H256, - >, - pub runtime_types::polkadot_parachain::primitives::HeadData, - pub runtime_types::polkadot_primitives::v4::CoreIndex, - pub runtime_types::polkadot_primitives::v4::GroupIndex, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CandidateBacked { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - CandidateBacked( - { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateBacked.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateBacked.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateBacked.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateBacked.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CandidateBacked { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.2), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.3), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.2, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.3, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CandidateBacked {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CandidateBacked { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CandidateBacked; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok( - CandidateBacked( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for CandidateBacked { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CandidateBacked { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidateBacked(_0, _1, _2, _3) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CandidateBacked { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidateBacked(_0, _1, _2, _3) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CandidateBacked { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field4_finish( - f, - "CandidateBacked", - &self.0, - &self.1, - &self.2, - &&self.3, - ) - } - } - impl ::subxt::events::StaticEvent for CandidateBacked { - const PALLET: &'static str = "ParaInclusion"; - const EVENT: &'static str = "CandidateBacked"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CandidateIncluded( - pub runtime_types::polkadot_primitives::v4::CandidateReceipt< - ::subxt::utils::H256, - >, - pub runtime_types::polkadot_parachain::primitives::HeadData, - pub runtime_types::polkadot_primitives::v4::CoreIndex, - pub runtime_types::polkadot_primitives::v4::GroupIndex, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CandidateIncluded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - CandidateIncluded( - { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateIncluded.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateIncluded.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateIncluded.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateIncluded.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CandidateIncluded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.2), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.3), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.2, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.3, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CandidateIncluded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CandidateIncluded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CandidateIncluded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok( - CandidateIncluded( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CandidateIncluded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CandidateIncluded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidateIncluded(_0, _1, _2, _3) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CandidateIncluded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidateIncluded(_0, _1, _2, _3) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CandidateIncluded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field4_finish( - f, - "CandidateIncluded", - &self.0, - &self.1, - &self.2, - &&self.3, - ) - } - } - impl ::subxt::events::StaticEvent for CandidateIncluded { - const PALLET: &'static str = "ParaInclusion"; - const EVENT: &'static str = "CandidateIncluded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CandidateTimedOut( - pub runtime_types::polkadot_primitives::v4::CandidateReceipt< - ::subxt::utils::H256, - >, - pub runtime_types::polkadot_parachain::primitives::HeadData, - pub runtime_types::polkadot_primitives::v4::CoreIndex, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CandidateTimedOut { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - CandidateTimedOut( - { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateTimedOut.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateTimedOut.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateTimedOut.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CandidateTimedOut { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.2), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.2, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CandidateTimedOut {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CandidateTimedOut { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CandidateTimedOut; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok( - CandidateTimedOut( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CandidateTimedOut { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CandidateTimedOut { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidateTimedOut(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CandidateTimedOut { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidateTimedOut(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CandidateTimedOut { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "CandidateTimedOut", - &self.0, - &self.1, - &&self.2, - ) - } - } - impl ::subxt::events::StaticEvent for CandidateTimedOut { - const PALLET: &'static str = "ParaInclusion"; - const EVENT: &'static str = "CandidateTimedOut"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UpwardMessagesReceived { - pub from: runtime_types::polkadot_parachain::primitives::Id, - pub count: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for UpwardMessagesReceived { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(UpwardMessagesReceived { - from: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UpwardMessagesReceived::from`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - count: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UpwardMessagesReceived::count`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for UpwardMessagesReceived { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.from), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.count), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.from, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.count, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for UpwardMessagesReceived {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for UpwardMessagesReceived { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UpwardMessagesReceived; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(UpwardMessagesReceived { - from: { - let val = *vals - .get(&Some("from")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "from".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - count: { - let val = *vals - .get(&Some("count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "count".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("count"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(UpwardMessagesReceived { - from: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("count"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for UpwardMessagesReceived { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for UpwardMessagesReceived { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UpwardMessagesReceived { from, count } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("from"), - from as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("count"), - count as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for UpwardMessagesReceived { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UpwardMessagesReceived { from, count } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("from"), - from as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("count"), - count as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for UpwardMessagesReceived { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "UpwardMessagesReceived", - "from", - &self.from, - "count", - &&self.count, - ) - } - } - impl ::subxt::events::StaticEvent for UpwardMessagesReceived { - const PALLET: &'static str = "ParaInclusion"; - const EVENT: &'static str = "UpwardMessagesReceived"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn availability_bitfields_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 163u8, - 169u8, - 217u8, - 160u8, - 147u8, - 165u8, - 186u8, - 21u8, - 171u8, - 177u8, - 74u8, - 69u8, - 55u8, - 205u8, - 46u8, - 13u8, - 253u8, - 83u8, - 55u8, - 190u8, - 22u8, - 61u8, - 32u8, - 209u8, - 54u8, - 120u8, - 187u8, - 39u8, - 114u8, - 70u8, - 212u8, - 170u8, - ], - ) - } - pub fn availability_bitfields( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_primitives::v4::ValidatorIndex, - >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_parachains::inclusion::AvailabilityBitfieldRecord< - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ParaInclusion", - "AvailabilityBitfields", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 163u8, - 169u8, - 217u8, - 160u8, - 147u8, - 165u8, - 186u8, - 21u8, - 171u8, - 177u8, - 74u8, - 69u8, - 55u8, - 205u8, - 46u8, - 13u8, - 253u8, - 83u8, - 55u8, - 190u8, - 22u8, - 61u8, - 32u8, - 209u8, - 54u8, - 120u8, - 187u8, - 39u8, - 114u8, - 70u8, - 212u8, - 170u8, - ], - ) - } - pub fn pending_availability_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 164u8, - 175u8, - 34u8, - 182u8, - 190u8, - 147u8, - 42u8, - 185u8, - 162u8, - 130u8, - 33u8, - 159u8, - 234u8, - 242u8, - 90u8, - 119u8, - 2u8, - 195u8, - 48u8, - 150u8, - 135u8, - 87u8, - 8u8, - 142u8, - 243u8, - 142u8, - 57u8, - 121u8, - 225u8, - 218u8, - 22u8, - 132u8, - ], - ) - } - 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::Address::new_static( - "ParaInclusion", - "PendingAvailability", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 164u8, - 175u8, - 34u8, - 182u8, - 190u8, - 147u8, - 42u8, - 185u8, - 162u8, - 130u8, - 33u8, - 159u8, - 234u8, - 242u8, - 90u8, - 119u8, - 2u8, - 195u8, - 48u8, - 150u8, - 135u8, - 87u8, - 8u8, - 142u8, - 243u8, - 142u8, - 57u8, - 121u8, - 225u8, - 218u8, - 22u8, - 132u8, - ], - ) - } - pub fn pending_availability_commitments_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v4::CandidateCommitments< - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ParaInclusion", - "PendingAvailabilityCommitments", - ::alloc::vec::Vec::new(), - [ - 196u8, - 210u8, - 210u8, - 16u8, - 246u8, - 105u8, - 121u8, - 178u8, - 5u8, - 48u8, - 40u8, - 183u8, - 63u8, - 147u8, - 48u8, - 74u8, - 20u8, - 83u8, - 76u8, - 84u8, - 41u8, - 30u8, - 182u8, - 246u8, - 164u8, - 108u8, - 113u8, - 16u8, - 169u8, - 64u8, - 97u8, - 202u8, - ], - ) - } - 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::v4::CandidateCommitments< - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ParaInclusion", - "PendingAvailabilityCommitments", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 196u8, - 210u8, - 210u8, - 16u8, - 246u8, - 105u8, - 121u8, - 178u8, - 5u8, - 48u8, - 40u8, - 183u8, - 63u8, - 147u8, - 48u8, - 74u8, - 20u8, - 83u8, - 76u8, - 84u8, - 41u8, - 30u8, - 182u8, - 246u8, - 164u8, - 108u8, - 113u8, - 16u8, - 169u8, - 64u8, - 97u8, - 202u8, - ], - ) - } - } - } - } - pub mod para_inherent { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::polkadot_runtime_parachains::paras_inherent::pallet::Error; - pub type Call = runtime_types::polkadot_runtime_parachains::paras_inherent::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Enter { - pub data: runtime_types::polkadot_primitives::v4::InherentData< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Enter { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Enter { - data: { - let __codec_res_edqy = , - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Enter::data`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Enter { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.data) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.data, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.data) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.data, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Enter {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Enter { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Enter; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Enter { - data: { - let val = *vals - .get(&Some("data")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "data".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Enter { - data: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Enter { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Enter { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Enter { data } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("data"), - data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Enter { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Enter { data } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("data"), - data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Enter { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Enter", - "data", - &&self.data, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Enter { - const PALLET: &'static str = "ParaInherent"; - const CALL: &'static str = "enter"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn enter( - &self, - data: runtime_types::polkadot_primitives::v4::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", - types::Enter { data }, - [ - 145u8, - 120u8, - 158u8, - 39u8, - 139u8, - 223u8, - 236u8, - 209u8, - 253u8, - 108u8, - 188u8, - 21u8, - 23u8, - 61u8, - 25u8, - 171u8, - 30u8, - 203u8, - 161u8, - 117u8, - 90u8, - 55u8, - 50u8, - 107u8, - 26u8, - 52u8, - 26u8, - 158u8, - 56u8, - 218u8, - 186u8, - 142u8, - ], - ) - } - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn included( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - (), - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ParaInherent", - "Included", - ::alloc::vec::Vec::new(), - [ - 108u8, - 164u8, - 163u8, - 34u8, - 27u8, - 124u8, - 202u8, - 167u8, - 48u8, - 130u8, - 155u8, - 211u8, - 148u8, - 130u8, - 76u8, - 16u8, - 5u8, - 250u8, - 211u8, - 174u8, - 90u8, - 77u8, - 198u8, - 153u8, - 175u8, - 168u8, - 131u8, - 244u8, - 27u8, - 93u8, - 60u8, - 46u8, - ], - ) - } - pub fn on_chain_votes( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v4::ScrapedOnChainVotes< - ::subxt::utils::H256, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ParaInherent", - "OnChainVotes", - ::alloc::vec::Vec::new(), - [ - 200u8, - 210u8, - 42u8, - 153u8, - 85u8, - 71u8, - 171u8, - 108u8, - 148u8, - 212u8, - 108u8, - 61u8, - 178u8, - 77u8, - 129u8, - 90u8, - 120u8, - 218u8, - 228u8, - 152u8, - 120u8, - 226u8, - 29u8, - 82u8, - 239u8, - 146u8, - 41u8, - 164u8, - 193u8, - 207u8, - 246u8, - 115u8, - ], - ) - } - } - } - } - pub mod para_scheduler { - use super::root_mod; - use super::runtime_types; - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn validator_groups( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::ValidatorIndex, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ParaScheduler", - "ValidatorGroups", - ::alloc::vec::Vec::new(), - [ - 129u8, - 58u8, - 65u8, - 112u8, - 4u8, - 172u8, - 167u8, - 19u8, - 96u8, - 154u8, - 159u8, - 83u8, - 94u8, - 125u8, - 60u8, - 43u8, - 60u8, - 70u8, - 1u8, - 58u8, - 222u8, - 31u8, - 73u8, - 53u8, - 71u8, - 181u8, - 49u8, - 64u8, - 212u8, - 90u8, - 128u8, - 185u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 66u8, - 237u8, - 244u8, - 120u8, - 58u8, - 185u8, - 225u8, - 198u8, - 83u8, - 7u8, - 254u8, - 95u8, - 104u8, - 128u8, - 105u8, - 225u8, - 117u8, - 35u8, - 231u8, - 64u8, - 46u8, - 169u8, - 9u8, - 35u8, - 89u8, - 199u8, - 239u8, - 51u8, - 165u8, - 115u8, - 226u8, - 60u8, - ], - ) - } - pub fn availability_cores( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - ::core::option::Option< - runtime_types::polkadot_primitives::v4::CoreOccupied, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ParaScheduler", - "AvailabilityCores", - ::alloc::vec::Vec::new(), - [ - 22u8, - 238u8, - 81u8, - 4u8, - 74u8, - 143u8, - 125u8, - 245u8, - 54u8, - 117u8, - 128u8, - 142u8, - 214u8, - 162u8, - 106u8, - 86u8, - 151u8, - 45u8, - 33u8, - 153u8, - 164u8, - 182u8, - 223u8, - 19u8, - 44u8, - 211u8, - 206u8, - 95u8, - 249u8, - 36u8, - 188u8, - 129u8, - ], - ) - } - pub fn parathread_claim_index( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ParaScheduler", - "ParathreadClaimIndex", - ::alloc::vec::Vec::new(), - [ - 40u8, - 118u8, - 124u8, - 168u8, - 174u8, - 131u8, - 61u8, - 35u8, - 175u8, - 100u8, - 69u8, - 184u8, - 191u8, - 17u8, - 151u8, - 219u8, - 81u8, - 160u8, - 199u8, - 33u8, - 227u8, - 20u8, - 48u8, - 90u8, - 61u8, - 157u8, - 136u8, - 60u8, - 25u8, - 45u8, - 81u8, - 208u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 185u8, - 76u8, - 120u8, - 75u8, - 154u8, - 31u8, - 33u8, - 243u8, - 16u8, - 77u8, - 100u8, - 249u8, - 21u8, - 44u8, - 199u8, - 195u8, - 37u8, - 9u8, - 218u8, - 148u8, - 222u8, - 90u8, - 113u8, - 34u8, - 152u8, - 215u8, - 114u8, - 134u8, - 81u8, - 139u8, - 164u8, - 71u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 180u8, - 21u8, - 56u8, - 68u8, - 56u8, - 82u8, - 50u8, - 7u8, - 71u8, - 167u8, - 6u8, - 2u8, - 235u8, - 39u8, - 78u8, - 23u8, - 173u8, - 129u8, - 112u8, - 131u8, - 35u8, - 147u8, - 80u8, - 173u8, - 47u8, - 108u8, - 170u8, - 247u8, - 213u8, - 71u8, - 247u8, - 151u8, - ], - ) - } - } - } - } - pub mod paras { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::polkadot_runtime_parachains::paras::pallet::Error; - pub type Call = runtime_types::polkadot_runtime_parachains::paras::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceSetCurrentCode { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceSetCurrentCode { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceSetCurrentCode { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceSetCurrentCode::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_code: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceSetCurrentCode::new_code`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceSetCurrentCode { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new_code), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.para, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.new_code, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceSetCurrentCode {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ForceSetCurrentCode { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceSetCurrentCode; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceSetCurrentCode { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_code: { - let val = *vals - .get(&Some("new_code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_code".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_code"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ForceSetCurrentCode { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_code"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceSetCurrentCode { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ForceSetCurrentCode { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceSetCurrentCode { para, new_code } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_code"), - new_code as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ForceSetCurrentCode { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceSetCurrentCode { para, new_code } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_code"), - new_code as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceSetCurrentCode { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ForceSetCurrentCode", - "para", - &self.para, - "new_code", - &&self.new_code, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceSetCurrentCode { - const PALLET: &'static str = "Paras"; - const CALL: &'static str = "force_set_current_code"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceSetCurrentHead { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceSetCurrentHead { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceSetCurrentHead { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceSetCurrentHead::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_head: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceSetCurrentHead::new_head`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceSetCurrentHead { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new_head), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.para, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.new_head, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceSetCurrentHead {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ForceSetCurrentHead { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceSetCurrentHead; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceSetCurrentHead { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_head: { - let val = *vals - .get(&Some("new_head")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_head".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_head"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ForceSetCurrentHead { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_head: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_head"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceSetCurrentHead { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ForceSetCurrentHead { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceSetCurrentHead { para, new_head } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_head"), - new_head as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ForceSetCurrentHead { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceSetCurrentHead { para, new_head } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_head"), - new_head as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceSetCurrentHead { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ForceSetCurrentHead", - "para", - &self.para, - "new_head", - &&self.new_head, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceSetCurrentHead { - const PALLET: &'static str = "Paras"; - const CALL: &'static str = "force_set_current_head"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceScheduleCodeUpgrade { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - pub relay_parent_number: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceScheduleCodeUpgrade { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceScheduleCodeUpgrade { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceScheduleCodeUpgrade::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_code: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ForceScheduleCodeUpgrade::new_code`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - relay_parent_number: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ForceScheduleCodeUpgrade::relay_parent_number`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceScheduleCodeUpgrade { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new_code), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.relay_parent_number, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.para, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.new_code, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.relay_parent_number, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for ForceScheduleCodeUpgrade {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ForceScheduleCodeUpgrade { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceScheduleCodeUpgrade; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceScheduleCodeUpgrade { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_code: { - let val = *vals - .get(&Some("new_code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_code".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_code"))? - }, - relay_parent_number: { - let val = *vals - .get(&Some("relay_parent_number")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "relay_parent_number".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("relay_parent_number"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(ForceScheduleCodeUpgrade { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_code"))? - }, - relay_parent_number: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("relay_parent_number"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceScheduleCodeUpgrade { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ForceScheduleCodeUpgrade { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceScheduleCodeUpgrade { - para, - new_code, - relay_parent_number, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_code"), - new_code as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("relay_parent_number"), - relay_parent_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ForceScheduleCodeUpgrade { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceScheduleCodeUpgrade { - para, - new_code, - relay_parent_number, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_code"), - new_code as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("relay_parent_number"), - relay_parent_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceScheduleCodeUpgrade { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ForceScheduleCodeUpgrade", - "para", - &self.para, - "new_code", - &self.new_code, - "relay_parent_number", - &&self.relay_parent_number, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceScheduleCodeUpgrade { - const PALLET: &'static str = "Paras"; - const CALL: &'static str = "force_schedule_code_upgrade"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceNoteNewHead { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceNoteNewHead { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceNoteNewHead { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceNoteNewHead::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_head: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceNoteNewHead::new_head`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceNoteNewHead { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new_head), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.para, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.new_head, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceNoteNewHead {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ForceNoteNewHead { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceNoteNewHead; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceNoteNewHead { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_head: { - let val = *vals - .get(&Some("new_head")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_head".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_head"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ForceNoteNewHead { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_head: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_head"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceNoteNewHead { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceNoteNewHead { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceNoteNewHead { para, new_head } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_head"), - new_head as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ForceNoteNewHead { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceNoteNewHead { para, new_head } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_head"), - new_head as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceNoteNewHead { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ForceNoteNewHead", - "para", - &self.para, - "new_head", - &&self.new_head, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceNoteNewHead { - const PALLET: &'static str = "Paras"; - const CALL: &'static str = "force_note_new_head"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceQueueAction { - pub para: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceQueueAction { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceQueueAction { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceQueueAction::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceQueueAction { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.para) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.para, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.para) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.para, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceQueueAction {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ForceQueueAction { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceQueueAction; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceQueueAction { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ForceQueueAction { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceQueueAction { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceQueueAction { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceQueueAction { para } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ForceQueueAction { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceQueueAction { para } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceQueueAction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ForceQueueAction", - "para", - &&self.para, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceQueueAction { - const PALLET: &'static str = "Paras"; - const CALL: &'static str = "force_queue_action"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddTrustedValidationCode { - pub validation_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AddTrustedValidationCode { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AddTrustedValidationCode { - validation_code: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `AddTrustedValidationCode::validation_code`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AddTrustedValidationCode { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &&self.validation_code, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.validation_code, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.validation_code) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.validation_code, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for AddTrustedValidationCode {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for AddTrustedValidationCode { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AddTrustedValidationCode; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AddTrustedValidationCode { - validation_code: { - let val = *vals - .get(&Some("validation_code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validation_code".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(AddTrustedValidationCode { - validation_code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for AddTrustedValidationCode { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for AddTrustedValidationCode { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddTrustedValidationCode { validation_code } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validation_code"), - validation_code - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for AddTrustedValidationCode { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddTrustedValidationCode { validation_code } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validation_code"), - validation_code - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AddTrustedValidationCode { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "AddTrustedValidationCode", - "validation_code", - &&self.validation_code, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for AddTrustedValidationCode { - const PALLET: &'static str = "Paras"; - const CALL: &'static str = "add_trusted_validation_code"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PokeUnusedValidationCode { - pub validation_code_hash: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PokeUnusedValidationCode { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(PokeUnusedValidationCode { - validation_code_hash: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `PokeUnusedValidationCode::validation_code_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PokeUnusedValidationCode { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &&self.validation_code_hash, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.validation_code_hash, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &&self.validation_code_hash, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.validation_code_hash, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for PokeUnusedValidationCode {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for PokeUnusedValidationCode { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PokeUnusedValidationCode; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PokeUnusedValidationCode { - validation_code_hash: { - let val = *vals - .get(&Some("validation_code_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validation_code_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(PokeUnusedValidationCode { - validation_code_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PokeUnusedValidationCode { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for PokeUnusedValidationCode { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PokeUnusedValidationCode { validation_code_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validation_code_hash"), - validation_code_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for PokeUnusedValidationCode { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PokeUnusedValidationCode { validation_code_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validation_code_hash"), - validation_code_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PokeUnusedValidationCode { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "PokeUnusedValidationCode", - "validation_code_hash", - &&self.validation_code_hash, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for PokeUnusedValidationCode { - const PALLET: &'static str = "Paras"; - const CALL: &'static str = "poke_unused_validation_code"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IncludePvfCheckStatement { - pub stmt: runtime_types::polkadot_primitives::v4::PvfCheckStatement, - pub signature: runtime_types::polkadot_primitives::v4::validator_app::Signature, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for IncludePvfCheckStatement { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(IncludePvfCheckStatement { - stmt: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IncludePvfCheckStatement::stmt`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - signature: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `IncludePvfCheckStatement::signature`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for IncludePvfCheckStatement { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.stmt), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.signature), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.stmt, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.signature, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for IncludePvfCheckStatement {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for IncludePvfCheckStatement { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = IncludePvfCheckStatement; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(IncludePvfCheckStatement { - stmt: { - let val = *vals - .get(&Some("stmt")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stmt".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stmt"))? - }, - signature: { - let val = *vals - .get(&Some("signature")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "signature".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(IncludePvfCheckStatement { - stmt: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stmt"))? - }, - signature: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for IncludePvfCheckStatement { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for IncludePvfCheckStatement { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IncludePvfCheckStatement { stmt, signature } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stmt"), - stmt as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("signature"), - signature as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for IncludePvfCheckStatement { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IncludePvfCheckStatement { stmt, signature } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stmt"), - stmt as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("signature"), - signature as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for IncludePvfCheckStatement { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "IncludePvfCheckStatement", - "stmt", - &self.stmt, - "signature", - &&self.signature, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for IncludePvfCheckStatement { - const PALLET: &'static str = "Paras"; - const CALL: &'static str = "include_pvf_check_statement"; - } - } - pub struct TransactionApi; - impl TransactionApi { - 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", - types::ForceSetCurrentCode { - para, - new_code, - }, - [ - 204u8, - 159u8, - 184u8, - 235u8, - 65u8, - 225u8, - 223u8, - 130u8, - 139u8, - 140u8, - 219u8, - 58u8, - 142u8, - 253u8, - 236u8, - 239u8, - 148u8, - 190u8, - 27u8, - 234u8, - 165u8, - 125u8, - 129u8, - 235u8, - 98u8, - 33u8, - 172u8, - 71u8, - 90u8, - 41u8, - 182u8, - 80u8, - ], - ) - } - 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", - types::ForceSetCurrentHead { - para, - new_head, - }, - [ - 184u8, - 247u8, - 184u8, - 248u8, - 89u8, - 64u8, - 18u8, - 193u8, - 254u8, - 71u8, - 220u8, - 195u8, - 124u8, - 212u8, - 178u8, - 169u8, - 155u8, - 189u8, - 11u8, - 135u8, - 247u8, - 39u8, - 253u8, - 196u8, - 111u8, - 242u8, - 189u8, - 91u8, - 226u8, - 219u8, - 232u8, - 238u8, - ], - ) - } - 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", - types::ForceScheduleCodeUpgrade { - para, - new_code, - relay_parent_number, - }, - [ - 131u8, - 179u8, - 138u8, - 151u8, - 167u8, - 191u8, - 2u8, - 68u8, - 85u8, - 111u8, - 166u8, - 65u8, - 67u8, - 52u8, - 201u8, - 41u8, - 132u8, - 128u8, - 35u8, - 177u8, - 91u8, - 185u8, - 114u8, - 2u8, - 123u8, - 133u8, - 164u8, - 121u8, - 170u8, - 243u8, - 223u8, - 61u8, - ], - ) - } - 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", - types::ForceNoteNewHead { - para, - new_head, - }, - [ - 215u8, - 12u8, - 228u8, - 208u8, - 7u8, - 24u8, - 207u8, - 60u8, - 183u8, - 241u8, - 212u8, - 203u8, - 139u8, - 149u8, - 9u8, - 236u8, - 77u8, - 15u8, - 242u8, - 70u8, - 62u8, - 204u8, - 187u8, - 91u8, - 110u8, - 73u8, - 210u8, - 2u8, - 8u8, - 118u8, - 182u8, - 171u8, - ], - ) - } - 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", - types::ForceQueueAction { para }, - [ - 112u8, - 247u8, - 239u8, - 8u8, - 91u8, - 23u8, - 111u8, - 84u8, - 179u8, - 61u8, - 235u8, - 49u8, - 140u8, - 110u8, - 40u8, - 226u8, - 150u8, - 253u8, - 146u8, - 193u8, - 136u8, - 133u8, - 100u8, - 127u8, - 38u8, - 165u8, - 159u8, - 17u8, - 205u8, - 190u8, - 6u8, - 117u8, - ], - ) - } - 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", - types::AddTrustedValidationCode { - validation_code, - }, - [ - 196u8, - 123u8, - 133u8, - 223u8, - 3u8, - 205u8, - 127u8, - 23u8, - 82u8, - 201u8, - 107u8, - 47u8, - 23u8, - 75u8, - 139u8, - 198u8, - 178u8, - 171u8, - 160u8, - 61u8, - 132u8, - 250u8, - 76u8, - 110u8, - 3u8, - 144u8, - 90u8, - 253u8, - 89u8, - 141u8, - 162u8, - 135u8, - ], - ) - } - 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", - types::PokeUnusedValidationCode { - validation_code_hash, - }, - [ - 180u8, - 53u8, - 213u8, - 27u8, - 150u8, - 195u8, - 50u8, - 1u8, - 62u8, - 246u8, - 244u8, - 229u8, - 115u8, - 202u8, - 55u8, - 140u8, - 108u8, - 28u8, - 245u8, - 66u8, - 165u8, - 128u8, - 105u8, - 221u8, - 7u8, - 87u8, - 242u8, - 19u8, - 88u8, - 132u8, - 36u8, - 32u8, - ], - ) - } - pub fn include_pvf_check_statement( - &self, - stmt: runtime_types::polkadot_primitives::v4::PvfCheckStatement, - signature: runtime_types::polkadot_primitives::v4::validator_app::Signature, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Paras", - "include_pvf_check_statement", - types::IncludePvfCheckStatement { - stmt, - signature, - }, - [ - 104u8, - 113u8, - 121u8, - 186u8, - 41u8, - 70u8, - 254u8, - 44u8, - 207u8, - 94u8, - 61u8, - 148u8, - 106u8, - 240u8, - 165u8, - 223u8, - 231u8, - 190u8, - 157u8, - 97u8, - 55u8, - 90u8, - 229u8, - 112u8, - 129u8, - 224u8, - 29u8, - 180u8, - 242u8, - 203u8, - 195u8, - 19u8, - ], - ) - } - } - } - pub type Event = runtime_types::polkadot_runtime_parachains::paras::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CurrentCodeUpdated( - pub runtime_types::polkadot_parachain::primitives::Id, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CurrentCodeUpdated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - CurrentCodeUpdated({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CurrentCodeUpdated.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CurrentCodeUpdated { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CurrentCodeUpdated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CurrentCodeUpdated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CurrentCodeUpdated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - CurrentCodeUpdated({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CurrentCodeUpdated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CurrentCodeUpdated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CurrentCodeUpdated(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CurrentCodeUpdated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CurrentCodeUpdated(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CurrentCodeUpdated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "CurrentCodeUpdated", - &&self.0, - ) - } - } - impl ::subxt::events::StaticEvent for CurrentCodeUpdated { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "CurrentCodeUpdated"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CurrentHeadUpdated( - pub runtime_types::polkadot_parachain::primitives::Id, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CurrentHeadUpdated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - CurrentHeadUpdated({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CurrentHeadUpdated.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CurrentHeadUpdated { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CurrentHeadUpdated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CurrentHeadUpdated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CurrentHeadUpdated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - CurrentHeadUpdated({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CurrentHeadUpdated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CurrentHeadUpdated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CurrentHeadUpdated(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CurrentHeadUpdated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CurrentHeadUpdated(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CurrentHeadUpdated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "CurrentHeadUpdated", - &&self.0, - ) - } - } - impl ::subxt::events::StaticEvent for CurrentHeadUpdated { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "CurrentHeadUpdated"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CodeUpgradeScheduled( - pub runtime_types::polkadot_parachain::primitives::Id, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CodeUpgradeScheduled { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - CodeUpgradeScheduled({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CodeUpgradeScheduled.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CodeUpgradeScheduled { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CodeUpgradeScheduled {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for CodeUpgradeScheduled { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CodeUpgradeScheduled; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - CodeUpgradeScheduled({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CodeUpgradeScheduled { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CodeUpgradeScheduled { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CodeUpgradeScheduled(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for CodeUpgradeScheduled { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CodeUpgradeScheduled(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CodeUpgradeScheduled { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "CodeUpgradeScheduled", - &&self.0, - ) - } - } - impl ::subxt::events::StaticEvent for CodeUpgradeScheduled { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "CodeUpgradeScheduled"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NewHeadNoted( - pub runtime_types::polkadot_parachain::primitives::Id, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NewHeadNoted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - NewHeadNoted({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NewHeadNoted.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NewHeadNoted { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NewHeadNoted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for NewHeadNoted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NewHeadNoted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - NewHeadNoted({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for NewHeadNoted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NewHeadNoted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewHeadNoted(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for NewHeadNoted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewHeadNoted(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NewHeadNoted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "NewHeadNoted", - &&self.0, - ) - } - } - impl ::subxt::events::StaticEvent for NewHeadNoted { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "NewHeadNoted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ActionQueued( - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::core::primitive::u32, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ActionQueued { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - ActionQueued( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ActionQueued.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ActionQueued.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ActionQueued { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ActionQueued {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ActionQueued { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ActionQueued; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - ActionQueued( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ActionQueued { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ActionQueued { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ActionQueued(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ActionQueued { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ActionQueued(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ActionQueued { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "ActionQueued", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for ActionQueued { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "ActionQueued"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PvfCheckStarted( - pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - pub runtime_types::polkadot_parachain::primitives::Id, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PvfCheckStarted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - PvfCheckStarted( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PvfCheckStarted.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PvfCheckStarted.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PvfCheckStarted { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PvfCheckStarted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PvfCheckStarted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PvfCheckStarted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - PvfCheckStarted( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for PvfCheckStarted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PvfCheckStarted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PvfCheckStarted(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PvfCheckStarted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PvfCheckStarted(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PvfCheckStarted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "PvfCheckStarted", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for PvfCheckStarted { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "PvfCheckStarted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PvfCheckAccepted( - pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - pub runtime_types::polkadot_parachain::primitives::Id, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PvfCheckAccepted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - PvfCheckAccepted( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PvfCheckAccepted.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PvfCheckAccepted.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PvfCheckAccepted { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PvfCheckAccepted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PvfCheckAccepted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PvfCheckAccepted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - PvfCheckAccepted( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PvfCheckAccepted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PvfCheckAccepted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PvfCheckAccepted(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PvfCheckAccepted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PvfCheckAccepted(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PvfCheckAccepted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "PvfCheckAccepted", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for PvfCheckAccepted { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "PvfCheckAccepted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PvfCheckRejected( - pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - pub runtime_types::polkadot_parachain::primitives::Id, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PvfCheckRejected { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - PvfCheckRejected( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PvfCheckRejected.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PvfCheckRejected.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PvfCheckRejected { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PvfCheckRejected {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PvfCheckRejected { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PvfCheckRejected; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - PvfCheckRejected( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PvfCheckRejected { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PvfCheckRejected { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PvfCheckRejected(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PvfCheckRejected { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PvfCheckRejected(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PvfCheckRejected { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "PvfCheckRejected", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for PvfCheckRejected { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "PvfCheckRejected"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn pvf_active_vote_map_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 216u8, - 212u8, - 234u8, - 214u8, - 209u8, - 164u8, - 99u8, - 74u8, - 18u8, - 189u8, - 61u8, - 178u8, - 189u8, - 246u8, - 208u8, - 50u8, - 53u8, - 183u8, - 200u8, - 146u8, - 19u8, - 120u8, - 209u8, - 118u8, - 129u8, - 115u8, - 248u8, - 7u8, - 188u8, - 78u8, - 186u8, - 181u8, - ], - ) - } - 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::Address::new_static( - "Paras", - "PvfActiveVoteMap", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 216u8, - 212u8, - 234u8, - 214u8, - 209u8, - 164u8, - 99u8, - 74u8, - 18u8, - 189u8, - 61u8, - 178u8, - 189u8, - 246u8, - 208u8, - 50u8, - 53u8, - 183u8, - 200u8, - 146u8, - 19u8, - 120u8, - 209u8, - 118u8, - 129u8, - 115u8, - 248u8, - 7u8, - 188u8, - 78u8, - 186u8, - 181u8, - ], - ) - } - pub fn pvf_active_vote_list( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "PvfActiveVoteList", - ::alloc::vec::Vec::new(), - [ - 172u8, - 215u8, - 137u8, - 191u8, - 52u8, - 104u8, - 106u8, - 118u8, - 134u8, - 82u8, - 137u8, - 6u8, - 175u8, - 158u8, - 58u8, - 230u8, - 231u8, - 152u8, - 195u8, - 17u8, - 51u8, - 133u8, - 10u8, - 205u8, - 212u8, - 6u8, - 24u8, - 59u8, - 114u8, - 222u8, - 96u8, - 42u8, - ], - ) - } - pub fn parachains( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "Parachains", - ::alloc::vec::Vec::new(), - [ - 242u8, - 228u8, - 175u8, - 107u8, - 242u8, - 39u8, - 52u8, - 181u8, - 32u8, - 171u8, - 21u8, - 169u8, - 204u8, - 19u8, - 21u8, - 217u8, - 121u8, - 239u8, - 218u8, - 252u8, - 80u8, - 188u8, - 119u8, - 157u8, - 235u8, - 218u8, - 221u8, - 113u8, - 0u8, - 108u8, - 245u8, - 210u8, - ], - ) - } - pub fn para_lifecycles_iter( - &self, - ) -> ::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", - ::alloc::vec::Vec::new(), - [ - 2u8, - 203u8, - 32u8, - 194u8, - 76u8, - 227u8, - 250u8, - 9u8, - 168u8, - 201u8, - 171u8, - 180u8, - 18u8, - 169u8, - 206u8, - 183u8, - 48u8, - 189u8, - 204u8, - 192u8, - 237u8, - 233u8, - 156u8, - 255u8, - 102u8, - 22u8, - 101u8, - 110u8, - 194u8, - 55u8, - 118u8, - 81u8, - ], - ) - } - pub fn para_lifecycles( - &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::paras::ParaLifecycle, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "ParaLifecycles", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 2u8, - 203u8, - 32u8, - 194u8, - 76u8, - 227u8, - 250u8, - 9u8, - 168u8, - 201u8, - 171u8, - 180u8, - 18u8, - 169u8, - 206u8, - 183u8, - 48u8, - 189u8, - 204u8, - 192u8, - 237u8, - 233u8, - 156u8, - 255u8, - 102u8, - 22u8, - 101u8, - 110u8, - 194u8, - 55u8, - 118u8, - 81u8, - ], - ) - } - pub fn heads_iter( - &self, - ) -> ::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", - ::alloc::vec::Vec::new(), - [ - 222u8, - 116u8, - 180u8, - 190u8, - 172u8, - 192u8, - 174u8, - 132u8, - 225u8, - 180u8, - 119u8, - 90u8, - 5u8, - 39u8, - 92u8, - 230u8, - 116u8, - 202u8, - 92u8, - 99u8, - 135u8, - 201u8, - 10u8, - 58u8, - 55u8, - 211u8, - 209u8, - 86u8, - 93u8, - 133u8, - 99u8, - 139u8, - ], - ) - } - pub fn heads( - &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::HeadData, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "Heads", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 222u8, - 116u8, - 180u8, - 190u8, - 172u8, - 192u8, - 174u8, - 132u8, - 225u8, - 180u8, - 119u8, - 90u8, - 5u8, - 39u8, - 92u8, - 230u8, - 116u8, - 202u8, - 92u8, - 99u8, - 135u8, - 201u8, - 10u8, - 58u8, - 55u8, - 211u8, - 209u8, - 86u8, - 93u8, - 133u8, - 99u8, - 139u8, - ], - ) - } - pub fn current_code_hash_iter( - &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", - "CurrentCodeHash", - ::alloc::vec::Vec::new(), - [ - 251u8, - 100u8, - 30u8, - 46u8, - 191u8, - 60u8, - 45u8, - 221u8, - 218u8, - 20u8, - 154u8, - 233u8, - 211u8, - 198u8, - 151u8, - 195u8, - 99u8, - 210u8, - 126u8, - 165u8, - 240u8, - 129u8, - 183u8, - 252u8, - 104u8, - 119u8, - 38u8, - 155u8, - 150u8, - 198u8, - 127u8, - 103u8, - ], - ) - } - pub fn current_code_hash( - &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::ValidationCodeHash, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "CurrentCodeHash", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 251u8, - 100u8, - 30u8, - 46u8, - 191u8, - 60u8, - 45u8, - 221u8, - 218u8, - 20u8, - 154u8, - 233u8, - 211u8, - 198u8, - 151u8, - 195u8, - 99u8, - 210u8, - 126u8, - 165u8, - 240u8, - 129u8, - 183u8, - 252u8, - 104u8, - 119u8, - 38u8, - 155u8, - 150u8, - 198u8, - 127u8, - 103u8, - ], - ) - } - pub fn past_code_hash_iter( - &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", - "PastCodeHash", - ::alloc::vec::Vec::new(), - [ - 73u8, - 209u8, - 188u8, - 36u8, - 127u8, - 42u8, - 171u8, - 136u8, - 29u8, - 126u8, - 220u8, - 209u8, - 230u8, - 22u8, - 12u8, - 63u8, - 8u8, - 102u8, - 45u8, - 158u8, - 178u8, - 232u8, - 8u8, - 6u8, - 71u8, - 188u8, - 140u8, - 41u8, - 10u8, - 215u8, - 22u8, - 153u8, - ], - ) - } - pub fn past_code_hash_iter1( - &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::ValidationCodeHash, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "PastCodeHash", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 73u8, - 209u8, - 188u8, - 36u8, - 127u8, - 42u8, - 171u8, - 136u8, - 29u8, - 126u8, - 220u8, - 209u8, - 230u8, - 22u8, - 12u8, - 63u8, - 8u8, - 102u8, - 45u8, - 158u8, - 178u8, - 232u8, - 8u8, - 6u8, - 71u8, - 188u8, - 140u8, - 41u8, - 10u8, - 215u8, - 22u8, - 153u8, - ], - ) - } - pub fn past_code_hash( - &self, - _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::Address::new_static( - "Paras", - "PastCodeHash", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 73u8, - 209u8, - 188u8, - 36u8, - 127u8, - 42u8, - 171u8, - 136u8, - 29u8, - 126u8, - 220u8, - 209u8, - 230u8, - 22u8, - 12u8, - 63u8, - 8u8, - 102u8, - 45u8, - 158u8, - 178u8, - 232u8, - 8u8, - 6u8, - 71u8, - 188u8, - 140u8, - 41u8, - 10u8, - 215u8, - 22u8, - 153u8, - ], - ) - } - pub fn past_code_meta_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_parachains::paras::ParaPastCodeMeta< - ::core::primitive::u32, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "PastCodeMeta", - ::alloc::vec::Vec::new(), - [ - 233u8, - 47u8, - 137u8, - 174u8, - 98u8, - 64u8, - 11u8, - 75u8, - 93u8, - 222u8, - 78u8, - 58u8, - 66u8, - 245u8, - 151u8, - 39u8, - 144u8, - 36u8, - 84u8, - 176u8, - 239u8, - 183u8, - 197u8, - 176u8, - 158u8, - 139u8, - 121u8, - 189u8, - 29u8, - 244u8, - 229u8, - 73u8, - ], - ) - } - pub fn past_code_meta( - &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::paras::ParaPastCodeMeta< - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "PastCodeMeta", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 233u8, - 47u8, - 137u8, - 174u8, - 98u8, - 64u8, - 11u8, - 75u8, - 93u8, - 222u8, - 78u8, - 58u8, - 66u8, - 245u8, - 151u8, - 39u8, - 144u8, - 36u8, - 84u8, - 176u8, - 239u8, - 183u8, - 197u8, - 176u8, - 158u8, - 139u8, - 121u8, - 189u8, - 29u8, - 244u8, - 229u8, - 73u8, - ], - ) - } - pub fn past_code_pruning( - &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", - "PastCodePruning", - ::alloc::vec::Vec::new(), - [ - 67u8, - 190u8, - 51u8, - 133u8, - 173u8, - 24u8, - 151u8, - 111u8, - 108u8, - 152u8, - 106u8, - 18u8, - 29u8, - 80u8, - 104u8, - 120u8, - 91u8, - 138u8, - 209u8, - 49u8, - 255u8, - 211u8, - 53u8, - 195u8, - 61u8, - 188u8, - 183u8, - 53u8, - 37u8, - 230u8, - 53u8, - 183u8, - ], - ) - } - pub fn future_code_upgrades_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "FutureCodeUpgrades", - ::alloc::vec::Vec::new(), - [ - 163u8, - 168u8, - 23u8, - 138u8, - 198u8, - 70u8, - 135u8, - 221u8, - 167u8, - 187u8, - 15u8, - 144u8, - 228u8, - 8u8, - 138u8, - 125u8, - 101u8, - 154u8, - 11u8, - 74u8, - 173u8, - 167u8, - 17u8, - 97u8, - 240u8, - 6u8, - 20u8, - 161u8, - 25u8, - 111u8, - 242u8, - 9u8, - ], - ) - } - pub fn future_code_upgrades( - &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::Address::new_static( - "Paras", - "FutureCodeUpgrades", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 163u8, - 168u8, - 23u8, - 138u8, - 198u8, - 70u8, - 135u8, - 221u8, - 167u8, - 187u8, - 15u8, - 144u8, - 228u8, - 8u8, - 138u8, - 125u8, - 101u8, - 154u8, - 11u8, - 74u8, - 173u8, - 167u8, - 17u8, - 97u8, - 240u8, - 6u8, - 20u8, - 161u8, - 25u8, - 111u8, - 242u8, - 9u8, - ], - ) - } - pub fn future_code_hash_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 62u8, - 238u8, - 183u8, - 12u8, - 197u8, - 119u8, - 163u8, - 239u8, - 192u8, - 228u8, - 110u8, - 58u8, - 128u8, - 223u8, - 32u8, - 137u8, - 109u8, - 127u8, - 41u8, - 83u8, - 91u8, - 98u8, - 156u8, - 118u8, - 96u8, - 147u8, - 16u8, - 31u8, - 5u8, - 92u8, - 227u8, - 230u8, - ], - ) - } - pub fn future_code_hash( - &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::ValidationCodeHash, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "FutureCodeHash", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 62u8, - 238u8, - 183u8, - 12u8, - 197u8, - 119u8, - 163u8, - 239u8, - 192u8, - 228u8, - 110u8, - 58u8, - 128u8, - 223u8, - 32u8, - 137u8, - 109u8, - 127u8, - 41u8, - 83u8, - 91u8, - 98u8, - 156u8, - 118u8, - 96u8, - 147u8, - 16u8, - 31u8, - 5u8, - 92u8, - 227u8, - 230u8, - ], - ) - } - pub fn upgrade_go_ahead_signal_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v4::UpgradeGoAhead, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "UpgradeGoAheadSignal", - ::alloc::vec::Vec::new(), - [ - 41u8, - 80u8, - 120u8, - 6u8, - 98u8, - 85u8, - 36u8, - 37u8, - 170u8, - 189u8, - 56u8, - 127u8, - 155u8, - 180u8, - 112u8, - 195u8, - 135u8, - 214u8, - 235u8, - 87u8, - 197u8, - 247u8, - 125u8, - 26u8, - 232u8, - 82u8, - 250u8, - 90u8, - 126u8, - 106u8, - 62u8, - 217u8, - ], - ) - } - pub fn upgrade_go_ahead_signal( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v4::UpgradeGoAhead, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "UpgradeGoAheadSignal", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 41u8, - 80u8, - 120u8, - 6u8, - 98u8, - 85u8, - 36u8, - 37u8, - 170u8, - 189u8, - 56u8, - 127u8, - 155u8, - 180u8, - 112u8, - 195u8, - 135u8, - 214u8, - 235u8, - 87u8, - 197u8, - 247u8, - 125u8, - 26u8, - 232u8, - 82u8, - 250u8, - 90u8, - 126u8, - 106u8, - 62u8, - 217u8, - ], - ) - } - pub fn upgrade_restriction_signal_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v4::UpgradeRestriction, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "UpgradeRestrictionSignal", - ::alloc::vec::Vec::new(), - [ - 158u8, - 105u8, - 62u8, - 252u8, - 149u8, - 145u8, - 34u8, - 92u8, - 119u8, - 204u8, - 46u8, - 96u8, - 117u8, - 183u8, - 134u8, - 20u8, - 172u8, - 243u8, - 145u8, - 113u8, - 74u8, - 119u8, - 96u8, - 107u8, - 129u8, - 109u8, - 96u8, - 143u8, - 77u8, - 14u8, - 56u8, - 117u8, - ], - ) - } - pub fn upgrade_restriction_signal( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v4::UpgradeRestriction, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "UpgradeRestrictionSignal", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 158u8, - 105u8, - 62u8, - 252u8, - 149u8, - 145u8, - 34u8, - 92u8, - 119u8, - 204u8, - 46u8, - 96u8, - 117u8, - 183u8, - 134u8, - 20u8, - 172u8, - 243u8, - 145u8, - 113u8, - 74u8, - 119u8, - 96u8, - 107u8, - 129u8, - 109u8, - 96u8, - 143u8, - 77u8, - 14u8, - 56u8, - 117u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 180u8, - 197u8, - 115u8, - 209u8, - 126u8, - 120u8, - 133u8, - 54u8, - 232u8, - 192u8, - 47u8, - 17u8, - 21u8, - 8u8, - 231u8, - 67u8, - 1u8, - 89u8, - 127u8, - 38u8, - 179u8, - 190u8, - 169u8, - 110u8, - 20u8, - 92u8, - 139u8, - 227u8, - 26u8, - 59u8, - 245u8, - 174u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 38u8, - 195u8, - 15u8, - 56u8, - 225u8, - 199u8, - 105u8, - 84u8, - 128u8, - 51u8, - 44u8, - 248u8, - 237u8, - 32u8, - 36u8, - 72u8, - 77u8, - 137u8, - 124u8, - 88u8, - 242u8, - 185u8, - 50u8, - 148u8, - 216u8, - 156u8, - 209u8, - 101u8, - 207u8, - 127u8, - 66u8, - 95u8, - ], - ) - } - pub fn actions_queue_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "ActionsQueue", - ::alloc::vec::Vec::new(), - [ - 13u8, - 25u8, - 129u8, - 203u8, - 95u8, - 206u8, - 254u8, - 240u8, - 170u8, - 209u8, - 55u8, - 117u8, - 70u8, - 220u8, - 139u8, - 102u8, - 9u8, - 229u8, - 139u8, - 120u8, - 67u8, - 246u8, - 214u8, - 59u8, - 81u8, - 116u8, - 54u8, - 67u8, - 129u8, - 32u8, - 67u8, - 92u8, - ], - ) - } - pub fn actions_queue( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "ActionsQueue", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 13u8, - 25u8, - 129u8, - 203u8, - 95u8, - 206u8, - 254u8, - 240u8, - 170u8, - 209u8, - 55u8, - 117u8, - 70u8, - 220u8, - 139u8, - 102u8, - 9u8, - 229u8, - 139u8, - 120u8, - 67u8, - 246u8, - 214u8, - 59u8, - 81u8, - 116u8, - 54u8, - 67u8, - 129u8, - 32u8, - 67u8, - 92u8, - ], - ) - } - pub fn upcoming_paras_genesis_iter( - &self, - ) -> ::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", - ::alloc::vec::Vec::new(), - [ - 215u8, - 121u8, - 106u8, - 13u8, - 102u8, - 47u8, - 129u8, - 221u8, - 153u8, - 91u8, - 23u8, - 94u8, - 11u8, - 39u8, - 19u8, - 180u8, - 136u8, - 136u8, - 254u8, - 152u8, - 250u8, - 150u8, - 40u8, - 87u8, - 135u8, - 121u8, - 219u8, - 151u8, - 111u8, - 35u8, - 43u8, - 195u8, - ], - ) - } - pub fn upcoming_paras_genesis( - &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::paras::ParaGenesisArgs, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Paras", - "UpcomingParasGenesis", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 215u8, - 121u8, - 106u8, - 13u8, - 102u8, - 47u8, - 129u8, - 221u8, - 153u8, - 91u8, - 23u8, - 94u8, - 11u8, - 39u8, - 19u8, - 180u8, - 136u8, - 136u8, - 254u8, - 152u8, - 250u8, - 150u8, - 40u8, - 87u8, - 135u8, - 121u8, - 219u8, - 151u8, - 111u8, - 35u8, - 43u8, - 195u8, - ], - ) - } - pub fn code_by_hash_refs_iter( - &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( - "Paras", - "CodeByHashRefs", - ::alloc::vec::Vec::new(), - [ - 47u8, - 50u8, - 103u8, - 161u8, - 130u8, - 252u8, - 157u8, - 35u8, - 174u8, - 37u8, - 102u8, - 60u8, - 195u8, - 30u8, - 164u8, - 203u8, - 67u8, - 129u8, - 107u8, - 181u8, - 166u8, - 205u8, - 230u8, - 91u8, - 36u8, - 187u8, - 253u8, - 150u8, - 39u8, - 168u8, - 223u8, - 16u8, - ], - ) - } - pub fn code_by_hash_refs( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - >, - ) -> ::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", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 47u8, - 50u8, - 103u8, - 161u8, - 130u8, - 252u8, - 157u8, - 35u8, - 174u8, - 37u8, - 102u8, - 60u8, - 195u8, - 30u8, - 164u8, - 203u8, - 67u8, - 129u8, - 107u8, - 181u8, - 166u8, - 205u8, - 230u8, - 91u8, - 36u8, - 187u8, - 253u8, - 150u8, - 39u8, - 168u8, - 223u8, - 16u8, - ], - ) - } - pub fn code_by_hash_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 155u8, - 102u8, - 73u8, - 180u8, - 127u8, - 211u8, - 181u8, - 44u8, - 56u8, - 235u8, - 49u8, - 4u8, - 25u8, - 213u8, - 116u8, - 200u8, - 232u8, - 203u8, - 190u8, - 90u8, - 93u8, - 6u8, - 57u8, - 227u8, - 240u8, - 92u8, - 157u8, - 129u8, - 3u8, - 148u8, - 45u8, - 143u8, - ], - ) - } - pub fn code_by_hash( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - >, - ) -> ::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", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 155u8, - 102u8, - 73u8, - 180u8, - 127u8, - 211u8, - 181u8, - 44u8, - 56u8, - 235u8, - 49u8, - 4u8, - 25u8, - 213u8, - 116u8, - 200u8, - 232u8, - 203u8, - 190u8, - 90u8, - 93u8, - 6u8, - 57u8, - 227u8, - 240u8, - 92u8, - 157u8, - 129u8, - 3u8, - 148u8, - 45u8, - 143u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn unsigned_priority( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u64> { - ::subxt::constants::Address::new_static( - "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, - ], - ) - } - } - } - } - pub mod initializer { - use super::root_mod; - use super::runtime_types; - pub type Call = runtime_types::polkadot_runtime_parachains::initializer::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceApprove { - pub up_to: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for ForceApprove { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.up_to - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - ForceApprove, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceApprove { up_to: x }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for ForceApprove { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> ForceApprove { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceApprove { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceApprove { - up_to: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceApprove::up_to`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceApprove { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.up_to) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.up_to, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.up_to) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.up_to, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceApprove {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ForceApprove { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceApprove; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceApprove { - up_to: { - let val = *vals - .get(&Some("up_to")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "up_to".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("up_to"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ForceApprove { - up_to: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("up_to"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceApprove { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceApprove { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceApprove { up_to } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("up_to"), - up_to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ForceApprove { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceApprove { up_to } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("up_to"), - up_to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceApprove { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ForceApprove", - "up_to", - &&self.up_to, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceApprove { - const PALLET: &'static str = "Initializer"; - const CALL: &'static str = "force_approve"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn force_approve( - &self, - up_to: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Initializer", - "force_approve", - types::ForceApprove { up_to }, - [ - 232u8, - 166u8, - 27u8, - 229u8, - 157u8, - 240u8, - 18u8, - 137u8, - 5u8, - 159u8, - 179u8, - 239u8, - 218u8, - 41u8, - 181u8, - 42u8, - 159u8, - 243u8, - 246u8, - 214u8, - 227u8, - 77u8, - 58u8, - 70u8, - 241u8, - 114u8, - 175u8, - 124u8, - 77u8, - 102u8, - 105u8, - 199u8, - ], - ) - } - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn has_initialized( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - (), - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Initializer", - "HasInitialized", - ::alloc::vec::Vec::new(), - [ - 156u8, - 208u8, - 212u8, - 86u8, - 105u8, - 148u8, - 252u8, - 11u8, - 140u8, - 67u8, - 231u8, - 86u8, - 1u8, - 147u8, - 178u8, - 79u8, - 27u8, - 249u8, - 137u8, - 103u8, - 178u8, - 50u8, - 114u8, - 157u8, - 239u8, - 86u8, - 89u8, - 233u8, - 86u8, - 58u8, - 37u8, - 67u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 99u8, - 153u8, - 100u8, - 11u8, - 28u8, - 62u8, - 163u8, - 239u8, - 177u8, - 55u8, - 151u8, - 242u8, - 227u8, - 59u8, - 176u8, - 10u8, - 227u8, - 51u8, - 252u8, - 191u8, - 233u8, - 36u8, - 1u8, - 131u8, - 255u8, - 56u8, - 6u8, - 65u8, - 5u8, - 185u8, - 114u8, - 139u8, - ], - ) - } - } - } - } - pub mod dmp { - use super::root_mod; - use super::runtime_types; - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn downward_message_queues_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 38u8, - 183u8, - 133u8, - 200u8, - 199u8, - 135u8, - 68u8, - 232u8, - 189u8, - 168u8, - 3u8, - 219u8, - 201u8, - 180u8, - 156u8, - 79u8, - 134u8, - 164u8, - 94u8, - 114u8, - 102u8, - 25u8, - 108u8, - 53u8, - 219u8, - 155u8, - 102u8, - 100u8, - 58u8, - 28u8, - 246u8, - 20u8, - ], - ) - } - pub fn downward_message_queues( - &self, - _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::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Dmp", - "DownwardMessageQueues", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 38u8, - 183u8, - 133u8, - 200u8, - 199u8, - 135u8, - 68u8, - 232u8, - 189u8, - 168u8, - 3u8, - 219u8, - 201u8, - 180u8, - 156u8, - 79u8, - 134u8, - 164u8, - 94u8, - 114u8, - 102u8, - 25u8, - 108u8, - 53u8, - 219u8, - 155u8, - 102u8, - 100u8, - 58u8, - 28u8, - 246u8, - 20u8, - ], - ) - } - pub fn downward_message_queue_heads_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::subxt::utils::H256, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Dmp", - "DownwardMessageQueueHeads", - ::alloc::vec::Vec::new(), - [ - 135u8, - 165u8, - 240u8, - 0u8, - 25u8, - 110u8, - 9u8, - 108u8, - 251u8, - 225u8, - 109u8, - 184u8, - 90u8, - 132u8, - 9u8, - 151u8, - 12u8, - 118u8, - 153u8, - 212u8, - 140u8, - 205u8, - 94u8, - 98u8, - 110u8, - 167u8, - 155u8, - 43u8, - 61u8, - 35u8, - 52u8, - 56u8, - ], - ) - } - 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::Address::new_static( - "Dmp", - "DownwardMessageQueueHeads", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 135u8, - 165u8, - 240u8, - 0u8, - 25u8, - 110u8, - 9u8, - 108u8, - 251u8, - 225u8, - 109u8, - 184u8, - 90u8, - 132u8, - 9u8, - 151u8, - 12u8, - 118u8, - 153u8, - 212u8, - 140u8, - 205u8, - 94u8, - 98u8, - 110u8, - 167u8, - 155u8, - 43u8, - 61u8, - 35u8, - 52u8, - 56u8, - ], - ) - } - pub fn delivery_fee_factor_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_arithmetic::fixed_point::FixedU128, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Dmp", - "DeliveryFeeFactor", - ::alloc::vec::Vec::new(), - [ - 43u8, - 5u8, - 63u8, - 235u8, - 115u8, - 155u8, - 130u8, - 27u8, - 75u8, - 216u8, - 177u8, - 135u8, - 203u8, - 147u8, - 167u8, - 95u8, - 208u8, - 188u8, - 25u8, - 14u8, - 84u8, - 63u8, - 116u8, - 41u8, - 148u8, - 110u8, - 115u8, - 215u8, - 196u8, - 36u8, - 75u8, - 102u8, - ], - ) - } - pub fn delivery_fee_factor( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::sp_arithmetic::fixed_point::FixedU128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Dmp", - "DeliveryFeeFactor", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 43u8, - 5u8, - 63u8, - 235u8, - 115u8, - 155u8, - 130u8, - 27u8, - 75u8, - 216u8, - 177u8, - 135u8, - 203u8, - 147u8, - 167u8, - 95u8, - 208u8, - 188u8, - 25u8, - 14u8, - 84u8, - 63u8, - 116u8, - 41u8, - 148u8, - 110u8, - 115u8, - 215u8, - 196u8, - 36u8, - 75u8, - 102u8, - ], - ) - } - } - } - } - pub mod hrmp { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::polkadot_runtime_parachains::hrmp::pallet::Error; - pub type Call = runtime_types::polkadot_runtime_parachains::hrmp::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpInitOpenChannel { - pub recipient: runtime_types::polkadot_parachain::primitives::Id, - pub proposed_max_capacity: ::core::primitive::u32, - pub proposed_max_message_size: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for HrmpInitOpenChannel { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(HrmpInitOpenChannel { - recipient: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpInitOpenChannel::recipient`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposed_max_capacity: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HrmpInitOpenChannel::proposed_max_capacity`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposed_max_message_size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HrmpInitOpenChannel::proposed_max_message_size`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for HrmpInitOpenChannel { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.recipient), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.proposed_max_capacity, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.proposed_max_message_size, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.recipient, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proposed_max_capacity, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proposed_max_message_size, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for HrmpInitOpenChannel {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for HrmpInitOpenChannel { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = HrmpInitOpenChannel; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(HrmpInitOpenChannel { - recipient: { - let val = *vals - .get(&Some("recipient")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "recipient".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - proposed_max_capacity: { - let val = *vals - .get(&Some("proposed_max_capacity")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposed_max_capacity".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposed_max_capacity"))? - }, - proposed_max_message_size: { - let val = *vals - .get(&Some("proposed_max_message_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposed_max_message_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposed_max_message_size"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(HrmpInitOpenChannel { - recipient: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - proposed_max_capacity: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposed_max_capacity"))? - }, - proposed_max_message_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposed_max_message_size"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for HrmpInitOpenChannel { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for HrmpInitOpenChannel { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HrmpInitOpenChannel { - recipient, - proposed_max_capacity, - proposed_max_message_size, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposed_max_capacity"), - proposed_max_capacity - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposed_max_message_size"), - proposed_max_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for HrmpInitOpenChannel { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HrmpInitOpenChannel { - recipient, - proposed_max_capacity, - proposed_max_message_size, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposed_max_capacity"), - proposed_max_capacity - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposed_max_message_size"), - proposed_max_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for HrmpInitOpenChannel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "HrmpInitOpenChannel", - "recipient", - &self.recipient, - "proposed_max_capacity", - &self.proposed_max_capacity, - "proposed_max_message_size", - &&self.proposed_max_message_size, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for HrmpInitOpenChannel { - const PALLET: &'static str = "Hrmp"; - const CALL: &'static str = "hrmp_init_open_channel"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpAcceptOpenChannel { - pub sender: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for HrmpAcceptOpenChannel { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(HrmpAcceptOpenChannel { - sender: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpAcceptOpenChannel::sender`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for HrmpAcceptOpenChannel { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.sender) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.sender, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.sender) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.sender, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for HrmpAcceptOpenChannel {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for HrmpAcceptOpenChannel { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = HrmpAcceptOpenChannel; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(HrmpAcceptOpenChannel { - sender: { - let val = *vals - .get(&Some("sender")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sender".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(HrmpAcceptOpenChannel { - sender: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for HrmpAcceptOpenChannel { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for HrmpAcceptOpenChannel { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HrmpAcceptOpenChannel { sender } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for HrmpAcceptOpenChannel { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HrmpAcceptOpenChannel { sender } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for HrmpAcceptOpenChannel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "HrmpAcceptOpenChannel", - "sender", - &&self.sender, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for HrmpAcceptOpenChannel { - const PALLET: &'static str = "Hrmp"; - const CALL: &'static str = "hrmp_accept_open_channel"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpCloseChannel { - pub channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for HrmpCloseChannel { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(HrmpCloseChannel { - channel_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpCloseChannel::channel_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for HrmpCloseChannel { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.channel_id) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.channel_id, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.channel_id) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.channel_id, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for HrmpCloseChannel {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for HrmpCloseChannel { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = HrmpCloseChannel; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(HrmpCloseChannel { - channel_id: { - let val = *vals - .get(&Some("channel_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "channel_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("channel_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(HrmpCloseChannel { - channel_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("channel_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for HrmpCloseChannel { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for HrmpCloseChannel { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HrmpCloseChannel { channel_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("channel_id"), - channel_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for HrmpCloseChannel { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HrmpCloseChannel { channel_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("channel_id"), - channel_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for HrmpCloseChannel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "HrmpCloseChannel", - "channel_id", - &&self.channel_id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for HrmpCloseChannel { - const PALLET: &'static str = "Hrmp"; - const CALL: &'static str = "hrmp_close_channel"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceCleanHrmp { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub inbound: ::core::primitive::u32, - pub outbound: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceCleanHrmp { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceCleanHrmp { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceCleanHrmp::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - inbound: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceCleanHrmp::inbound`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - outbound: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceCleanHrmp::outbound`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceCleanHrmp { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.inbound), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.outbound), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.para, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.inbound, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.outbound, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceCleanHrmp {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ForceCleanHrmp { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceCleanHrmp; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceCleanHrmp { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - inbound: { - let val = *vals - .get(&Some("inbound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "inbound".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("inbound"))? - }, - outbound: { - let val = *vals - .get(&Some("outbound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "outbound".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("outbound"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(ForceCleanHrmp { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - inbound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("inbound"))? - }, - outbound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("outbound"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceCleanHrmp { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceCleanHrmp { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceCleanHrmp { para, inbound, outbound } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("inbound"), - inbound as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("outbound"), - outbound as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ForceCleanHrmp { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceCleanHrmp { para, inbound, outbound } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("inbound"), - inbound as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("outbound"), - outbound as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceCleanHrmp { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ForceCleanHrmp", - "para", - &self.para, - "inbound", - &self.inbound, - "outbound", - &&self.outbound, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceCleanHrmp { - const PALLET: &'static str = "Hrmp"; - const CALL: &'static str = "force_clean_hrmp"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceProcessHrmpOpen { - pub channels: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for ForceProcessHrmpOpen { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.channels - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - ForceProcessHrmpOpen, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceProcessHrmpOpen { - channels: x, - }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for ForceProcessHrmpOpen { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> ForceProcessHrmpOpen { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceProcessHrmpOpen { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceProcessHrmpOpen { - channels: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceProcessHrmpOpen::channels`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceProcessHrmpOpen { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.channels) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.channels, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.channels) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.channels, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceProcessHrmpOpen {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ForceProcessHrmpOpen { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceProcessHrmpOpen; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceProcessHrmpOpen { - channels: { - let val = *vals - .get(&Some("channels")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "channels".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("channels"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ForceProcessHrmpOpen { - channels: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("channels"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceProcessHrmpOpen { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ForceProcessHrmpOpen { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceProcessHrmpOpen { channels } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("channels"), - channels as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ForceProcessHrmpOpen { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceProcessHrmpOpen { channels } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("channels"), - channels as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceProcessHrmpOpen { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ForceProcessHrmpOpen", - "channels", - &&self.channels, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceProcessHrmpOpen { - const PALLET: &'static str = "Hrmp"; - const CALL: &'static str = "force_process_hrmp_open"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceProcessHrmpClose { - pub channels: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for ForceProcessHrmpClose { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.channels - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - ForceProcessHrmpClose, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceProcessHrmpClose { - channels: x, - }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for ForceProcessHrmpClose { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> ForceProcessHrmpClose { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceProcessHrmpClose { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceProcessHrmpClose { - channels: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `ForceProcessHrmpClose::channels`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceProcessHrmpClose { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.channels) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.channels, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.channels) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.channels, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceProcessHrmpClose {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ForceProcessHrmpClose { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceProcessHrmpClose; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceProcessHrmpClose { - channels: { - let val = *vals - .get(&Some("channels")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "channels".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("channels"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ForceProcessHrmpClose { - channels: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("channels"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceProcessHrmpClose { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ForceProcessHrmpClose { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceProcessHrmpClose { channels } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("channels"), - channels as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ForceProcessHrmpClose { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceProcessHrmpClose { channels } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("channels"), - channels as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceProcessHrmpClose { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ForceProcessHrmpClose", - "channels", - &&self.channels, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceProcessHrmpClose { - const PALLET: &'static str = "Hrmp"; - const CALL: &'static str = "force_process_hrmp_close"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpCancelOpenRequest { - pub channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, - pub open_requests: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for HrmpCancelOpenRequest { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(HrmpCancelOpenRequest { - channel_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HrmpCancelOpenRequest::channel_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - open_requests: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HrmpCancelOpenRequest::open_requests`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for HrmpCancelOpenRequest { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.channel_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.open_requests), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.channel_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.open_requests, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for HrmpCancelOpenRequest {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for HrmpCancelOpenRequest { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = HrmpCancelOpenRequest; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(HrmpCancelOpenRequest { - channel_id: { - let val = *vals - .get(&Some("channel_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "channel_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("channel_id"))? - }, - open_requests: { - let val = *vals - .get(&Some("open_requests")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "open_requests".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("open_requests"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(HrmpCancelOpenRequest { - channel_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("channel_id"))? - }, - open_requests: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("open_requests"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for HrmpCancelOpenRequest { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for HrmpCancelOpenRequest { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HrmpCancelOpenRequest { channel_id, open_requests } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("channel_id"), - channel_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("open_requests"), - open_requests - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for HrmpCancelOpenRequest { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HrmpCancelOpenRequest { channel_id, open_requests } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("channel_id"), - channel_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("open_requests"), - open_requests - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for HrmpCancelOpenRequest { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "HrmpCancelOpenRequest", - "channel_id", - &self.channel_id, - "open_requests", - &&self.open_requests, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for HrmpCancelOpenRequest { - const PALLET: &'static str = "Hrmp"; - const CALL: &'static str = "hrmp_cancel_open_request"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceOpenHrmpChannel { - pub sender: runtime_types::polkadot_parachain::primitives::Id, - pub recipient: runtime_types::polkadot_parachain::primitives::Id, - pub max_capacity: ::core::primitive::u32, - pub max_message_size: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceOpenHrmpChannel { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceOpenHrmpChannel { - sender: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceOpenHrmpChannel::sender`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - recipient: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `ForceOpenHrmpChannel::recipient`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_capacity: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ForceOpenHrmpChannel::max_capacity`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_message_size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ForceOpenHrmpChannel::max_message_size`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceOpenHrmpChannel { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.sender), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.recipient), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_capacity), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.max_message_size, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.sender, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.recipient, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_capacity, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_message_size, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceOpenHrmpChannel {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ForceOpenHrmpChannel { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceOpenHrmpChannel; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceOpenHrmpChannel { - sender: { - let val = *vals - .get(&Some("sender")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sender".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - recipient: { - let val = *vals - .get(&Some("recipient")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "recipient".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - max_capacity: { - let val = *vals - .get(&Some("max_capacity")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_capacity".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_capacity"))? - }, - max_message_size: { - let val = *vals - .get(&Some("max_message_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_message_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_message_size"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(ForceOpenHrmpChannel { - sender: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - recipient: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - max_capacity: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_capacity"))? - }, - max_message_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_message_size"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceOpenHrmpChannel { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ForceOpenHrmpChannel { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceOpenHrmpChannel { - sender, - recipient, - max_capacity, - max_message_size, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_capacity"), - max_capacity - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_message_size"), - max_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ForceOpenHrmpChannel { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceOpenHrmpChannel { - sender, - recipient, - max_capacity, - max_message_size, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_capacity"), - max_capacity - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_message_size"), - max_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceOpenHrmpChannel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "ForceOpenHrmpChannel", - "sender", - &self.sender, - "recipient", - &self.recipient, - "max_capacity", - &self.max_capacity, - "max_message_size", - &&self.max_message_size, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceOpenHrmpChannel { - const PALLET: &'static str = "Hrmp"; - const CALL: &'static str = "force_open_hrmp_channel"; - } - } - pub struct TransactionApi; - impl TransactionApi { - 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", - types::HrmpInitOpenChannel { - recipient, - proposed_max_capacity, - proposed_max_message_size, - }, - [ - 89u8, - 39u8, - 43u8, - 191u8, - 235u8, - 40u8, - 253u8, - 129u8, - 174u8, - 108u8, - 26u8, - 206u8, - 7u8, - 146u8, - 206u8, - 56u8, - 53u8, - 104u8, - 138u8, - 203u8, - 108u8, - 195u8, - 190u8, - 231u8, - 223u8, - 33u8, - 32u8, - 157u8, - 148u8, - 235u8, - 67u8, - 82u8, - ], - ) - } - 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", - types::HrmpAcceptOpenChannel { - sender, - }, - [ - 133u8, - 77u8, - 88u8, - 40u8, - 47u8, - 81u8, - 95u8, - 206u8, - 165u8, - 41u8, - 191u8, - 241u8, - 130u8, - 244u8, - 70u8, - 227u8, - 69u8, - 80u8, - 130u8, - 126u8, - 34u8, - 69u8, - 214u8, - 81u8, - 7u8, - 199u8, - 249u8, - 162u8, - 234u8, - 233u8, - 195u8, - 156u8, - ], - ) - } - 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", - types::HrmpCloseChannel { - channel_id, - }, - [ - 174u8, - 225u8, - 93u8, - 69u8, - 133u8, - 145u8, - 156u8, - 94u8, - 185u8, - 254u8, - 60u8, - 209u8, - 232u8, - 79u8, - 237u8, - 173u8, - 180u8, - 45u8, - 117u8, - 165u8, - 202u8, - 195u8, - 84u8, - 68u8, - 241u8, - 164u8, - 151u8, - 216u8, - 96u8, - 20u8, - 7u8, - 45u8, - ], - ) - } - 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", - types::ForceCleanHrmp { - para, - inbound, - outbound, - }, - [ - 0u8, - 31u8, - 178u8, - 86u8, - 30u8, - 161u8, - 50u8, - 113u8, - 51u8, - 212u8, - 175u8, - 144u8, - 43u8, - 127u8, - 10u8, - 168u8, - 127u8, - 39u8, - 101u8, - 67u8, - 96u8, - 29u8, - 117u8, - 79u8, - 184u8, - 228u8, - 182u8, - 53u8, - 55u8, - 142u8, - 225u8, - 212u8, - ], - ) - } - pub fn force_process_hrmp_open( - &self, - channels: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Hrmp", - "force_process_hrmp_open", - types::ForceProcessHrmpOpen { - channels, - }, - [ - 66u8, - 138u8, - 220u8, - 119u8, - 251u8, - 148u8, - 72u8, - 167u8, - 49u8, - 156u8, - 227u8, - 174u8, - 153u8, - 145u8, - 190u8, - 195u8, - 192u8, - 183u8, - 41u8, - 213u8, - 134u8, - 8u8, - 114u8, - 30u8, - 191u8, - 81u8, - 208u8, - 54u8, - 120u8, - 36u8, - 195u8, - 246u8, - ], - ) - } - pub fn force_process_hrmp_close( - &self, - channels: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Hrmp", - "force_process_hrmp_close", - types::ForceProcessHrmpClose { - channels, - }, - [ - 22u8, - 60u8, - 113u8, - 94u8, - 199u8, - 101u8, - 204u8, - 34u8, - 158u8, - 77u8, - 228u8, - 29u8, - 180u8, - 249u8, - 46u8, - 103u8, - 206u8, - 155u8, - 164u8, - 229u8, - 70u8, - 189u8, - 218u8, - 171u8, - 173u8, - 22u8, - 210u8, - 73u8, - 232u8, - 99u8, - 225u8, - 176u8, - ], - ) - } - 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", - types::HrmpCancelOpenRequest { - channel_id, - open_requests, - }, - [ - 10u8, - 192u8, - 79u8, - 120u8, - 6u8, - 88u8, - 139u8, - 75u8, - 87u8, - 32u8, - 125u8, - 47u8, - 178u8, - 132u8, - 156u8, - 232u8, - 28u8, - 123u8, - 74u8, - 10u8, - 180u8, - 90u8, - 145u8, - 123u8, - 40u8, - 89u8, - 235u8, - 25u8, - 237u8, - 137u8, - 114u8, - 173u8, - ], - ) - } - 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", - types::ForceOpenHrmpChannel { - sender, - recipient, - max_capacity, - max_message_size, - }, - [ - 37u8, - 251u8, - 1u8, - 201u8, - 129u8, - 217u8, - 193u8, - 179u8, - 98u8, - 153u8, - 226u8, - 139u8, - 107u8, - 222u8, - 3u8, - 76u8, - 104u8, - 248u8, - 31u8, - 241u8, - 90u8, - 189u8, - 56u8, - 92u8, - 118u8, - 68u8, - 177u8, - 70u8, - 5u8, - 44u8, - 234u8, - 27u8, - ], - ) - } - } - } - pub type Event = runtime_types::polkadot_runtime_parachains::hrmp::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for OpenChannelRequested { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - OpenChannelRequested( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpenChannelRequested.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpenChannelRequested.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpenChannelRequested.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpenChannelRequested.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for OpenChannelRequested { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.2), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.3), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.2, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.3, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for OpenChannelRequested {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for OpenChannelRequested { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = OpenChannelRequested; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok( - OpenChannelRequested( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for OpenChannelRequested { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for OpenChannelRequested { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OpenChannelRequested(_0, _1, _2, _3) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for OpenChannelRequested { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OpenChannelRequested(_0, _1, _2, _3) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for OpenChannelRequested { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field4_finish( - f, - "OpenChannelRequested", - &self.0, - &self.1, - &self.2, - &&self.3, - ) - } - } - impl ::subxt::events::StaticEvent for OpenChannelRequested { - const PALLET: &'static str = "Hrmp"; - const EVENT: &'static str = "OpenChannelRequested"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OpenChannelCanceled( - pub runtime_types::polkadot_parachain::primitives::Id, - pub runtime_types::polkadot_parachain::primitives::HrmpChannelId, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for OpenChannelCanceled { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - OpenChannelCanceled( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpenChannelCanceled.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpenChannelCanceled.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for OpenChannelCanceled { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for OpenChannelCanceled {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for OpenChannelCanceled { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = OpenChannelCanceled; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - OpenChannelCanceled( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for OpenChannelCanceled { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for OpenChannelCanceled { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OpenChannelCanceled(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for OpenChannelCanceled { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OpenChannelCanceled(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for OpenChannelCanceled { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "OpenChannelCanceled", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for OpenChannelCanceled { - const PALLET: &'static str = "Hrmp"; - const EVENT: &'static str = "OpenChannelCanceled"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OpenChannelAccepted( - pub runtime_types::polkadot_parachain::primitives::Id, - pub runtime_types::polkadot_parachain::primitives::Id, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for OpenChannelAccepted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - OpenChannelAccepted( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpenChannelAccepted.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpenChannelAccepted.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for OpenChannelAccepted { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for OpenChannelAccepted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for OpenChannelAccepted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = OpenChannelAccepted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - OpenChannelAccepted( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for OpenChannelAccepted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for OpenChannelAccepted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OpenChannelAccepted(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for OpenChannelAccepted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OpenChannelAccepted(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for OpenChannelAccepted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "OpenChannelAccepted", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for OpenChannelAccepted { - const PALLET: &'static str = "Hrmp"; - const EVENT: &'static str = "OpenChannelAccepted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ChannelClosed( - pub runtime_types::polkadot_parachain::primitives::Id, - pub runtime_types::polkadot_parachain::primitives::HrmpChannelId, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ChannelClosed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - ChannelClosed( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ChannelClosed.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ChannelClosed.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ChannelClosed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ChannelClosed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ChannelClosed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ChannelClosed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - ChannelClosed( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ChannelClosed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ChannelClosed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ChannelClosed(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ChannelClosed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ChannelClosed(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ChannelClosed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "ChannelClosed", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for ChannelClosed { - const PALLET: &'static str = "Hrmp"; - const EVENT: &'static str = "ChannelClosed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for HrmpChannelForceOpened { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - HrmpChannelForceOpened( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpChannelForceOpened.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpChannelForceOpened.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpChannelForceOpened.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpChannelForceOpened.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for HrmpChannelForceOpened { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.2), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.3), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.2, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.3, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for HrmpChannelForceOpened {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for HrmpChannelForceOpened { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = HrmpChannelForceOpened; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok( - HrmpChannelForceOpened( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for HrmpChannelForceOpened { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for HrmpChannelForceOpened { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HrmpChannelForceOpened(_0, _1, _2, _3) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for HrmpChannelForceOpened { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HrmpChannelForceOpened(_0, _1, _2, _3) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for HrmpChannelForceOpened { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field4_finish( - f, - "HrmpChannelForceOpened", - &self.0, - &self.1, - &self.2, - &&self.3, - ) - } - } - 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 { - pub fn hrmp_open_channel_requests_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 164u8, - 97u8, - 52u8, - 242u8, - 255u8, - 67u8, - 248u8, - 170u8, - 204u8, - 92u8, - 81u8, - 144u8, - 11u8, - 63u8, - 145u8, - 167u8, - 8u8, - 174u8, - 221u8, - 147u8, - 125u8, - 144u8, - 243u8, - 33u8, - 235u8, - 104u8, - 240u8, - 99u8, - 96u8, - 211u8, - 163u8, - 121u8, - ], - ) - } - 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::Address::new_static( - "Hrmp", - "HrmpOpenChannelRequests", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 164u8, - 97u8, - 52u8, - 242u8, - 255u8, - 67u8, - 248u8, - 170u8, - 204u8, - 92u8, - 81u8, - 144u8, - 11u8, - 63u8, - 145u8, - 167u8, - 8u8, - 174u8, - 221u8, - 147u8, - 125u8, - 144u8, - 243u8, - 33u8, - 235u8, - 104u8, - 240u8, - 99u8, - 96u8, - 211u8, - 163u8, - 121u8, - ], - ) - } - pub fn hrmp_open_channel_requests_list( - &self, - ) -> ::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", - ::alloc::vec::Vec::new(), - [ - 45u8, - 190u8, - 124u8, - 26u8, - 37u8, - 249u8, - 140u8, - 254u8, - 101u8, - 249u8, - 27u8, - 117u8, - 218u8, - 3u8, - 126u8, - 114u8, - 143u8, - 65u8, - 122u8, - 246u8, - 237u8, - 173u8, - 145u8, - 175u8, - 133u8, - 119u8, - 127u8, - 81u8, - 59u8, - 206u8, - 159u8, - 39u8, - ], - ) - } - pub fn hrmp_open_channel_request_count_iter( - &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( - "Hrmp", - "HrmpOpenChannelRequestCount", - ::alloc::vec::Vec::new(), - [ - 136u8, - 72u8, - 56u8, - 31u8, - 229u8, - 99u8, - 241u8, - 14u8, - 159u8, - 243u8, - 179u8, - 222u8, - 252u8, - 56u8, - 63u8, - 24u8, - 204u8, - 130u8, - 47u8, - 161u8, - 133u8, - 227u8, - 237u8, - 146u8, - 239u8, - 46u8, - 127u8, - 113u8, - 190u8, - 230u8, - 61u8, - 182u8, - ], - ) - } - 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::Address::new_static( - "Hrmp", - "HrmpOpenChannelRequestCount", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 136u8, - 72u8, - 56u8, - 31u8, - 229u8, - 99u8, - 241u8, - 14u8, - 159u8, - 243u8, - 179u8, - 222u8, - 252u8, - 56u8, - 63u8, - 24u8, - 204u8, - 130u8, - 47u8, - 161u8, - 133u8, - 227u8, - 237u8, - 146u8, - 239u8, - 46u8, - 127u8, - 113u8, - 190u8, - 230u8, - 61u8, - 182u8, - ], - ) - } - pub fn hrmp_accepted_channel_request_count_iter( - &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( - "Hrmp", - "HrmpAcceptedChannelRequestCount", - ::alloc::vec::Vec::new(), - [ - 29u8, - 100u8, - 52u8, - 28u8, - 180u8, - 84u8, - 132u8, - 120u8, - 117u8, - 172u8, - 169u8, - 40u8, - 237u8, - 92u8, - 89u8, - 87u8, - 230u8, - 148u8, - 140u8, - 226u8, - 60u8, - 169u8, - 100u8, - 162u8, - 139u8, - 205u8, - 180u8, - 92u8, - 0u8, - 110u8, - 55u8, - 158u8, - ], - ) - } - pub fn hrmp_accepted_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::Address::new_static( - "Hrmp", - "HrmpAcceptedChannelRequestCount", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 29u8, - 100u8, - 52u8, - 28u8, - 180u8, - 84u8, - 132u8, - 120u8, - 117u8, - 172u8, - 169u8, - 40u8, - 237u8, - 92u8, - 89u8, - 87u8, - 230u8, - 148u8, - 140u8, - 226u8, - 60u8, - 169u8, - 100u8, - 162u8, - 139u8, - 205u8, - 180u8, - 92u8, - 0u8, - 110u8, - 55u8, - 158u8, - ], - ) - } - pub fn hrmp_close_channel_requests_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - (), - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Hrmp", - "HrmpCloseChannelRequests", - ::alloc::vec::Vec::new(), - [ - 155u8, - 13u8, - 73u8, - 166u8, - 58u8, - 67u8, - 138u8, - 58u8, - 215u8, - 172u8, - 241u8, - 168u8, - 57u8, - 4u8, - 230u8, - 248u8, - 31u8, - 183u8, - 227u8, - 224u8, - 139u8, - 172u8, - 229u8, - 228u8, - 16u8, - 120u8, - 124u8, - 81u8, - 213u8, - 253u8, - 102u8, - 226u8, - ], - ) - } - pub fn hrmp_close_channel_requests( - &self, - _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::Address::new_static( - "Hrmp", - "HrmpCloseChannelRequests", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 155u8, - 13u8, - 73u8, - 166u8, - 58u8, - 67u8, - 138u8, - 58u8, - 215u8, - 172u8, - 241u8, - 168u8, - 57u8, - 4u8, - 230u8, - 248u8, - 31u8, - 183u8, - 227u8, - 224u8, - 139u8, - 172u8, - 229u8, - 228u8, - 16u8, - 120u8, - 124u8, - 81u8, - 213u8, - 253u8, - 102u8, - 226u8, - ], - ) - } - pub fn hrmp_close_channel_requests_list( - &self, - ) -> ::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", - "HrmpCloseChannelRequestsList", - ::alloc::vec::Vec::new(), - [ - 78u8, - 194u8, - 214u8, - 232u8, - 91u8, - 72u8, - 109u8, - 113u8, - 88u8, - 86u8, - 136u8, - 26u8, - 226u8, - 30u8, - 11u8, - 188u8, - 57u8, - 77u8, - 169u8, - 64u8, - 14u8, - 187u8, - 27u8, - 127u8, - 76u8, - 99u8, - 114u8, - 73u8, - 221u8, - 23u8, - 208u8, - 69u8, - ], - ) - } - pub fn hrmp_watermarks_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Hrmp", - "HrmpWatermarks", - ::alloc::vec::Vec::new(), - [ - 245u8, - 104u8, - 137u8, - 120u8, - 131u8, - 7u8, - 178u8, - 85u8, - 96u8, - 124u8, - 241u8, - 2u8, - 86u8, - 63u8, - 116u8, - 77u8, - 217u8, - 235u8, - 162u8, - 38u8, - 104u8, - 248u8, - 121u8, - 1u8, - 111u8, - 191u8, - 191u8, - 115u8, - 65u8, - 67u8, - 2u8, - 238u8, - ], - ) - } - pub fn hrmp_watermarks( - &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::Address::new_static( - "Hrmp", - "HrmpWatermarks", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 245u8, - 104u8, - 137u8, - 120u8, - 131u8, - 7u8, - 178u8, - 85u8, - 96u8, - 124u8, - 241u8, - 2u8, - 86u8, - 63u8, - 116u8, - 77u8, - 217u8, - 235u8, - 162u8, - 38u8, - 104u8, - 248u8, - 121u8, - 1u8, - 111u8, - 191u8, - 191u8, - 115u8, - 65u8, - 67u8, - 2u8, - 238u8, - ], - ) - } - pub fn hrmp_channels_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_parachains::hrmp::HrmpChannel, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Hrmp", - "HrmpChannels", - ::alloc::vec::Vec::new(), - [ - 174u8, - 90u8, - 72u8, - 93u8, - 43u8, - 140u8, - 181u8, - 170u8, - 138u8, - 171u8, - 179u8, - 156u8, - 33u8, - 87u8, - 63u8, - 1u8, - 131u8, - 59u8, - 230u8, - 14u8, - 40u8, - 240u8, - 186u8, - 66u8, - 191u8, - 130u8, - 48u8, - 218u8, - 225u8, - 22u8, - 33u8, - 122u8, - ], - ) - } - pub fn hrmp_channels( - &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::HrmpChannel, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "Hrmp", - "HrmpChannels", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 174u8, - 90u8, - 72u8, - 93u8, - 43u8, - 140u8, - 181u8, - 170u8, - 138u8, - 171u8, - 179u8, - 156u8, - 33u8, - 87u8, - 63u8, - 1u8, - 131u8, - 59u8, - 230u8, - 14u8, - 40u8, - 240u8, - 186u8, - 66u8, - 191u8, - 130u8, - 48u8, - 218u8, - 225u8, - 22u8, - 33u8, - 122u8, - ], - ) - } - pub fn hrmp_ingress_channels_index_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Hrmp", - "HrmpIngressChannelsIndex", - ::alloc::vec::Vec::new(), - [ - 125u8, - 229u8, - 102u8, - 230u8, - 74u8, - 109u8, - 173u8, - 67u8, - 176u8, - 169u8, - 57u8, - 24u8, - 75u8, - 129u8, - 246u8, - 198u8, - 63u8, - 49u8, - 56u8, - 102u8, - 149u8, - 139u8, - 138u8, - 207u8, - 150u8, - 220u8, - 29u8, - 208u8, - 203u8, - 0u8, - 93u8, - 105u8, - ], - ) - } - pub fn hrmp_ingress_channels_index( - &self, - _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_parachain::primitives::Id, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Hrmp", - "HrmpIngressChannelsIndex", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 125u8, - 229u8, - 102u8, - 230u8, - 74u8, - 109u8, - 173u8, - 67u8, - 176u8, - 169u8, - 57u8, - 24u8, - 75u8, - 129u8, - 246u8, - 198u8, - 63u8, - 49u8, - 56u8, - 102u8, - 149u8, - 139u8, - 138u8, - 207u8, - 150u8, - 220u8, - 29u8, - 208u8, - 203u8, - 0u8, - 93u8, - 105u8, - ], - ) - } - pub fn hrmp_egress_channels_index_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Hrmp", - "HrmpEgressChannelsIndex", - ::alloc::vec::Vec::new(), - [ - 237u8, - 183u8, - 188u8, - 57u8, - 20u8, - 238u8, - 166u8, - 7u8, - 94u8, - 155u8, - 22u8, - 9u8, - 173u8, - 209u8, - 210u8, - 17u8, - 160u8, - 79u8, - 243u8, - 4u8, - 245u8, - 240u8, - 65u8, - 195u8, - 116u8, - 98u8, - 206u8, - 104u8, - 53u8, - 64u8, - 241u8, - 41u8, - ], - ) - } - pub fn hrmp_egress_channels_index( - &self, - _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_parachain::primitives::Id, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Hrmp", - "HrmpEgressChannelsIndex", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 237u8, - 183u8, - 188u8, - 57u8, - 20u8, - 238u8, - 166u8, - 7u8, - 94u8, - 155u8, - 22u8, - 9u8, - 173u8, - 209u8, - 210u8, - 17u8, - 160u8, - 79u8, - 243u8, - 4u8, - 245u8, - 240u8, - 65u8, - 195u8, - 116u8, - 98u8, - 206u8, - 104u8, - 53u8, - 64u8, - 241u8, - 41u8, - ], - ) - } - pub fn hrmp_channel_contents_iter( - &self, - ) -> ::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::Address::new_static( - "Hrmp", - "HrmpChannelContents", - ::alloc::vec::Vec::new(), - [ - 55u8, - 16u8, - 135u8, - 69u8, - 54u8, - 180u8, - 246u8, - 124u8, - 104u8, - 92u8, - 45u8, - 18u8, - 223u8, - 145u8, - 43u8, - 190u8, - 121u8, - 59u8, - 35u8, - 195u8, - 234u8, - 219u8, - 30u8, - 246u8, - 168u8, - 187u8, - 45u8, - 171u8, - 254u8, - 204u8, - 60u8, - 121u8, - ], - ) - } - pub fn hrmp_channel_contents( - &self, - _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::Address::new_static( - "Hrmp", - "HrmpChannelContents", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 55u8, - 16u8, - 135u8, - 69u8, - 54u8, - 180u8, - 246u8, - 124u8, - 104u8, - 92u8, - 45u8, - 18u8, - 223u8, - 145u8, - 43u8, - 190u8, - 121u8, - 59u8, - 35u8, - 195u8, - 234u8, - 219u8, - 30u8, - 246u8, - 168u8, - 187u8, - 45u8, - 171u8, - 254u8, - 204u8, - 60u8, - 121u8, - ], - ) - } - pub fn hrmp_channel_digests_iter( - &self, - ) -> ::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::Address::new_static( - "Hrmp", - "HrmpChannelDigests", - ::alloc::vec::Vec::new(), - [ - 90u8, - 90u8, - 139u8, - 78u8, - 47u8, - 2u8, - 104u8, - 211u8, - 42u8, - 246u8, - 193u8, - 210u8, - 142u8, - 223u8, - 17u8, - 136u8, - 3u8, - 182u8, - 25u8, - 56u8, - 72u8, - 72u8, - 162u8, - 131u8, - 36u8, - 34u8, - 162u8, - 176u8, - 159u8, - 113u8, - 7u8, - 207u8, - ], - ) - } - pub fn hrmp_channel_digests( - &self, - _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::Address::new_static( - "Hrmp", - "HrmpChannelDigests", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 90u8, - 90u8, - 139u8, - 78u8, - 47u8, - 2u8, - 104u8, - 211u8, - 42u8, - 246u8, - 193u8, - 210u8, - 142u8, - 223u8, - 17u8, - 136u8, - 3u8, - 182u8, - 25u8, - 56u8, - 72u8, - 72u8, - 162u8, - 131u8, - 36u8, - 34u8, - 162u8, - 176u8, - 159u8, - 113u8, - 7u8, - 207u8, - ], - ) - } - } - } - } - 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 { - pub fn assignment_keys_unsafe( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::assignment_app::Public, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "ParaSessionInfo", - "AssignmentKeysUnsafe", - ::alloc::vec::Vec::new(), - [ - 51u8, - 155u8, - 91u8, - 101u8, - 118u8, - 243u8, - 134u8, - 138u8, - 147u8, - 59u8, - 195u8, - 186u8, - 54u8, - 187u8, - 36u8, - 14u8, - 91u8, - 141u8, - 60u8, - 139u8, - 28u8, - 74u8, - 111u8, - 232u8, - 198u8, - 229u8, - 61u8, - 63u8, - 72u8, - 214u8, - 152u8, - 2u8, - ], - ) - } - pub fn earliest_stored_session( - &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( - "ParaSessionInfo", - "EarliestStoredSession", - ::alloc::vec::Vec::new(), - [ - 139u8, - 176u8, - 46u8, - 139u8, - 217u8, - 35u8, - 62u8, - 91u8, - 183u8, - 7u8, - 114u8, - 226u8, - 60u8, - 237u8, - 105u8, - 73u8, - 20u8, - 216u8, - 194u8, - 205u8, - 178u8, - 237u8, - 84u8, - 66u8, - 181u8, - 29u8, - 31u8, - 218u8, - 48u8, - 60u8, - 198u8, - 86u8, - ], - ) - } - pub fn sessions_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v4::SessionInfo, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ParaSessionInfo", - "Sessions", - ::alloc::vec::Vec::new(), - [ - 254u8, - 40u8, - 169u8, - 18u8, - 252u8, - 203u8, - 49u8, - 182u8, - 123u8, - 19u8, - 241u8, - 150u8, - 227u8, - 153u8, - 108u8, - 109u8, - 66u8, - 129u8, - 157u8, - 27u8, - 130u8, - 215u8, - 105u8, - 18u8, - 163u8, - 72u8, - 182u8, - 243u8, - 31u8, - 157u8, - 103u8, - 111u8, - ], - ) - } - pub fn sessions( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v4::SessionInfo, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ParaSessionInfo", - "Sessions", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 254u8, - 40u8, - 169u8, - 18u8, - 252u8, - 203u8, - 49u8, - 182u8, - 123u8, - 19u8, - 241u8, - 150u8, - 227u8, - 153u8, - 108u8, - 109u8, - 66u8, - 129u8, - 157u8, - 27u8, - 130u8, - 215u8, - 105u8, - 18u8, - 163u8, - 72u8, - 182u8, - 243u8, - 31u8, - 157u8, - 103u8, - 111u8, - ], - ) - } - pub fn account_keys_iter( - &self, - ) -> ::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", - ::alloc::vec::Vec::new(), - [ - 30u8, - 98u8, - 58u8, - 140u8, - 96u8, - 231u8, - 205u8, - 111u8, - 194u8, - 100u8, - 185u8, - 242u8, - 210u8, - 143u8, - 110u8, - 144u8, - 170u8, - 187u8, - 62u8, - 196u8, - 73u8, - 88u8, - 118u8, - 168u8, - 117u8, - 116u8, - 153u8, - 229u8, - 108u8, - 46u8, - 154u8, - 220u8, - ], - ) - } - pub fn account_keys( - &self, - _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::Address::new_static( - "ParaSessionInfo", - "AccountKeys", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 30u8, - 98u8, - 58u8, - 140u8, - 96u8, - 231u8, - 205u8, - 111u8, - 194u8, - 100u8, - 185u8, - 242u8, - 210u8, - 143u8, - 110u8, - 144u8, - 170u8, - 187u8, - 62u8, - 196u8, - 73u8, - 88u8, - 118u8, - 168u8, - 117u8, - 116u8, - 153u8, - 229u8, - 108u8, - 46u8, - 154u8, - 220u8, - ], - ) - } - pub fn session_executor_params_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ParaSessionInfo", - "SessionExecutorParams", - ::alloc::vec::Vec::new(), - [ - 102u8, - 51u8, - 28u8, - 199u8, - 238u8, - 229u8, - 99u8, - 38u8, - 116u8, - 154u8, - 250u8, - 136u8, - 240u8, - 122u8, - 82u8, - 13u8, - 139u8, - 160u8, - 149u8, - 218u8, - 162u8, - 130u8, - 109u8, - 251u8, - 10u8, - 109u8, - 200u8, - 158u8, - 32u8, - 157u8, - 84u8, - 234u8, - ], - ) - } - pub fn session_executor_params( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ParaSessionInfo", - "SessionExecutorParams", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 102u8, - 51u8, - 28u8, - 199u8, - 238u8, - 229u8, - 99u8, - 38u8, - 116u8, - 154u8, - 250u8, - 136u8, - 240u8, - 122u8, - 82u8, - 13u8, - 139u8, - 160u8, - 149u8, - 218u8, - 162u8, - 130u8, - 109u8, - 251u8, - 10u8, - 109u8, - 200u8, - 158u8, - 32u8, - 157u8, - 84u8, - 234u8, - ], - ) - } - } - } - } - pub mod paras_disputes { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::polkadot_runtime_parachains::disputes::pallet::Error; - pub type Call = runtime_types::polkadot_runtime_parachains::disputes::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceUnfreeze; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceUnfreeze { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceUnfreeze) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceUnfreeze { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceUnfreeze {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ForceUnfreeze { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceUnfreeze; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(ForceUnfreeze) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceUnfreeze { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceUnfreeze { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceUnfreeze = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ForceUnfreeze { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceUnfreeze = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceUnfreeze { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "ForceUnfreeze") - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceUnfreeze { - const PALLET: &'static str = "ParasDisputes"; - const CALL: &'static str = "force_unfreeze"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn force_unfreeze( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ParasDisputes", - "force_unfreeze", - types::ForceUnfreeze {}, - [ - 148u8, - 19u8, - 139u8, - 154u8, - 111u8, - 166u8, - 74u8, - 136u8, - 127u8, - 157u8, - 20u8, - 47u8, - 220u8, - 108u8, - 152u8, - 108u8, - 24u8, - 232u8, - 11u8, - 53u8, - 26u8, - 4u8, - 23u8, - 58u8, - 195u8, - 61u8, - 159u8, - 6u8, - 139u8, - 7u8, - 197u8, - 88u8, - ], - ) - } - } - } - pub type Event = runtime_types::polkadot_runtime_parachains::disputes::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DisputeInitiated( - pub runtime_types::polkadot_core_primitives::CandidateHash, - pub runtime_types::polkadot_runtime_parachains::disputes::DisputeLocation, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DisputeInitiated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - DisputeInitiated( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DisputeInitiated.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DisputeInitiated.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DisputeInitiated { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DisputeInitiated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for DisputeInitiated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DisputeInitiated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - DisputeInitiated( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for DisputeInitiated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DisputeInitiated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DisputeInitiated(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for DisputeInitiated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DisputeInitiated(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DisputeInitiated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "DisputeInitiated", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for DisputeInitiated { - const PALLET: &'static str = "ParasDisputes"; - const EVENT: &'static str = "DisputeInitiated"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DisputeConcluded( - pub runtime_types::polkadot_core_primitives::CandidateHash, - pub runtime_types::polkadot_runtime_parachains::disputes::DisputeResult, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DisputeConcluded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - DisputeConcluded( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DisputeConcluded.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DisputeConcluded.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DisputeConcluded { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DisputeConcluded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for DisputeConcluded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DisputeConcluded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - DisputeConcluded( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for DisputeConcluded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DisputeConcluded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DisputeConcluded(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for DisputeConcluded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DisputeConcluded(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DisputeConcluded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "DisputeConcluded", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for DisputeConcluded { - const PALLET: &'static str = "ParasDisputes"; - const EVENT: &'static str = "DisputeConcluded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Revert(pub ::core::primitive::u32); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Revert { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.0 - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Revert(x)) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Revert { - fn from(x: ::subxt::ext::codec::Compact) -> Revert { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Revert { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - Revert({ - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Revert.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Revert { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Revert {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Revert { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Revert; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Revert({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Revert { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Revert { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Revert(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Revert { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Revert(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Revert { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Revert", - &&self.0, - ) - } - } - impl ::subxt::events::StaticEvent for Revert { - const PALLET: &'static str = "ParasDisputes"; - const EVENT: &'static str = "Revert"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - 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", - ::alloc::vec::Vec::new(), - [ - 98u8, - 107u8, - 200u8, - 158u8, - 182u8, - 120u8, - 24u8, - 242u8, - 24u8, - 163u8, - 237u8, - 72u8, - 153u8, - 19u8, - 38u8, - 85u8, - 239u8, - 208u8, - 194u8, - 22u8, - 173u8, - 100u8, - 219u8, - 10u8, - 194u8, - 42u8, - 120u8, - 146u8, - 225u8, - 62u8, - 80u8, - 229u8, - ], - ) - } - pub fn disputes_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v4::DisputeState< - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ParasDisputes", - "Disputes", - ::alloc::vec::Vec::new(), - [ - 38u8, - 237u8, - 141u8, - 222u8, - 135u8, - 82u8, - 210u8, - 166u8, - 192u8, - 122u8, - 175u8, - 96u8, - 91u8, - 1u8, - 225u8, - 182u8, - 128u8, - 4u8, - 159u8, - 56u8, - 180u8, - 176u8, - 157u8, - 20u8, - 105u8, - 202u8, - 192u8, - 213u8, - 164u8, - 24u8, - 227u8, - 15u8, - ], - ) - } - pub fn disputes_iter1( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_primitives::v4::DisputeState< - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ParasDisputes", - "Disputes", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 38u8, - 237u8, - 141u8, - 222u8, - 135u8, - 82u8, - 210u8, - 166u8, - 192u8, - 122u8, - 175u8, - 96u8, - 91u8, - 1u8, - 225u8, - 182u8, - 128u8, - 4u8, - 159u8, - 56u8, - 180u8, - 176u8, - 157u8, - 20u8, - 105u8, - 202u8, - 192u8, - 213u8, - 164u8, - 24u8, - 227u8, - 15u8, - ], - ) - } - 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::v4::DisputeState< - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ParasDisputes", - "Disputes", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 38u8, - 237u8, - 141u8, - 222u8, - 135u8, - 82u8, - 210u8, - 166u8, - 192u8, - 122u8, - 175u8, - 96u8, - 91u8, - 1u8, - 225u8, - 182u8, - 128u8, - 4u8, - 159u8, - 56u8, - 180u8, - 176u8, - 157u8, - 20u8, - 105u8, - 202u8, - 192u8, - 213u8, - 164u8, - 24u8, - 227u8, - 15u8, - ], - ) - } - pub fn backers_on_disputes_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::ValidatorIndex, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ParasDisputes", - "BackersOnDisputes", - ::alloc::vec::Vec::new(), - [ - 136u8, - 171u8, - 20u8, - 204u8, - 135u8, - 153u8, - 144u8, - 241u8, - 46u8, - 193u8, - 65u8, - 22u8, - 116u8, - 161u8, - 144u8, - 186u8, - 31u8, - 194u8, - 202u8, - 225u8, - 14u8, - 137u8, - 240u8, - 243u8, - 119u8, - 144u8, - 102u8, - 245u8, - 133u8, - 126u8, - 103u8, - 32u8, - ], - ) - } - pub fn backers_on_disputes_iter1( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::ValidatorIndex, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ParasDisputes", - "BackersOnDisputes", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 136u8, - 171u8, - 20u8, - 204u8, - 135u8, - 153u8, - 144u8, - 241u8, - 46u8, - 193u8, - 65u8, - 22u8, - 116u8, - 161u8, - 144u8, - 186u8, - 31u8, - 194u8, - 202u8, - 225u8, - 14u8, - 137u8, - 240u8, - 243u8, - 119u8, - 144u8, - 102u8, - 245u8, - 133u8, - 126u8, - 103u8, - 32u8, - ], - ) - } - pub fn backers_on_disputes( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow< - runtime_types::polkadot_core_primitives::CandidateHash, - >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::ValidatorIndex, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ParasDisputes", - "BackersOnDisputes", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 136u8, - 171u8, - 20u8, - 204u8, - 135u8, - 153u8, - 144u8, - 241u8, - 46u8, - 193u8, - 65u8, - 22u8, - 116u8, - 161u8, - 144u8, - 186u8, - 31u8, - 194u8, - 202u8, - 225u8, - 14u8, - 137u8, - 240u8, - 243u8, - 119u8, - 144u8, - 102u8, - 245u8, - 133u8, - 126u8, - 103u8, - 32u8, - ], - ) - } - pub fn included_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ParasDisputes", - "Included", - ::alloc::vec::Vec::new(), - [ - 47u8, - 105u8, - 189u8, - 233u8, - 206u8, - 153u8, - 162u8, - 217u8, - 141u8, - 118u8, - 31u8, - 85u8, - 87u8, - 53u8, - 100u8, - 187u8, - 31u8, - 245u8, - 50u8, - 171u8, - 4u8, - 203u8, - 163u8, - 109u8, - 212u8, - 162u8, - 86u8, - 124u8, - 172u8, - 157u8, - 165u8, - 21u8, - ], - ) - } - pub fn included_iter1( - &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::Address::new_static( - "ParasDisputes", - "Included", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 47u8, - 105u8, - 189u8, - 233u8, - 206u8, - 153u8, - 162u8, - 217u8, - 141u8, - 118u8, - 31u8, - 85u8, - 87u8, - 53u8, - 100u8, - 187u8, - 31u8, - 245u8, - 50u8, - 171u8, - 4u8, - 203u8, - 163u8, - 109u8, - 212u8, - 162u8, - 86u8, - 124u8, - 172u8, - 157u8, - 165u8, - 21u8, - ], - ) - } - 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::Address::new_static( - "ParasDisputes", - "Included", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 47u8, - 105u8, - 189u8, - 233u8, - 206u8, - 153u8, - 162u8, - 217u8, - 141u8, - 118u8, - 31u8, - 85u8, - 87u8, - 53u8, - 100u8, - 187u8, - 31u8, - 245u8, - 50u8, - 171u8, - 4u8, - 203u8, - 163u8, - 109u8, - 212u8, - 162u8, - 86u8, - 124u8, - 172u8, - 157u8, - 165u8, - 21u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 245u8, - 136u8, - 43u8, - 156u8, - 7u8, - 74u8, - 31u8, - 190u8, - 184u8, - 119u8, - 182u8, - 66u8, - 18u8, - 136u8, - 30u8, - 248u8, - 24u8, - 121u8, - 26u8, - 177u8, - 169u8, - 208u8, - 218u8, - 208u8, - 80u8, - 116u8, - 31u8, - 144u8, - 49u8, - 201u8, - 198u8, - 197u8, - ], - ) - } - } - } - } - pub mod paras_slashing { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::polkadot_runtime_parachains::disputes::slashing::pallet::Error; - pub type Call = runtime_types::polkadot_runtime_parachains::disputes::slashing::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReportDisputeLostUnsigned { - pub dispute_proof: ::std::boxed::Box< - runtime_types::polkadot_runtime_parachains::disputes::slashing::DisputeProof, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ReportDisputeLostUnsigned { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ReportDisputeLostUnsigned { - dispute_proof: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime_parachains::disputes::slashing::DisputeProof, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ReportDisputeLostUnsigned::dispute_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - key_owner_proof: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ReportDisputeLostUnsigned::key_owner_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ReportDisputeLostUnsigned { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.dispute_proof), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.key_owner_proof, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.dispute_proof, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.key_owner_proof, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for ReportDisputeLostUnsigned {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ReportDisputeLostUnsigned { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReportDisputeLostUnsigned; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ReportDisputeLostUnsigned { - dispute_proof: { - let val = *vals - .get(&Some("dispute_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dispute_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("dispute_proof"))? - }, - key_owner_proof: { - let val = *vals - .get(&Some("key_owner_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "key_owner_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ReportDisputeLostUnsigned { - dispute_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("dispute_proof"))? - }, - key_owner_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ReportDisputeLostUnsigned { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ReportDisputeLostUnsigned { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReportDisputeLostUnsigned { - dispute_proof, - key_owner_proof, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dispute_proof"), - dispute_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("key_owner_proof"), - key_owner_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ReportDisputeLostUnsigned { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReportDisputeLostUnsigned { - dispute_proof, - key_owner_proof, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dispute_proof"), - dispute_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("key_owner_proof"), - key_owner_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ReportDisputeLostUnsigned { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ReportDisputeLostUnsigned", - "dispute_proof", - &self.dispute_proof, - "key_owner_proof", - &&self.key_owner_proof, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ReportDisputeLostUnsigned { - const PALLET: &'static str = "ParasSlashing"; - const CALL: &'static str = "report_dispute_lost_unsigned"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn report_dispute_lost_unsigned( - &self, - dispute_proof: runtime_types::polkadot_runtime_parachains::disputes::slashing::DisputeProof, - key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ParasSlashing", - "report_dispute_lost_unsigned", - types::ReportDisputeLostUnsigned { - dispute_proof: ::std::boxed::Box::new(dispute_proof), - key_owner_proof, - }, - [ - 57u8, - 99u8, - 246u8, - 126u8, - 203u8, - 239u8, - 64u8, - 182u8, - 167u8, - 204u8, - 96u8, - 221u8, - 126u8, - 94u8, - 254u8, - 210u8, - 18u8, - 182u8, - 207u8, - 32u8, - 250u8, - 249u8, - 116u8, - 156u8, - 210u8, - 63u8, - 254u8, - 74u8, - 86u8, - 101u8, - 28u8, - 229u8, - ], - ) - } - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn unapplied_slashes_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_parachains::disputes::slashing::PendingSlashes, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ParasSlashing", - "UnappliedSlashes", - ::alloc::vec::Vec::new(), - [ - 114u8, - 171u8, - 137u8, - 142u8, - 180u8, - 125u8, - 226u8, - 240u8, - 99u8, - 181u8, - 68u8, - 221u8, - 91u8, - 124u8, - 172u8, - 93u8, - 103u8, - 12u8, - 95u8, - 43u8, - 67u8, - 59u8, - 29u8, - 133u8, - 140u8, - 17u8, - 141u8, - 228u8, - 145u8, - 201u8, - 82u8, - 126u8, - ], - ) - } - pub fn unapplied_slashes_iter1( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_parachains::disputes::slashing::PendingSlashes, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ParasSlashing", - "UnappliedSlashes", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 114u8, - 171u8, - 137u8, - 142u8, - 180u8, - 125u8, - 226u8, - 240u8, - 99u8, - 181u8, - 68u8, - 221u8, - 91u8, - 124u8, - 172u8, - 93u8, - 103u8, - 12u8, - 95u8, - 43u8, - 67u8, - 59u8, - 29u8, - 133u8, - 140u8, - 17u8, - 141u8, - 228u8, - 145u8, - 201u8, - 82u8, - 126u8, - ], - ) - } - pub fn unapplied_slashes( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow< - runtime_types::polkadot_core_primitives::CandidateHash, - >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_parachains::disputes::slashing::PendingSlashes, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ParasSlashing", - "UnappliedSlashes", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 114u8, - 171u8, - 137u8, - 142u8, - 180u8, - 125u8, - 226u8, - 240u8, - 99u8, - 181u8, - 68u8, - 221u8, - 91u8, - 124u8, - 172u8, - 93u8, - 103u8, - 12u8, - 95u8, - 43u8, - 67u8, - 59u8, - 29u8, - 133u8, - 140u8, - 17u8, - 141u8, - 228u8, - 145u8, - 201u8, - 82u8, - 126u8, - ], - ) - } - pub fn validator_set_counts_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "ParasSlashing", - "ValidatorSetCounts", - ::alloc::vec::Vec::new(), - [ - 195u8, - 220u8, - 79u8, - 140u8, - 114u8, - 80u8, - 241u8, - 103u8, - 4u8, - 7u8, - 53u8, - 100u8, - 16u8, - 78u8, - 104u8, - 171u8, - 134u8, - 110u8, - 158u8, - 191u8, - 37u8, - 94u8, - 211u8, - 26u8, - 17u8, - 70u8, - 50u8, - 34u8, - 70u8, - 234u8, - 186u8, - 69u8, - ], - ) - } - pub fn validator_set_counts( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "ParasSlashing", - "ValidatorSetCounts", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 195u8, - 220u8, - 79u8, - 140u8, - 114u8, - 80u8, - 241u8, - 103u8, - 4u8, - 7u8, - 53u8, - 100u8, - 16u8, - 78u8, - 104u8, - 171u8, - 134u8, - 110u8, - 158u8, - 191u8, - 37u8, - 94u8, - 211u8, - 26u8, - 17u8, - 70u8, - 50u8, - 34u8, - 70u8, - 234u8, - 186u8, - 69u8, - ], - ) - } - } - } - } - pub mod registrar { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::polkadot_runtime_common::paras_registrar::pallet::Error; - pub type Call = runtime_types::polkadot_runtime_common::paras_registrar::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Register { - pub id: runtime_types::polkadot_parachain::primitives::Id, - pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, - pub validation_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Register { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Register { - id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Register::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - genesis_head: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Register::genesis_head`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validation_code: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Register::validation_code`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Register { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.genesis_head), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.validation_code, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.genesis_head, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validation_code, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Register {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Register { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Register; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Register { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - genesis_head: { - let val = *vals - .get(&Some("genesis_head")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "genesis_head".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("genesis_head"))? - }, - validation_code: { - let val = *vals - .get(&Some("validation_code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validation_code".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Register { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - genesis_head: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("genesis_head"))? - }, - validation_code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Register { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Register { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Register { id, genesis_head, validation_code } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("genesis_head"), - genesis_head - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validation_code"), - validation_code - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Register { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Register { id, genesis_head, validation_code } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("genesis_head"), - genesis_head - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validation_code"), - validation_code - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Register { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Register", - "id", - &self.id, - "genesis_head", - &self.genesis_head, - "validation_code", - &&self.validation_code, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Register { - const PALLET: &'static str = "Registrar"; - const CALL: &'static str = "register"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceRegister { - pub who: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, - pub id: runtime_types::polkadot_parachain::primitives::Id, - pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, - pub validation_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceRegister { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceRegister { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceRegister::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceRegister::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceRegister::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - genesis_head: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceRegister::genesis_head`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validation_code: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceRegister::validation_code`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceRegister { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deposit), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.genesis_head), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.validation_code, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.genesis_head, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validation_code, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceRegister {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ForceRegister { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceRegister; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceRegister { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - genesis_head: { - let val = *vals - .get(&Some("genesis_head")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "genesis_head".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("genesis_head"))? - }, - validation_code: { - let val = *vals - .get(&Some("validation_code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validation_code".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(ForceRegister { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - genesis_head: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("genesis_head"))? - }, - validation_code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceRegister { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceRegister { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceRegister { - who, - deposit, - id, - genesis_head, - validation_code, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("genesis_head"), - genesis_head - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validation_code"), - validation_code - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ForceRegister { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceRegister { - who, - deposit, - id, - genesis_head, - validation_code, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("genesis_head"), - genesis_head - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validation_code"), - validation_code - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceRegister { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "ForceRegister", - "who", - &self.who, - "deposit", - &self.deposit, - "id", - &self.id, - "genesis_head", - &self.genesis_head, - "validation_code", - &&self.validation_code, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceRegister { - const PALLET: &'static str = "Registrar"; - const CALL: &'static str = "force_register"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Deregister { - pub id: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Deregister { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Deregister { - id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Deregister::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Deregister { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.id) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.id, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.id) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.id, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Deregister {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Deregister { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Deregister; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Deregister { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Deregister { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Deregister { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Deregister { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Deregister { id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Deregister { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Deregister { id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Deregister { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Deregister", - "id", - &&self.id, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Deregister { - const PALLET: &'static str = "Registrar"; - const CALL: &'static str = "deregister"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Swap { - pub id: runtime_types::polkadot_parachain::primitives::Id, - pub other: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Swap { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Swap { - id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Swap::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - other: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Swap::other`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Swap { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.other), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.other, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Swap {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Swap { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Swap; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Swap { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - other: { - let val = *vals - .get(&Some("other")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "other".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("other"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Swap { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - other: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("other"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Swap { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Swap { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Swap { id, other } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("other"), - other as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Swap { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Swap { id, other } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("other"), - other as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Swap { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Swap", - "id", - &self.id, - "other", - &&self.other, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Swap { - const PALLET: &'static str = "Registrar"; - const CALL: &'static str = "swap"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveLock { - pub para: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RemoveLock { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RemoveLock { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RemoveLock::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RemoveLock { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.para) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.para, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.para) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.para, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RemoveLock {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RemoveLock { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RemoveLock; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RemoveLock { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(RemoveLock { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for RemoveLock { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RemoveLock { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveLock { para } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RemoveLock { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoveLock { para } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RemoveLock { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "RemoveLock", - "para", - &&self.para, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for RemoveLock { - const PALLET: &'static str = "Registrar"; - const CALL: &'static str = "remove_lock"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Reserve; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Reserve { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Reserve) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Reserve { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Reserve {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Reserve { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Reserve; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(Reserve) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Reserve { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Reserve { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Reserve = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Reserve { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Reserve = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Reserve { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "Reserve") - } - } - impl ::subxt::blocks::StaticExtrinsic for Reserve { - const PALLET: &'static str = "Registrar"; - const CALL: &'static str = "reserve"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddLock { - pub para: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AddLock { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AddLock { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AddLock::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AddLock { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.para) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.para, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.para) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.para, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AddLock {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AddLock { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AddLock; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AddLock { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(AddLock { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for AddLock { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AddLock { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddLock { para } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AddLock { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddLock { para } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AddLock { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "AddLock", - "para", - &&self.para, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for AddLock { - const PALLET: &'static str = "Registrar"; - const CALL: &'static str = "add_lock"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScheduleCodeUpgrade { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ScheduleCodeUpgrade { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ScheduleCodeUpgrade { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScheduleCodeUpgrade::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_code: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScheduleCodeUpgrade::new_code`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ScheduleCodeUpgrade { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new_code), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.para, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.new_code, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ScheduleCodeUpgrade {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ScheduleCodeUpgrade { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ScheduleCodeUpgrade; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ScheduleCodeUpgrade { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_code: { - let val = *vals - .get(&Some("new_code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_code".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_code"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ScheduleCodeUpgrade { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_code"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ScheduleCodeUpgrade { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ScheduleCodeUpgrade { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ScheduleCodeUpgrade { para, new_code } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_code"), - new_code as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ScheduleCodeUpgrade { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ScheduleCodeUpgrade { para, new_code } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_code"), - new_code as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ScheduleCodeUpgrade { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ScheduleCodeUpgrade", - "para", - &self.para, - "new_code", - &&self.new_code, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ScheduleCodeUpgrade { - const PALLET: &'static str = "Registrar"; - const CALL: &'static str = "schedule_code_upgrade"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCurrentHead { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SetCurrentHead { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SetCurrentHead { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetCurrentHead::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_head: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SetCurrentHead::new_head`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SetCurrentHead { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.new_head), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.para, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.new_head, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SetCurrentHead {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SetCurrentHead { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SetCurrentHead; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SetCurrentHead { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_head: { - let val = *vals - .get(&Some("new_head")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_head".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_head"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SetCurrentHead { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_head: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_head"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SetCurrentHead { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SetCurrentHead { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetCurrentHead { para, new_head } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_head"), - new_head as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SetCurrentHead { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SetCurrentHead { para, new_head } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_head"), - new_head as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SetCurrentHead { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SetCurrentHead", - "para", - &self.para, - "new_head", - &&self.new_head, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for SetCurrentHead { - const PALLET: &'static str = "Registrar"; - const CALL: &'static str = "set_current_head"; - } - } - pub struct TransactionApi; - impl TransactionApi { - 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", - types::Register { - id, - genesis_head, - validation_code, - }, - [ - 208u8, - 1u8, - 38u8, - 95u8, - 53u8, - 67u8, - 148u8, - 138u8, - 189u8, - 212u8, - 250u8, - 160u8, - 99u8, - 220u8, - 231u8, - 55u8, - 220u8, - 21u8, - 188u8, - 81u8, - 162u8, - 219u8, - 93u8, - 136u8, - 255u8, - 22u8, - 5u8, - 147u8, - 40u8, - 46u8, - 141u8, - 77u8, - ], - ) - } - 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", - types::ForceRegister { - who, - deposit, - id, - genesis_head, - validation_code, - }, - [ - 73u8, - 118u8, - 161u8, - 95u8, - 234u8, - 106u8, - 174u8, - 143u8, - 34u8, - 235u8, - 140u8, - 166u8, - 210u8, - 101u8, - 53u8, - 191u8, - 194u8, - 17u8, - 189u8, - 187u8, - 86u8, - 91u8, - 112u8, - 248u8, - 109u8, - 208u8, - 37u8, - 70u8, - 26u8, - 195u8, - 90u8, - 207u8, - ], - ) - } - pub fn deregister( - &self, - id: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Registrar", - "deregister", - types::Deregister { id }, - [ - 212u8, - 38u8, - 98u8, - 234u8, - 146u8, - 188u8, - 71u8, - 244u8, - 238u8, - 255u8, - 3u8, - 89u8, - 52u8, - 242u8, - 126u8, - 187u8, - 185u8, - 193u8, - 174u8, - 187u8, - 196u8, - 3u8, - 66u8, - 77u8, - 173u8, - 115u8, - 52u8, - 210u8, - 69u8, - 221u8, - 109u8, - 112u8, - ], - ) - } - 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", - types::Swap { id, other }, - [ - 235u8, - 169u8, - 16u8, - 199u8, - 107u8, - 54u8, - 35u8, - 160u8, - 219u8, - 156u8, - 177u8, - 205u8, - 83u8, - 45u8, - 30u8, - 233u8, - 8u8, - 143u8, - 27u8, - 123u8, - 156u8, - 65u8, - 128u8, - 233u8, - 218u8, - 230u8, - 98u8, - 206u8, - 231u8, - 95u8, - 224u8, - 35u8, - ], - ) - } - pub fn remove_lock( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Registrar", - "remove_lock", - types::RemoveLock { para }, - [ - 239u8, - 207u8, - 248u8, - 246u8, - 244u8, - 128u8, - 113u8, - 114u8, - 6u8, - 232u8, - 218u8, - 123u8, - 241u8, - 190u8, - 255u8, - 48u8, - 26u8, - 248u8, - 33u8, - 86u8, - 87u8, - 219u8, - 65u8, - 104u8, - 66u8, - 68u8, - 34u8, - 201u8, - 43u8, - 159u8, - 141u8, - 100u8, - ], - ) - } - pub fn reserve(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Registrar", - "reserve", - types::Reserve {}, - [ - 50u8, - 72u8, - 218u8, - 145u8, - 224u8, - 93u8, - 219u8, - 220u8, - 121u8, - 35u8, - 104u8, - 11u8, - 139u8, - 114u8, - 171u8, - 101u8, - 40u8, - 13u8, - 33u8, - 39u8, - 245u8, - 146u8, - 138u8, - 159u8, - 245u8, - 236u8, - 26u8, - 0u8, - 20u8, - 243u8, - 128u8, - 81u8, - ], - ) - } - pub fn add_lock( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Registrar", - "add_lock", - types::AddLock { para }, - [ - 158u8, - 27u8, - 55u8, - 53u8, - 71u8, - 221u8, - 37u8, - 73u8, - 23u8, - 165u8, - 129u8, - 17u8, - 167u8, - 79u8, - 112u8, - 35u8, - 231u8, - 8u8, - 241u8, - 151u8, - 207u8, - 235u8, - 224u8, - 104u8, - 102u8, - 108u8, - 10u8, - 244u8, - 33u8, - 67u8, - 45u8, - 13u8, - ], - ) - } - 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", - types::ScheduleCodeUpgrade { - para, - new_code, - }, - [ - 234u8, - 22u8, - 133u8, - 175u8, - 218u8, - 250u8, - 119u8, - 175u8, - 23u8, - 250u8, - 175u8, - 48u8, - 247u8, - 208u8, - 235u8, - 167u8, - 24u8, - 248u8, - 247u8, - 236u8, - 239u8, - 9u8, - 78u8, - 195u8, - 146u8, - 172u8, - 41u8, - 105u8, - 183u8, - 253u8, - 1u8, - 170u8, - ], - ) - } - 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", - types::SetCurrentHead { - para, - new_head, - }, - [ - 201u8, - 49u8, - 104u8, - 135u8, - 80u8, - 233u8, - 154u8, - 193u8, - 143u8, - 209u8, - 10u8, - 209u8, - 234u8, - 252u8, - 142u8, - 216u8, - 220u8, - 249u8, - 23u8, - 252u8, - 73u8, - 169u8, - 204u8, - 242u8, - 59u8, - 19u8, - 18u8, - 35u8, - 115u8, - 209u8, - 79u8, - 112u8, - ], - ) - } - } - } - pub type Event = runtime_types::polkadot_runtime_common::paras_registrar::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Registered { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub manager: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Registered { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Registered { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Registered::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - manager: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Registered::manager`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Registered { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.manager), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.manager, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Registered {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Registered { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Registered; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Registered { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - manager: { - let val = *vals - .get(&Some("manager")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "manager".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("manager"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Registered { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - manager: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("manager"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Registered { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Registered { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Registered { para_id, manager } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("manager"), - manager as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Registered { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Registered { para_id, manager } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("manager"), - manager as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Registered { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Registered", - "para_id", - &self.para_id, - "manager", - &&self.manager, - ) - } - } - impl ::subxt::events::StaticEvent for Registered { - const PALLET: &'static str = "Registrar"; - const EVENT: &'static str = "Registered"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Deregistered { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Deregistered { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Deregistered { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Deregistered::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Deregistered { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.para_id) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.para_id, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.para_id) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.para_id, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Deregistered {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Deregistered { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Deregistered; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Deregistered { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Deregistered { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Deregistered { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Deregistered { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Deregistered { para_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Deregistered { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Deregistered { para_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Deregistered { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Deregistered", - "para_id", - &&self.para_id, - ) - } - } - impl ::subxt::events::StaticEvent for Deregistered { - const PALLET: &'static str = "Registrar"; - const EVENT: &'static str = "Deregistered"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Reserved { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub who: ::subxt::utils::AccountId32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Reserved { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Reserved { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Reserved::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Reserved::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Reserved { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Reserved {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Reserved { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Reserved; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Reserved { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Reserved { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Reserved { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Reserved { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Reserved { para_id, who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Reserved { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Reserved { para_id, who } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Reserved { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Reserved", - "para_id", - &self.para_id, - "who", - &&self.who, - ) - } - } - impl ::subxt::events::StaticEvent for Reserved { - const PALLET: &'static str = "Registrar"; - const EVENT: &'static str = "Reserved"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Swapped { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub other_id: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Swapped { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Swapped { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Swapped::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - other_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Swapped::other_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Swapped { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.other_id), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.other_id, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Swapped {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Swapped { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Swapped; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Swapped { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - other_id: { - let val = *vals - .get(&Some("other_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "other_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("other_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Swapped { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - other_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("other_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Swapped { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Swapped { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Swapped { para_id, other_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("other_id"), - other_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Swapped { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Swapped { para_id, other_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("other_id"), - other_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Swapped { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Swapped", - "para_id", - &self.para_id, - "other_id", - &&self.other_id, - ) - } - } - impl ::subxt::events::StaticEvent for Swapped { - const PALLET: &'static str = "Registrar"; - const EVENT: &'static str = "Swapped"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn pending_swap_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 75u8, - 6u8, - 68u8, - 43u8, - 108u8, - 147u8, - 220u8, - 90u8, - 190u8, - 86u8, - 209u8, - 141u8, - 9u8, - 254u8, - 103u8, - 10u8, - 94u8, - 187u8, - 155u8, - 249u8, - 140u8, - 167u8, - 248u8, - 196u8, - 67u8, - 169u8, - 186u8, - 192u8, - 139u8, - 188u8, - 48u8, - 221u8, - ], - ) - } - 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::Address::new_static( - "Registrar", - "PendingSwap", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 75u8, - 6u8, - 68u8, - 43u8, - 108u8, - 147u8, - 220u8, - 90u8, - 190u8, - 86u8, - 209u8, - 141u8, - 9u8, - 254u8, - 103u8, - 10u8, - 94u8, - 187u8, - 155u8, - 249u8, - 140u8, - 167u8, - 248u8, - 196u8, - 67u8, - 169u8, - 186u8, - 192u8, - 139u8, - 188u8, - 48u8, - 221u8, - ], - ) - } - pub fn paras_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 187u8, - 63u8, - 130u8, - 102u8, - 222u8, - 144u8, - 126u8, - 130u8, - 82u8, - 22u8, - 64u8, - 237u8, - 229u8, - 91u8, - 66u8, - 52u8, - 9u8, - 40u8, - 254u8, - 60u8, - 55u8, - 42u8, - 144u8, - 254u8, - 102u8, - 21u8, - 86u8, - 136u8, - 49u8, - 156u8, - 94u8, - 163u8, - ], - ) - } - 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::Address::new_static( - "Registrar", - "Paras", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 187u8, - 63u8, - 130u8, - 102u8, - 222u8, - 144u8, - 126u8, - 130u8, - 82u8, - 22u8, - 64u8, - 237u8, - 229u8, - 91u8, - 66u8, - 52u8, - 9u8, - 40u8, - 254u8, - 60u8, - 55u8, - 42u8, - 144u8, - 254u8, - 102u8, - 21u8, - 86u8, - 136u8, - 49u8, - 156u8, - 94u8, - 163u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 52u8, - 14u8, - 56u8, - 196u8, - 79u8, - 221u8, - 32u8, - 14u8, - 154u8, - 247u8, - 94u8, - 219u8, - 11u8, - 11u8, - 104u8, - 137u8, - 167u8, - 195u8, - 180u8, - 101u8, - 35u8, - 235u8, - 67u8, - 144u8, - 128u8, - 209u8, - 189u8, - 227u8, - 177u8, - 74u8, - 42u8, - 15u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn para_deposit( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "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, - ], - ) - } - pub fn data_deposit_per_byte( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "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; - pub type Error = runtime_types::polkadot_runtime_common::slots::pallet::Error; - pub type Call = runtime_types::polkadot_runtime_common::slots::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceLease { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub leaser: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - pub period_begin: ::core::primitive::u32, - pub period_count: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceLease { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceLease { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceLease::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - leaser: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceLease::leaser`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceLease::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - period_begin: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceLease::period_begin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - period_count: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceLease::period_count`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceLease { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.leaser), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.period_begin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.period_count), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.para, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.leaser, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.period_begin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.period_count, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceLease {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ForceLease { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceLease; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceLease { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - leaser: { - let val = *vals - .get(&Some("leaser")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "leaser".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("leaser"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - period_begin: { - let val = *vals - .get(&Some("period_begin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "period_begin".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("period_begin"))? - }, - period_count: { - let val = *vals - .get(&Some("period_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "period_count".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("period_count"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(ForceLease { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - leaser: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("leaser"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - period_begin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("period_begin"))? - }, - period_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("period_count"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ForceLease { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceLease { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceLease { - para, - leaser, - amount, - period_begin, - period_count, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("leaser"), - leaser as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("period_begin"), - period_begin - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("period_count"), - period_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ForceLease { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceLease { - para, - leaser, - amount, - period_begin, - period_count, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("leaser"), - leaser as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("period_begin"), - period_begin - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("period_count"), - period_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceLease { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "ForceLease", - "para", - &self.para, - "leaser", - &self.leaser, - "amount", - &self.amount, - "period_begin", - &self.period_begin, - "period_count", - &&self.period_count, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceLease { - const PALLET: &'static str = "Slots"; - const CALL: &'static str = "force_lease"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearAllLeases { - pub para: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ClearAllLeases { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ClearAllLeases { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ClearAllLeases::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ClearAllLeases { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.para) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.para, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.para) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.para, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ClearAllLeases {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ClearAllLeases { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ClearAllLeases; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ClearAllLeases { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ClearAllLeases { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ClearAllLeases { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ClearAllLeases { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClearAllLeases { para } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ClearAllLeases { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ClearAllLeases { para } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ClearAllLeases { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ClearAllLeases", - "para", - &&self.para, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ClearAllLeases { - const PALLET: &'static str = "Slots"; - const CALL: &'static str = "clear_all_leases"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TriggerOnboard { - pub para: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for TriggerOnboard { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(TriggerOnboard { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TriggerOnboard::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for TriggerOnboard { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.para) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.para, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.para) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.para, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for TriggerOnboard {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for TriggerOnboard { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = TriggerOnboard; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(TriggerOnboard { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(TriggerOnboard { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for TriggerOnboard { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for TriggerOnboard { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TriggerOnboard { para } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for TriggerOnboard { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TriggerOnboard { para } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for TriggerOnboard { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "TriggerOnboard", - "para", - &&self.para, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for TriggerOnboard { - const PALLET: &'static str = "Slots"; - const CALL: &'static str = "trigger_onboard"; - } - } - pub struct TransactionApi; - impl TransactionApi { - 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", - types::ForceLease { - para, - leaser, - amount, - period_begin, - period_count, - }, - [ - 27u8, - 203u8, - 227u8, - 16u8, - 65u8, - 135u8, - 140u8, - 244u8, - 218u8, - 231u8, - 78u8, - 190u8, - 169u8, - 156u8, - 233u8, - 31u8, - 20u8, - 119u8, - 158u8, - 34u8, - 130u8, - 51u8, - 38u8, - 176u8, - 142u8, - 139u8, - 152u8, - 139u8, - 26u8, - 184u8, - 238u8, - 227u8, - ], - ) - } - 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", - types::ClearAllLeases { para }, - [ - 201u8, - 71u8, - 106u8, - 50u8, - 65u8, - 107u8, - 191u8, - 41u8, - 52u8, - 106u8, - 51u8, - 87u8, - 19u8, - 199u8, - 244u8, - 93u8, - 104u8, - 148u8, - 116u8, - 198u8, - 169u8, - 137u8, - 28u8, - 78u8, - 54u8, - 230u8, - 161u8, - 16u8, - 79u8, - 248u8, - 28u8, - 183u8, - ], - ) - } - pub fn trigger_onboard( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Slots", - "trigger_onboard", - types::TriggerOnboard { para }, - [ - 192u8, - 239u8, - 65u8, - 186u8, - 200u8, - 27u8, - 23u8, - 235u8, - 2u8, - 229u8, - 230u8, - 192u8, - 240u8, - 51u8, - 62u8, - 80u8, - 253u8, - 105u8, - 178u8, - 134u8, - 252u8, - 2u8, - 153u8, - 29u8, - 235u8, - 249u8, - 92u8, - 246u8, - 136u8, - 169u8, - 109u8, - 4u8, - ], - ) - } - } - } - pub type Event = runtime_types::polkadot_runtime_common::slots::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NewLeasePeriod { - pub lease_period: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for NewLeasePeriod { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.lease_period - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - NewLeasePeriod, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(NewLeasePeriod { - lease_period: x, - }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for NewLeasePeriod { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> NewLeasePeriod { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NewLeasePeriod { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(NewLeasePeriod { - lease_period: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NewLeasePeriod::lease_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NewLeasePeriod { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.lease_period) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.lease_period, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.lease_period) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.lease_period, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NewLeasePeriod {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for NewLeasePeriod { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NewLeasePeriod; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(NewLeasePeriod { - lease_period: { - let val = *vals - .get(&Some("lease_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "lease_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("lease_period"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(NewLeasePeriod { - lease_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("lease_period"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for NewLeasePeriod { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NewLeasePeriod { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewLeasePeriod { lease_period } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("lease_period"), - lease_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for NewLeasePeriod { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewLeasePeriod { lease_period } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("lease_period"), - lease_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NewLeasePeriod { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "NewLeasePeriod", - "lease_period", - &&self.lease_period, - ) - } - } - impl ::subxt::events::StaticEvent for NewLeasePeriod { - const PALLET: &'static str = "Slots"; - const EVENT: &'static str = "NewLeasePeriod"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Leased { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Leased { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Leased::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - leaser: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Leased::leaser`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - period_begin: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Leased::period_begin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - period_count: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Leased::period_count`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - extra_reserved: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Leased::extra_reserved`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - total_amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Leased::total_amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Leased { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.leaser), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.period_begin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.period_count), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.extra_reserved), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.total_amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.leaser, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.period_begin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.period_count, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.extra_reserved, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.total_amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Leased {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Leased { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Leased; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Leased { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - leaser: { - let val = *vals - .get(&Some("leaser")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "leaser".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("leaser"))? - }, - period_begin: { - let val = *vals - .get(&Some("period_begin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "period_begin".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("period_begin"))? - }, - period_count: { - let val = *vals - .get(&Some("period_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "period_count".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("period_count"))? - }, - extra_reserved: { - let val = *vals - .get(&Some("extra_reserved")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "extra_reserved".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("extra_reserved"))? - }, - total_amount: { - let val = *vals - .get(&Some("total_amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "total_amount".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("total_amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = value; - Ok(Leased { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - leaser: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("leaser"))? - }, - period_begin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("period_begin"))? - }, - period_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("period_count"))? - }, - extra_reserved: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("extra_reserved"))? - }, - total_amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("total_amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Leased { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Leased { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Leased { - para_id, - leaser, - period_begin, - period_count, - extra_reserved, - total_amount, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("leaser"), - leaser as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("period_begin"), - period_begin - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("period_count"), - period_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("extra_reserved"), - extra_reserved - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("total_amount"), - total_amount - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Leased { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Leased { - para_id, - leaser, - period_begin, - period_count, - extra_reserved, - total_amount, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("leaser"), - leaser as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("period_begin"), - period_begin - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("period_count"), - period_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("extra_reserved"), - extra_reserved - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("total_amount"), - total_amount - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Leased { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "para_id", - "leaser", - "period_begin", - "period_count", - "extra_reserved", - "total_amount", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.para_id, - &self.leaser, - &self.period_begin, - &self.period_count, - &self.extra_reserved, - &&self.total_amount, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "Leased", - names, - values, - ) - } - } - 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 { - pub fn leases_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 233u8, - 226u8, - 181u8, - 160u8, - 216u8, - 86u8, - 238u8, - 229u8, - 31u8, - 67u8, - 200u8, - 188u8, - 134u8, - 22u8, - 88u8, - 147u8, - 204u8, - 11u8, - 34u8, - 244u8, - 234u8, - 77u8, - 184u8, - 171u8, - 147u8, - 228u8, - 254u8, - 11u8, - 40u8, - 162u8, - 177u8, - 196u8, - ], - ) - } - 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::Address::new_static( - "Slots", - "Leases", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 233u8, - 226u8, - 181u8, - 160u8, - 216u8, - 86u8, - 238u8, - 229u8, - 31u8, - 67u8, - 200u8, - 188u8, - 134u8, - 22u8, - 88u8, - 147u8, - 204u8, - 11u8, - 34u8, - 244u8, - 234u8, - 77u8, - 184u8, - 171u8, - 147u8, - 228u8, - 254u8, - 11u8, - 40u8, - 162u8, - 177u8, - 196u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn lease_period( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "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, - ], - ) - } - pub fn lease_offset( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "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; - pub type Error = runtime_types::polkadot_runtime_common::auctions::pallet::Error; - pub type Call = runtime_types::polkadot_runtime_common::auctions::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NewAuction { - #[codec(compact)] - pub duration: ::core::primitive::u32, - #[codec(compact)] - pub lease_period_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NewAuction { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(NewAuction { - duration: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NewAuction::duration`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - lease_period_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NewAuction::lease_period_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NewAuction { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.duration), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.lease_period_index), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.duration), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.lease_period_index), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NewAuction {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for NewAuction { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NewAuction; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(NewAuction { - duration: { - let val = *vals - .get(&Some("duration")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "duration".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("duration"))? - }, - lease_period_index: { - let val = *vals - .get(&Some("lease_period_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "lease_period_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("lease_period_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(NewAuction { - duration: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("duration"))? - }, - lease_period_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("lease_period_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for NewAuction { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NewAuction { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewAuction { duration, lease_period_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("duration"), - duration as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("lease_period_index"), - lease_period_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for NewAuction { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NewAuction { duration, lease_period_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("duration"), - duration as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("lease_period_index"), - lease_period_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NewAuction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "NewAuction", - "duration", - &self.duration, - "lease_period_index", - &&self.lease_period_index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for NewAuction { - const PALLET: &'static str = "Auctions"; - const CALL: &'static str = "new_auction"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Bid { - #[codec(compact)] - pub para: runtime_types::polkadot_parachain::primitives::Id, - #[codec(compact)] - pub auction_index: ::core::primitive::u32, - #[codec(compact)] - pub first_slot: ::core::primitive::u32, - #[codec(compact)] - pub last_slot: ::core::primitive::u32, - #[codec(compact)] - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Bid { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Bid { - para: { - let __codec_res_edqy = <::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bid::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - auction_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bid::auction_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - first_slot: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bid::first_slot`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - last_slot: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bid::last_slot`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - amount: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bid::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Bid { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.para), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.auction_index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.first_slot), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.last_slot), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.amount), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.para), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.auction_index), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.first_slot), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.last_slot), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.amount), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Bid {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Bid { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Bid; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Bid { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - auction_index: { - let val = *vals - .get(&Some("auction_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "auction_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("auction_index"))? - }, - first_slot: { - let val = *vals - .get(&Some("first_slot")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "first_slot".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("first_slot"))? - }, - last_slot: { - let val = *vals - .get(&Some("last_slot")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "last_slot".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("last_slot"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(Bid { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - auction_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("auction_index"))? - }, - first_slot: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("first_slot"))? - }, - last_slot: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("last_slot"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Bid { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Bid { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Bid { - para, - auction_index, - first_slot, - last_slot, - amount, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("auction_index"), - auction_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_slot"), - first_slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_slot"), - last_slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Bid { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Bid { - para, - auction_index, - first_slot, - last_slot, - amount, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("auction_index"), - auction_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_slot"), - first_slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_slot"), - last_slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Bid { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "Bid", - "para", - &self.para, - "auction_index", - &self.auction_index, - "first_slot", - &self.first_slot, - "last_slot", - &self.last_slot, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Bid { - const PALLET: &'static str = "Auctions"; - const CALL: &'static str = "bid"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelAuction; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CancelAuction { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CancelAuction) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CancelAuction { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CancelAuction {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CancelAuction { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CancelAuction; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(CancelAuction) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CancelAuction { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CancelAuction { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CancelAuction = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CancelAuction { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CancelAuction = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CancelAuction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "CancelAuction") - } - } - impl ::subxt::blocks::StaticExtrinsic for CancelAuction { - const PALLET: &'static str = "Auctions"; - const CALL: &'static str = "cancel_auction"; - } - } - pub struct TransactionApi; - impl TransactionApi { - 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", - types::NewAuction { - duration, - lease_period_index, - }, - [ - 116u8, - 2u8, - 215u8, - 191u8, - 69u8, - 99u8, - 218u8, - 198u8, - 71u8, - 228u8, - 88u8, - 144u8, - 139u8, - 206u8, - 214u8, - 58u8, - 106u8, - 117u8, - 138u8, - 115u8, - 109u8, - 253u8, - 210u8, - 135u8, - 189u8, - 190u8, - 86u8, - 189u8, - 8u8, - 168u8, - 142u8, - 181u8, - ], - ) - } - 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", - types::Bid { - para, - auction_index, - first_slot, - last_slot, - amount, - }, - [ - 203u8, - 71u8, - 160u8, - 55u8, - 95u8, - 152u8, - 111u8, - 30u8, - 86u8, - 113u8, - 213u8, - 217u8, - 140u8, - 9u8, - 138u8, - 150u8, - 90u8, - 229u8, - 17u8, - 95u8, - 141u8, - 150u8, - 183u8, - 171u8, - 45u8, - 110u8, - 47u8, - 91u8, - 159u8, - 91u8, - 214u8, - 132u8, - ], - ) - } - pub fn cancel_auction( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Auctions", - "cancel_auction", - types::CancelAuction {}, - [ - 122u8, - 231u8, - 136u8, - 184u8, - 194u8, - 4u8, - 244u8, - 62u8, - 253u8, - 134u8, - 9u8, - 240u8, - 75u8, - 227u8, - 74u8, - 195u8, - 113u8, - 247u8, - 127u8, - 17u8, - 90u8, - 228u8, - 251u8, - 88u8, - 4u8, - 29u8, - 254u8, - 71u8, - 177u8, - 103u8, - 66u8, - 224u8, - ], - ) - } - } - } - pub type Event = runtime_types::polkadot_runtime_common::auctions::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AuctionStarted { - pub auction_index: ::core::primitive::u32, - pub lease_period: ::core::primitive::u32, - pub ending: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AuctionStarted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(AuctionStarted { - auction_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AuctionStarted::auction_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - lease_period: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AuctionStarted::lease_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ending: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AuctionStarted::ending`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AuctionStarted { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.auction_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.lease_period), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.ending), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.auction_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.lease_period, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.ending, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AuctionStarted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AuctionStarted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AuctionStarted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AuctionStarted { - auction_index: { - let val = *vals - .get(&Some("auction_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "auction_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("auction_index"))? - }, - lease_period: { - let val = *vals - .get(&Some("lease_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "lease_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("lease_period"))? - }, - ending: { - let val = *vals - .get(&Some("ending")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ending".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ending"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(AuctionStarted { - auction_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("auction_index"))? - }, - lease_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("lease_period"))? - }, - ending: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ending"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for AuctionStarted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AuctionStarted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AuctionStarted { auction_index, lease_period, ending } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("auction_index"), - auction_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("lease_period"), - lease_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ending"), - ending as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AuctionStarted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AuctionStarted { auction_index, lease_period, ending } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("auction_index"), - auction_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("lease_period"), - lease_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ending"), - ending as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AuctionStarted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "AuctionStarted", - "auction_index", - &self.auction_index, - "lease_period", - &self.lease_period, - "ending", - &&self.ending, - ) - } - } - impl ::subxt::events::StaticEvent for AuctionStarted { - const PALLET: &'static str = "Auctions"; - const EVENT: &'static str = "AuctionStarted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AuctionClosed { - pub auction_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for AuctionClosed { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.auction_index - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - AuctionClosed, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AuctionClosed { - auction_index: x, - }) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for AuctionClosed { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> AuctionClosed { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AuctionClosed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(AuctionClosed { - auction_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AuctionClosed::auction_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AuctionClosed { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.auction_index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.auction_index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.auction_index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.auction_index, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AuctionClosed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AuctionClosed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AuctionClosed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AuctionClosed { - auction_index: { - let val = *vals - .get(&Some("auction_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "auction_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("auction_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(AuctionClosed { - auction_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("auction_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for AuctionClosed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AuctionClosed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AuctionClosed { auction_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("auction_index"), - auction_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AuctionClosed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AuctionClosed { auction_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("auction_index"), - auction_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AuctionClosed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "AuctionClosed", - "auction_index", - &&self.auction_index, - ) - } - } - impl ::subxt::events::StaticEvent for AuctionClosed { - const PALLET: &'static str = "Auctions"; - const EVENT: &'static str = "AuctionClosed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Reserved { - pub bidder: ::subxt::utils::AccountId32, - pub extra_reserved: ::core::primitive::u128, - pub total_amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Reserved { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Reserved { - bidder: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Reserved::bidder`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - extra_reserved: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Reserved::extra_reserved`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - total_amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Reserved::total_amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Reserved { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.bidder), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.extra_reserved), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.total_amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.bidder, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.extra_reserved, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.total_amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Reserved {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Reserved { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Reserved; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Reserved { - bidder: { - let val = *vals - .get(&Some("bidder")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bidder".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bidder"))? - }, - extra_reserved: { - let val = *vals - .get(&Some("extra_reserved")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "extra_reserved".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("extra_reserved"))? - }, - total_amount: { - let val = *vals - .get(&Some("total_amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "total_amount".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("total_amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Reserved { - bidder: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bidder"))? - }, - extra_reserved: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("extra_reserved"))? - }, - total_amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("total_amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Reserved { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Reserved { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Reserved { bidder, extra_reserved, total_amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bidder"), - bidder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("extra_reserved"), - extra_reserved - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("total_amount"), - total_amount - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Reserved { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Reserved { bidder, extra_reserved, total_amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bidder"), - bidder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("extra_reserved"), - extra_reserved - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("total_amount"), - total_amount - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Reserved { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Reserved", - "bidder", - &self.bidder, - "extra_reserved", - &self.extra_reserved, - "total_amount", - &&self.total_amount, - ) - } - } - impl ::subxt::events::StaticEvent for Reserved { - const PALLET: &'static str = "Auctions"; - const EVENT: &'static str = "Reserved"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Unreserved { - pub bidder: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Unreserved { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Unreserved { - bidder: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unreserved::bidder`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Unreserved::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Unreserved { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.bidder), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.bidder, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Unreserved {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Unreserved { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Unreserved; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Unreserved { - bidder: { - let val = *vals - .get(&Some("bidder")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bidder".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bidder"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Unreserved { - bidder: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bidder"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Unreserved { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Unreserved { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unreserved { bidder, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bidder"), - bidder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Unreserved { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Unreserved { bidder, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bidder"), - bidder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Unreserved { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Unreserved", - "bidder", - &self.bidder, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Unreserved { - const PALLET: &'static str = "Auctions"; - const EVENT: &'static str = "Unreserved"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReserveConfiscated { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub leaser: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ReserveConfiscated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ReserveConfiscated { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReserveConfiscated::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - leaser: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReserveConfiscated::leaser`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReserveConfiscated::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ReserveConfiscated { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.leaser), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.leaser, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ReserveConfiscated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ReserveConfiscated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReserveConfiscated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ReserveConfiscated { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - leaser: { - let val = *vals - .get(&Some("leaser")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "leaser".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("leaser"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(ReserveConfiscated { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - leaser: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("leaser"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ReserveConfiscated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ReserveConfiscated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReserveConfiscated { para_id, leaser, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("leaser"), - leaser as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ReserveConfiscated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReserveConfiscated { para_id, leaser, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("leaser"), - leaser as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ReserveConfiscated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ReserveConfiscated", - "para_id", - &self.para_id, - "leaser", - &self.leaser, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for ReserveConfiscated { - const PALLET: &'static str = "Auctions"; - const EVENT: &'static str = "ReserveConfiscated"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BidAccepted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BidAccepted { - bidder: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BidAccepted::bidder`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BidAccepted::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BidAccepted::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - first_slot: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BidAccepted::first_slot`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - last_slot: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BidAccepted::last_slot`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BidAccepted { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.bidder), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.first_slot), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.last_slot), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.bidder, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.first_slot, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.last_slot, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BidAccepted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BidAccepted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BidAccepted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BidAccepted { - bidder: { - let val = *vals - .get(&Some("bidder")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bidder".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bidder"))? - }, - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - first_slot: { - let val = *vals - .get(&Some("first_slot")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "first_slot".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("first_slot"))? - }, - last_slot: { - let val = *vals - .get(&Some("last_slot")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "last_slot".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("last_slot"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(BidAccepted { - bidder: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bidder"))? - }, - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - first_slot: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("first_slot"))? - }, - last_slot: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("last_slot"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for BidAccepted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BidAccepted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BidAccepted { - bidder, - para_id, - amount, - first_slot, - last_slot, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bidder"), - bidder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_slot"), - first_slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_slot"), - last_slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BidAccepted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BidAccepted { - bidder, - para_id, - amount, - first_slot, - last_slot, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bidder"), - bidder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_slot"), - first_slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_slot"), - last_slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BidAccepted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "BidAccepted", - "bidder", - &self.bidder, - "para_id", - &self.para_id, - "amount", - &self.amount, - "first_slot", - &self.first_slot, - "last_slot", - &&self.last_slot, - ) - } - } - impl ::subxt::events::StaticEvent for BidAccepted { - const PALLET: &'static str = "Auctions"; - const EVENT: &'static str = "BidAccepted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct WinningOffset { - pub auction_index: ::core::primitive::u32, - pub block_number: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for WinningOffset { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(WinningOffset { - auction_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WinningOffset::auction_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - block_number: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WinningOffset::block_number`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for WinningOffset { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.auction_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.block_number), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.auction_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.block_number, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for WinningOffset {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for WinningOffset { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = WinningOffset; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(WinningOffset { - auction_index: { - let val = *vals - .get(&Some("auction_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "auction_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("auction_index"))? - }, - block_number: { - let val = *vals - .get(&Some("block_number")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "block_number".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("block_number"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(WinningOffset { - auction_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("auction_index"))? - }, - block_number: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("block_number"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for WinningOffset { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for WinningOffset { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WinningOffset { auction_index, block_number } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("auction_index"), - auction_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("block_number"), - block_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for WinningOffset { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WinningOffset { auction_index, block_number } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("auction_index"), - auction_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("block_number"), - block_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for WinningOffset { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "WinningOffset", - "auction_index", - &self.auction_index, - "block_number", - &&self.block_number, - ) - } - } - 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 { - 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", - ::alloc::vec::Vec::new(), - [ - 110u8, - 243u8, - 85u8, - 4u8, - 127u8, - 111u8, - 101u8, - 167u8, - 72u8, - 129u8, - 201u8, - 250u8, - 88u8, - 9u8, - 79u8, - 14u8, - 152u8, - 132u8, - 0u8, - 204u8, - 112u8, - 248u8, - 91u8, - 254u8, - 30u8, - 22u8, - 62u8, - 180u8, - 188u8, - 204u8, - 29u8, - 103u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 116u8, - 81u8, - 223u8, - 26u8, - 151u8, - 103u8, - 209u8, - 182u8, - 169u8, - 173u8, - 220u8, - 234u8, - 88u8, - 191u8, - 255u8, - 75u8, - 148u8, - 75u8, - 167u8, - 37u8, - 6u8, - 14u8, - 224u8, - 193u8, - 92u8, - 82u8, - 205u8, - 172u8, - 209u8, - 83u8, - 3u8, - 77u8, - ], - ) - } - pub fn reserved_amounts_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u128, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "Auctions", - "ReservedAmounts", - ::alloc::vec::Vec::new(), - [ - 77u8, - 44u8, - 116u8, - 36u8, - 189u8, - 213u8, - 126u8, - 32u8, - 42u8, - 131u8, - 108u8, - 41u8, - 147u8, - 40u8, - 247u8, - 245u8, - 161u8, - 42u8, - 152u8, - 195u8, - 28u8, - 142u8, - 231u8, - 209u8, - 113u8, - 11u8, - 240u8, - 37u8, - 112u8, - 38u8, - 239u8, - 245u8, - ], - ) - } - pub fn reserved_amounts_iter1( - &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::Address::new_static( - "Auctions", - "ReservedAmounts", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 77u8, - 44u8, - 116u8, - 36u8, - 189u8, - 213u8, - 126u8, - 32u8, - 42u8, - 131u8, - 108u8, - 41u8, - 147u8, - 40u8, - 247u8, - 245u8, - 161u8, - 42u8, - 152u8, - 195u8, - 28u8, - 142u8, - 231u8, - 209u8, - 113u8, - 11u8, - 240u8, - 37u8, - 112u8, - 38u8, - 239u8, - 245u8, - ], - ) - } - 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::Address::new_static( - "Auctions", - "ReservedAmounts", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 77u8, - 44u8, - 116u8, - 36u8, - 189u8, - 213u8, - 126u8, - 32u8, - 42u8, - 131u8, - 108u8, - 41u8, - 147u8, - 40u8, - 247u8, - 245u8, - 161u8, - 42u8, - 152u8, - 195u8, - 28u8, - 142u8, - 231u8, - 209u8, - 113u8, - 11u8, - 240u8, - 37u8, - 112u8, - 38u8, - 239u8, - 245u8, - ], - ) - } - pub fn winning_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 8u8, - 136u8, - 174u8, - 152u8, - 223u8, - 1u8, - 143u8, - 45u8, - 213u8, - 5u8, - 239u8, - 163u8, - 152u8, - 99u8, - 197u8, - 109u8, - 194u8, - 140u8, - 246u8, - 10u8, - 40u8, - 22u8, - 0u8, - 122u8, - 20u8, - 132u8, - 141u8, - 157u8, - 56u8, - 211u8, - 5u8, - 104u8, - ], - ) - } - 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::Address::new_static( - "Auctions", - "Winning", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 8u8, - 136u8, - 174u8, - 152u8, - 223u8, - 1u8, - 143u8, - 45u8, - 213u8, - 5u8, - 239u8, - 163u8, - 152u8, - 99u8, - 197u8, - 109u8, - 194u8, - 140u8, - 246u8, - 10u8, - 40u8, - 22u8, - 0u8, - 122u8, - 20u8, - 132u8, - 141u8, - 157u8, - 56u8, - 211u8, - 5u8, - 104u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn ending_period( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "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, - ], - ) - } - pub fn sample_length( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "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::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "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::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "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; - pub type Error = runtime_types::polkadot_runtime_common::crowdloan::pallet::Error; - pub type Call = runtime_types::polkadot_runtime_common::crowdloan::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Create { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - #[codec(compact)] - pub cap: ::core::primitive::u128, - #[codec(compact)] - pub first_period: ::core::primitive::u32, - #[codec(compact)] - pub last_period: ::core::primitive::u32, - #[codec(compact)] - pub end: ::core::primitive::u32, - pub verifier: ::core::option::Option< - runtime_types::sp_runtime::MultiSigner, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Create { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Create { - index: { - let __codec_res_edqy = <::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Create::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - cap: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Create::cap`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - first_period: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Create::first_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - last_period: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Create::last_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - end: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Create::end`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - verifier: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::sp_runtime::MultiSigner, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Create::verifier`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Create { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.cap), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.first_period), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.last_period), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.end), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.verifier), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.cap), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.first_period), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.last_period), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.end), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.verifier, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Create {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Create { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Create; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Create { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - cap: { - let val = *vals - .get(&Some("cap")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "cap".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("cap"))? - }, - first_period: { - let val = *vals - .get(&Some("first_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "first_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("first_period"))? - }, - last_period: { - let val = *vals - .get(&Some("last_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "last_period".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("last_period"))? - }, - end: { - let val = *vals - .get(&Some("end")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "end".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - verifier: { - let val = *vals - .get(&Some("verifier")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "verifier".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("verifier"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = value; - Ok(Create { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - cap: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("cap"))? - }, - first_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("first_period"))? - }, - last_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("last_period"))? - }, - end: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - verifier: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("verifier"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Create { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Create { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Create { - index, - cap, - first_period, - last_period, - end, - verifier, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("cap"), - cap as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_period"), - first_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_period"), - last_period as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("end"), - end as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("verifier"), - verifier as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Create { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Create { - index, - cap, - first_period, - last_period, - end, - verifier, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("cap"), - cap as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_period"), - first_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_period"), - last_period as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("end"), - end as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("verifier"), - verifier as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Create { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "index", - "cap", - "first_period", - "last_period", - "end", - "verifier", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.index, - &self.cap, - &self.first_period, - &self.last_period, - &self.end, - &&self.verifier, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "Create", - names, - values, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Create { - const PALLET: &'static str = "Crowdloan"; - const CALL: &'static str = "create"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Contribute { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - #[codec(compact)] - pub value: ::core::primitive::u128, - pub signature: ::core::option::Option< - runtime_types::sp_runtime::MultiSignature, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Contribute { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Contribute { - index: { - let __codec_res_edqy = <::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Contribute::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Contribute::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - signature: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::sp_runtime::MultiSignature, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Contribute::signature`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Contribute { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.signature), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.value), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.signature, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Contribute {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Contribute { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Contribute; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Contribute { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - signature: { - let val = *vals - .get(&Some("signature")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "signature".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Contribute { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - signature: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Contribute { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Contribute { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Contribute { index, value, signature } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("signature"), - signature as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Contribute { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Contribute { index, value, signature } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("signature"), - signature as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Contribute { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Contribute", - "index", - &self.index, - "value", - &self.value, - "signature", - &&self.signature, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Contribute { - const PALLET: &'static str = "Crowdloan"; - const CALL: &'static str = "contribute"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Withdraw { - pub who: ::subxt::utils::AccountId32, - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Withdraw { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Withdraw { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Withdraw::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Withdraw::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Withdraw { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Withdraw {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Withdraw { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Withdraw; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Withdraw { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Withdraw { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Withdraw { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Withdraw { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Withdraw { who, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Withdraw { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Withdraw { who, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Withdraw { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Withdraw", - "who", - &self.who, - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Withdraw { - const PALLET: &'static str = "Crowdloan"; - const CALL: &'static str = "withdraw"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Refund { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Refund { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Refund { - index: { - let __codec_res_edqy = <::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Refund::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Refund { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Refund {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Refund { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Refund; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Refund { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Refund { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Refund { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Refund { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Refund { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Refund { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Refund { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Refund { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Refund", - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Refund { - const PALLET: &'static str = "Crowdloan"; - const CALL: &'static str = "refund"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Dissolve { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Dissolve { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Dissolve { - index: { - let __codec_res_edqy = <::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Dissolve::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Dissolve { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Dissolve {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Dissolve { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Dissolve; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Dissolve { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Dissolve { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Dissolve { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Dissolve { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Dissolve { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Dissolve { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Dissolve { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Dissolve { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Dissolve", - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Dissolve { - const PALLET: &'static str = "Crowdloan"; - const CALL: &'static str = "dissolve"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Edit { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - #[codec(compact)] - pub cap: ::core::primitive::u128, - #[codec(compact)] - pub first_period: ::core::primitive::u32, - #[codec(compact)] - pub last_period: ::core::primitive::u32, - #[codec(compact)] - pub end: ::core::primitive::u32, - pub verifier: ::core::option::Option< - runtime_types::sp_runtime::MultiSigner, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Edit { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Edit { - index: { - let __codec_res_edqy = <::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Edit::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - cap: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Edit::cap`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - first_period: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Edit::first_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - last_period: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Edit::last_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - end: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Edit::end`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - verifier: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::sp_runtime::MultiSigner, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Edit::verifier`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Edit { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.cap), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.first_period), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.last_period), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.end), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.verifier), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.cap), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.first_period), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.last_period), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.end), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.verifier, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Edit {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Edit { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Edit; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Edit { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - cap: { - let val = *vals - .get(&Some("cap")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "cap".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("cap"))? - }, - first_period: { - let val = *vals - .get(&Some("first_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "first_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("first_period"))? - }, - last_period: { - let val = *vals - .get(&Some("last_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "last_period".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("last_period"))? - }, - end: { - let val = *vals - .get(&Some("end")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "end".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - verifier: { - let val = *vals - .get(&Some("verifier")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "verifier".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("verifier"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = value; - Ok(Edit { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - cap: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("cap"))? - }, - first_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("first_period"))? - }, - last_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("last_period"))? - }, - end: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - verifier: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("verifier"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Edit { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Edit { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Edit { - index, - cap, - first_period, - last_period, - end, - verifier, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("cap"), - cap as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_period"), - first_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_period"), - last_period as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("end"), - end as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("verifier"), - verifier as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Edit { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Edit { - index, - cap, - first_period, - last_period, - end, - verifier, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("cap"), - cap as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_period"), - first_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_period"), - last_period as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("end"), - end as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("verifier"), - verifier as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Edit { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "index", - "cap", - "first_period", - "last_period", - "end", - "verifier", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.index, - &self.cap, - &self.first_period, - &self.last_period, - &self.end, - &&self.verifier, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "Edit", - names, - values, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Edit { - const PALLET: &'static str = "Crowdloan"; - const CALL: &'static str = "edit"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddMemo { - pub index: runtime_types::polkadot_parachain::primitives::Id, - pub memo: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AddMemo { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AddMemo { - index: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AddMemo::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - memo: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AddMemo::memo`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AddMemo { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.memo), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.memo, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AddMemo {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AddMemo { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AddMemo; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AddMemo { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - memo: { - let val = *vals - .get(&Some("memo")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "memo".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("memo"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(AddMemo { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - memo: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("memo"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for AddMemo { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AddMemo { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddMemo { index, memo } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("memo"), - memo as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AddMemo { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddMemo { index, memo } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("memo"), - memo as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AddMemo { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AddMemo", - "index", - &self.index, - "memo", - &&self.memo, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for AddMemo { - const PALLET: &'static str = "Crowdloan"; - const CALL: &'static str = "add_memo"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Poke { - pub index: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Poke { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Poke { - index: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Poke::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Poke { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.index) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.index, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.index) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.index, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Poke {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Poke { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Poke; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Poke { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Poke { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Poke { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Poke { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Poke { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Poke { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Poke { index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Poke { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Poke", - "index", - &&self.index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Poke { - const PALLET: &'static str = "Crowdloan"; - const CALL: &'static str = "poke"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ContributeAll { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - pub signature: ::core::option::Option< - runtime_types::sp_runtime::MultiSignature, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ContributeAll { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ContributeAll { - index: { - let __codec_res_edqy = <::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ContributeAll::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - signature: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::sp_runtime::MultiSignature, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ContributeAll::signature`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ContributeAll { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.signature), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(&self.index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.signature, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ContributeAll {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ContributeAll { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ContributeAll; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ContributeAll { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - signature: { - let val = *vals - .get(&Some("signature")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "signature".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ContributeAll { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - signature: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ContributeAll { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ContributeAll { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ContributeAll { index, signature } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("signature"), - signature as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ContributeAll { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ContributeAll { index, signature } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("signature"), - signature as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ContributeAll { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ContributeAll", - "index", - &self.index, - "signature", - &&self.signature, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ContributeAll { - const PALLET: &'static str = "Crowdloan"; - const CALL: &'static str = "contribute_all"; - } - } - pub struct TransactionApi; - impl TransactionApi { - 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::Payload { - ::subxt::tx::Payload::new_static( - "Crowdloan", - "create", - types::Create { - index, - cap, - first_period, - last_period, - end, - verifier, - }, - [ - 236u8, - 3u8, - 248u8, - 168u8, - 136u8, - 216u8, - 20u8, - 58u8, - 179u8, - 13u8, - 184u8, - 73u8, - 105u8, - 35u8, - 167u8, - 66u8, - 117u8, - 195u8, - 41u8, - 41u8, - 117u8, - 176u8, - 65u8, - 18u8, - 225u8, - 66u8, - 2u8, - 61u8, - 212u8, - 92u8, - 117u8, - 90u8, - ], - ) - } - 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::Payload { - ::subxt::tx::Payload::new_static( - "Crowdloan", - "contribute", - types::Contribute { - index, - value, - signature, - }, - [ - 186u8, - 247u8, - 240u8, - 7u8, - 12u8, - 239u8, - 39u8, - 191u8, - 150u8, - 219u8, - 137u8, - 122u8, - 214u8, - 61u8, - 62u8, - 180u8, - 229u8, - 181u8, - 105u8, - 190u8, - 228u8, - 55u8, - 242u8, - 70u8, - 91u8, - 118u8, - 143u8, - 233u8, - 186u8, - 231u8, - 207u8, - 106u8, - ], - ) - } - pub fn withdraw( - &self, - who: ::subxt::utils::AccountId32, - index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Crowdloan", - "withdraw", - types::Withdraw { who, index }, - [ - 148u8, - 23u8, - 138u8, - 161u8, - 248u8, - 235u8, - 138u8, - 156u8, - 209u8, - 236u8, - 235u8, - 81u8, - 207u8, - 212u8, - 232u8, - 126u8, - 221u8, - 46u8, - 34u8, - 39u8, - 44u8, - 42u8, - 75u8, - 134u8, - 12u8, - 247u8, - 84u8, - 203u8, - 48u8, - 133u8, - 72u8, - 254u8, - ], - ) - } - pub fn refund( - &self, - index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Crowdloan", - "refund", - types::Refund { index }, - [ - 245u8, - 75u8, - 215u8, - 28u8, - 141u8, - 138u8, - 201u8, - 125u8, - 21u8, - 214u8, - 57u8, - 23u8, - 33u8, - 41u8, - 57u8, - 227u8, - 119u8, - 212u8, - 234u8, - 227u8, - 230u8, - 144u8, - 249u8, - 100u8, - 198u8, - 125u8, - 106u8, - 253u8, - 93u8, - 177u8, - 247u8, - 5u8, - ], - ) - } - pub fn dissolve( - &self, - index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Crowdloan", - "dissolve", - types::Dissolve { index }, - [ - 60u8, - 225u8, - 93u8, - 234u8, - 160u8, - 90u8, - 185u8, - 188u8, - 163u8, - 72u8, - 241u8, - 46u8, - 62u8, - 176u8, - 236u8, - 175u8, - 147u8, - 95u8, - 45u8, - 235u8, - 253u8, - 76u8, - 127u8, - 190u8, - 149u8, - 54u8, - 108u8, - 78u8, - 149u8, - 161u8, - 39u8, - 14u8, - ], - ) - } - 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::Payload { - ::subxt::tx::Payload::new_static( - "Crowdloan", - "edit", - types::Edit { - index, - cap, - first_period, - last_period, - end, - verifier, - }, - [ - 126u8, - 29u8, - 232u8, - 93u8, - 94u8, - 23u8, - 47u8, - 217u8, - 62u8, - 2u8, - 161u8, - 31u8, - 156u8, - 229u8, - 109u8, - 45u8, - 97u8, - 101u8, - 189u8, - 139u8, - 40u8, - 238u8, - 150u8, - 94u8, - 145u8, - 77u8, - 26u8, - 153u8, - 217u8, - 171u8, - 48u8, - 195u8, - ], - ) - } - pub fn add_memo( - &self, - index: runtime_types::polkadot_parachain::primitives::Id, - memo: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Crowdloan", - "add_memo", - types::AddMemo { index, memo }, - [ - 190u8, - 99u8, - 225u8, - 54u8, - 136u8, - 238u8, - 210u8, - 44u8, - 103u8, - 198u8, - 225u8, - 254u8, - 245u8, - 12u8, - 238u8, - 112u8, - 143u8, - 169u8, - 8u8, - 193u8, - 29u8, - 0u8, - 159u8, - 25u8, - 112u8, - 237u8, - 194u8, - 17u8, - 111u8, - 192u8, - 219u8, - 50u8, - ], - ) - } - pub fn poke( - &self, - index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Crowdloan", - "poke", - types::Poke { index }, - [ - 180u8, - 81u8, - 211u8, - 12u8, - 54u8, - 204u8, - 105u8, - 118u8, - 139u8, - 209u8, - 182u8, - 227u8, - 174u8, - 192u8, - 64u8, - 200u8, - 212u8, - 101u8, - 3u8, - 252u8, - 195u8, - 110u8, - 182u8, - 121u8, - 218u8, - 193u8, - 87u8, - 38u8, - 212u8, - 151u8, - 213u8, - 56u8, - ], - ) - } - pub fn contribute_all( - &self, - index: runtime_types::polkadot_parachain::primitives::Id, - signature: ::core::option::Option< - runtime_types::sp_runtime::MultiSignature, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Crowdloan", - "contribute_all", - types::ContributeAll { - index, - signature, - }, - [ - 233u8, - 62u8, - 129u8, - 168u8, - 161u8, - 163u8, - 78u8, - 92u8, - 191u8, - 239u8, - 61u8, - 2u8, - 198u8, - 246u8, - 246u8, - 81u8, - 32u8, - 131u8, - 118u8, - 170u8, - 72u8, - 87u8, - 17u8, - 26u8, - 55u8, - 10u8, - 146u8, - 184u8, - 213u8, - 200u8, - 252u8, - 50u8, - ], - ) - } - } - } - pub type Event = runtime_types::polkadot_runtime_common::crowdloan::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Created { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Created { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Created { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Created::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Created { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.para_id) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.para_id, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.para_id) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.para_id, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Created {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Created { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Created; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Created { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Created { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Created { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Created { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Created { para_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Created { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Created { para_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Created { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Created", - "para_id", - &&self.para_id, - ) - } - } - impl ::subxt::events::StaticEvent for Created { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "Created"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Contributed { - pub who: ::subxt::utils::AccountId32, - pub fund_index: runtime_types::polkadot_parachain::primitives::Id, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Contributed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Contributed { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Contributed::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fund_index: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Contributed::fund_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Contributed::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Contributed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.fund_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.fund_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Contributed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Contributed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Contributed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Contributed { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - fund_index: { - let val = *vals - .get(&Some("fund_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fund_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fund_index"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Contributed { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - fund_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fund_index"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Contributed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Contributed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Contributed { who, fund_index, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fund_index"), - fund_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Contributed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Contributed { who, fund_index, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fund_index"), - fund_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Contributed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Contributed", - "who", - &self.who, - "fund_index", - &self.fund_index, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Contributed { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "Contributed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Withdrew { - pub who: ::subxt::utils::AccountId32, - pub fund_index: runtime_types::polkadot_parachain::primitives::Id, - pub amount: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Withdrew { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Withdrew { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Withdrew::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fund_index: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Withdrew::fund_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Withdrew::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Withdrew { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.fund_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.fund_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Withdrew {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Withdrew { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Withdrew; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Withdrew { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - fund_index: { - let val = *vals - .get(&Some("fund_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fund_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fund_index"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Withdrew { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - fund_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fund_index"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Withdrew { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Withdrew { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Withdrew { who, fund_index, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fund_index"), - fund_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Withdrew { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Withdrew { who, fund_index, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fund_index"), - fund_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Withdrew { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Withdrew", - "who", - &self.who, - "fund_index", - &self.fund_index, - "amount", - &&self.amount, - ) - } - } - impl ::subxt::events::StaticEvent for Withdrew { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "Withdrew"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PartiallyRefunded { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PartiallyRefunded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(PartiallyRefunded { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PartiallyRefunded::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PartiallyRefunded { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.para_id) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.para_id, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.para_id) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.para_id, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PartiallyRefunded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PartiallyRefunded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PartiallyRefunded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PartiallyRefunded { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(PartiallyRefunded { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PartiallyRefunded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PartiallyRefunded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PartiallyRefunded { para_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PartiallyRefunded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PartiallyRefunded { para_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PartiallyRefunded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "PartiallyRefunded", - "para_id", - &&self.para_id, - ) - } - } - impl ::subxt::events::StaticEvent for PartiallyRefunded { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "PartiallyRefunded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AllRefunded { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AllRefunded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(AllRefunded { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AllRefunded::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AllRefunded { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.para_id) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.para_id, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.para_id) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.para_id, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AllRefunded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AllRefunded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AllRefunded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AllRefunded { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(AllRefunded { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for AllRefunded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AllRefunded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AllRefunded { para_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AllRefunded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AllRefunded { para_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AllRefunded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "AllRefunded", - "para_id", - &&self.para_id, - ) - } - } - impl ::subxt::events::StaticEvent for AllRefunded { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "AllRefunded"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Dissolved { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Dissolved { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Dissolved { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Dissolved::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Dissolved { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.para_id) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.para_id, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.para_id) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.para_id, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Dissolved {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Dissolved { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Dissolved; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Dissolved { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Dissolved { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Dissolved { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Dissolved { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Dissolved { para_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Dissolved { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Dissolved { para_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Dissolved { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Dissolved", - "para_id", - &&self.para_id, - ) - } - } - impl ::subxt::events::StaticEvent for Dissolved { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "Dissolved"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HandleBidResult { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for HandleBidResult { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(HandleBidResult { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HandleBidResult::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HandleBidResult::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for HandleBidResult { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.result), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.result, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for HandleBidResult {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for HandleBidResult { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = HandleBidResult; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(HandleBidResult { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(HandleBidResult { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for HandleBidResult { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for HandleBidResult { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HandleBidResult { para_id, result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for HandleBidResult { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HandleBidResult { para_id, result } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for HandleBidResult { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "HandleBidResult", - "para_id", - &self.para_id, - "result", - &&self.result, - ) - } - } - impl ::subxt::events::StaticEvent for HandleBidResult { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "HandleBidResult"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Edited { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Edited { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Edited { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Edited::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Edited { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.para_id) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.para_id, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.para_id) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.para_id, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Edited {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Edited { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Edited; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Edited { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Edited { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Edited { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Edited { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Edited { para_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Edited { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Edited { para_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Edited { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Edited", - "para_id", - &&self.para_id, - ) - } - } - impl ::subxt::events::StaticEvent for Edited { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "Edited"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MemoUpdated { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MemoUpdated { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MemoUpdated::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MemoUpdated::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - memo: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MemoUpdated::memo`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MemoUpdated { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.memo), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.memo, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MemoUpdated {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MemoUpdated { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MemoUpdated; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MemoUpdated { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - memo: { - let val = *vals - .get(&Some("memo")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "memo".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("memo"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(MemoUpdated { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - memo: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("memo"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for MemoUpdated { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MemoUpdated { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MemoUpdated { who, para_id, memo } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("memo"), - memo as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MemoUpdated { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MemoUpdated { who, para_id, memo } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("memo"), - memo as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MemoUpdated { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "MemoUpdated", - "who", - &self.who, - "para_id", - &self.para_id, - "memo", - &&self.memo, - ) - } - } - impl ::subxt::events::StaticEvent for MemoUpdated { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "MemoUpdated"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddedToNewRaise { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AddedToNewRaise { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(AddedToNewRaise { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AddedToNewRaise::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AddedToNewRaise { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.para_id) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.para_id, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.para_id) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.para_id, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AddedToNewRaise {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AddedToNewRaise { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AddedToNewRaise; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AddedToNewRaise { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(AddedToNewRaise { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for AddedToNewRaise { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AddedToNewRaise { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddedToNewRaise { para_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AddedToNewRaise { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AddedToNewRaise { para_id } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AddedToNewRaise { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "AddedToNewRaise", - "para_id", - &&self.para_id, - ) - } - } - impl ::subxt::events::StaticEvent for AddedToNewRaise { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "AddedToNewRaise"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn funds_iter( - &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", - ::alloc::vec::Vec::new(), - [ - 191u8, - 255u8, - 37u8, - 49u8, - 246u8, - 246u8, - 168u8, - 178u8, - 73u8, - 238u8, - 49u8, - 76u8, - 66u8, - 246u8, - 207u8, - 12u8, - 76u8, - 233u8, - 31u8, - 218u8, - 132u8, - 236u8, - 237u8, - 210u8, - 116u8, - 159u8, - 191u8, - 89u8, - 212u8, - 167u8, - 61u8, - 41u8, - ], - ) - } - 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::Address::new_static( - "Crowdloan", - "Funds", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 191u8, - 255u8, - 37u8, - 49u8, - 246u8, - 246u8, - 168u8, - 178u8, - 73u8, - 238u8, - 49u8, - 76u8, - 66u8, - 246u8, - 207u8, - 12u8, - 76u8, - 233u8, - 31u8, - 218u8, - 132u8, - 236u8, - 237u8, - 210u8, - 116u8, - 159u8, - 191u8, - 89u8, - 212u8, - 167u8, - 61u8, - 41u8, - ], - ) - } - pub fn new_raise( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Crowdloan", - "NewRaise", - ::alloc::vec::Vec::new(), - [ - 251u8, - 31u8, - 237u8, - 22u8, - 90u8, - 248u8, - 39u8, - 66u8, - 93u8, - 81u8, - 209u8, - 209u8, - 194u8, - 42u8, - 109u8, - 208u8, - 56u8, - 75u8, - 45u8, - 247u8, - 253u8, - 165u8, - 22u8, - 184u8, - 49u8, - 49u8, - 62u8, - 126u8, - 254u8, - 146u8, - 190u8, - 174u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 106u8, - 22u8, - 229u8, - 157u8, - 118u8, - 195u8, - 11u8, - 42u8, - 5u8, - 50u8, - 44u8, - 183u8, - 72u8, - 167u8, - 95u8, - 243u8, - 234u8, - 5u8, - 200u8, - 253u8, - 127u8, - 154u8, - 23u8, - 55u8, - 202u8, - 221u8, - 82u8, - 19u8, - 201u8, - 154u8, - 248u8, - 29u8, - ], - ) - } - 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", - ::alloc::vec::Vec::new(), - [ - 192u8, - 21u8, - 229u8, - 234u8, - 152u8, - 224u8, - 149u8, - 44u8, - 41u8, - 9u8, - 191u8, - 128u8, - 118u8, - 11u8, - 117u8, - 245u8, - 170u8, - 116u8, - 77u8, - 216u8, - 175u8, - 115u8, - 13u8, - 85u8, - 240u8, - 170u8, - 156u8, - 201u8, - 25u8, - 96u8, - 103u8, - 207u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn pallet_id( - &self, - ) -> ::subxt::constants::Address< - runtime_types::frame_support::PalletId, - > { - ::subxt::constants::Address::new_static( - "Crowdloan", - "PalletId", - [ - 56u8, - 243u8, - 53u8, - 83u8, - 154u8, - 179u8, - 170u8, - 80u8, - 133u8, - 173u8, - 61u8, - 161u8, - 47u8, - 225u8, - 146u8, - 21u8, - 50u8, - 229u8, - 248u8, - 27u8, - 104u8, - 58u8, - 129u8, - 197u8, - 102u8, - 160u8, - 168u8, - 205u8, - 154u8, - 42u8, - 217u8, - 53u8, - ], - ) - } - pub fn min_contribution( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::Address::new_static( - "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, - ], - ) - } - pub fn remove_keys_limit( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "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; - pub type Error = runtime_types::pallet_xcm::pallet::Error; - pub type Call = runtime_types::pallet_xcm::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Send { - pub dest: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - pub message: ::std::boxed::Box, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Send { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Send { - dest: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Send::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - message: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedXcm, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Send::message`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Send { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.message), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.message, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Send {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Send { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Send; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Send { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - message: { - let val = *vals - .get(&Some("message")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "message".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("message"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Send { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - message: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("message"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Send { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Send { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Send { dest, message } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("message"), - message as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Send { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Send { dest, message } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("message"), - message as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Send { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Send", - "dest", - &self.dest, - "message", - &&self.message, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Send { - const PALLET: &'static str = "XcmPallet"; - const CALL: &'static str = "send"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TeleportAssets { - pub dest: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - pub beneficiary: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - pub assets: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiAssets, - >, - pub fee_asset_item: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for TeleportAssets { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(TeleportAssets { - dest: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TeleportAssets::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TeleportAssets::beneficiary`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - assets: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiAssets, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TeleportAssets::assets`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fee_asset_item: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TeleportAssets::fee_asset_item`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for TeleportAssets { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.beneficiary), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.fee_asset_item), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.beneficiary, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.fee_asset_item, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for TeleportAssets {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for TeleportAssets { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = TeleportAssets; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(TeleportAssets { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - fee_asset_item: { - let val = *vals - .get(&Some("fee_asset_item")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fee_asset_item".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("fee_asset_item"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(TeleportAssets { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - fee_asset_item: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("fee_asset_item"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for TeleportAssets { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for TeleportAssets { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TeleportAssets { - dest, - beneficiary, - assets, - fee_asset_item, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee_asset_item"), - fee_asset_item - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for TeleportAssets { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TeleportAssets { - dest, - beneficiary, - assets, - fee_asset_item, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee_asset_item"), - fee_asset_item - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for TeleportAssets { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "TeleportAssets", - "dest", - &self.dest, - "beneficiary", - &self.beneficiary, - "assets", - &self.assets, - "fee_asset_item", - &&self.fee_asset_item, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for TeleportAssets { - const PALLET: &'static str = "XcmPallet"; - const CALL: &'static str = "teleport_assets"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReserveTransferAssets { - pub dest: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - pub beneficiary: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - pub assets: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiAssets, - >, - pub fee_asset_item: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ReserveTransferAssets { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ReserveTransferAssets { - dest: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReserveTransferAssets::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ReserveTransferAssets::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - assets: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiAssets, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReserveTransferAssets::assets`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fee_asset_item: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ReserveTransferAssets::fee_asset_item`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ReserveTransferAssets { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.beneficiary), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.fee_asset_item), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.beneficiary, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.fee_asset_item, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ReserveTransferAssets {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ReserveTransferAssets { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReserveTransferAssets; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ReserveTransferAssets { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - fee_asset_item: { - let val = *vals - .get(&Some("fee_asset_item")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fee_asset_item".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("fee_asset_item"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(ReserveTransferAssets { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - fee_asset_item: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("fee_asset_item"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ReserveTransferAssets { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ReserveTransferAssets { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReserveTransferAssets { - dest, - beneficiary, - assets, - fee_asset_item, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee_asset_item"), - fee_asset_item - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ReserveTransferAssets { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReserveTransferAssets { - dest, - beneficiary, - assets, - fee_asset_item, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee_asset_item"), - fee_asset_item - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ReserveTransferAssets { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "ReserveTransferAssets", - "dest", - &self.dest, - "beneficiary", - &self.beneficiary, - "assets", - &self.assets, - "fee_asset_item", - &&self.fee_asset_item, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ReserveTransferAssets { - const PALLET: &'static str = "XcmPallet"; - const CALL: &'static str = "reserve_transfer_assets"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Execute { - pub message: ::std::boxed::Box< - runtime_types::xcm::VersionedXcm2, - >, - pub max_weight: runtime_types::sp_weights::weight_v2::Weight, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Execute { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Execute { - message: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedXcm2, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Execute::message`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_weight: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Execute::max_weight`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Execute { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.message), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_weight), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.message, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_weight, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Execute {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Execute { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Execute; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Execute { - message: { - let val = *vals - .get(&Some("message")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "message".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("message"))? - }, - max_weight: { - let val = *vals - .get(&Some("max_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_weight".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Execute { - message: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("message"))? - }, - max_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Execute { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Execute { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Execute { message, max_weight } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("message"), - message as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_weight"), - max_weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Execute { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Execute { message, max_weight } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("message"), - message as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_weight"), - max_weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Execute { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Execute", - "message", - &self.message, - "max_weight", - &&self.max_weight, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for Execute { - const PALLET: &'static str = "XcmPallet"; - const CALL: &'static str = "execute"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceXcmVersion { - pub location: ::std::boxed::Box< - runtime_types::xcm::v3::multilocation::MultiLocation, - >, - pub xcm_version: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceXcmVersion { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceXcmVersion { - location: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::v3::multilocation::MultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceXcmVersion::location`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm_version: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceXcmVersion::xcm_version`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceXcmVersion { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.location), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.xcm_version), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.location, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.xcm_version, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceXcmVersion {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ForceXcmVersion { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceXcmVersion; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceXcmVersion { - location: { - let val = *vals - .get(&Some("location")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "location".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("location"))? - }, - xcm_version: { - let val = *vals - .get(&Some("xcm_version")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm_version".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm_version"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ForceXcmVersion { - location: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("location"))? - }, - xcm_version: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm_version"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceXcmVersion { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceXcmVersion { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceXcmVersion { location, xcm_version } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("location"), - location as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm_version"), - xcm_version as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ForceXcmVersion { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceXcmVersion { location, xcm_version } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("location"), - location as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm_version"), - xcm_version as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceXcmVersion { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ForceXcmVersion", - "location", - &self.location, - "xcm_version", - &&self.xcm_version, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceXcmVersion { - const PALLET: &'static str = "XcmPallet"; - const CALL: &'static str = "force_xcm_version"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceDefaultXcmVersion { - pub maybe_xcm_version: ::core::option::Option< - ::core::primitive::u32, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceDefaultXcmVersion { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceDefaultXcmVersion { - maybe_xcm_version: { - let __codec_res_edqy = <::core::option::Option< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ForceDefaultXcmVersion::maybe_xcm_version`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceDefaultXcmVersion { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &&self.maybe_xcm_version, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.maybe_xcm_version, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &&self.maybe_xcm_version, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.maybe_xcm_version, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceDefaultXcmVersion {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ForceDefaultXcmVersion { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceDefaultXcmVersion; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceDefaultXcmVersion { - maybe_xcm_version: { - let val = *vals - .get(&Some("maybe_xcm_version")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_xcm_version".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_xcm_version"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ForceDefaultXcmVersion { - maybe_xcm_version: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_xcm_version"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceDefaultXcmVersion { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ForceDefaultXcmVersion { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceDefaultXcmVersion { maybe_xcm_version } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("maybe_xcm_version"), - maybe_xcm_version - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ForceDefaultXcmVersion { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceDefaultXcmVersion { maybe_xcm_version } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("maybe_xcm_version"), - maybe_xcm_version - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceDefaultXcmVersion { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ForceDefaultXcmVersion", - "maybe_xcm_version", - &&self.maybe_xcm_version, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceDefaultXcmVersion { - const PALLET: &'static str = "XcmPallet"; - const CALL: &'static str = "force_default_xcm_version"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceSubscribeVersionNotify { - pub location: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode - for ForceSubscribeVersionNotify { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceSubscribeVersionNotify { - location: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ForceSubscribeVersionNotify::location`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode - for ForceSubscribeVersionNotify { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.location) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.location, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.location) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.location, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for ForceSubscribeVersionNotify {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ForceSubscribeVersionNotify { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceSubscribeVersionNotify; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceSubscribeVersionNotify { - location: { - let val = *vals - .get(&Some("location")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "location".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("location"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ForceSubscribeVersionNotify { - location: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("location"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceSubscribeVersionNotify { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ForceSubscribeVersionNotify { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceSubscribeVersionNotify { location } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("location"), - location as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ForceSubscribeVersionNotify { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceSubscribeVersionNotify { location } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("location"), - location as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceSubscribeVersionNotify { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ForceSubscribeVersionNotify", - "location", - &&self.location, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for ForceSubscribeVersionNotify { - const PALLET: &'static str = "XcmPallet"; - const CALL: &'static str = "force_subscribe_version_notify"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceUnsubscribeVersionNotify { - pub location: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode - for ForceUnsubscribeVersionNotify { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceUnsubscribeVersionNotify { - location: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ForceUnsubscribeVersionNotify::location`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode - for ForceUnsubscribeVersionNotify { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.location) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.location, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.location) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.location, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for ForceUnsubscribeVersionNotify {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ForceUnsubscribeVersionNotify { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceUnsubscribeVersionNotify; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceUnsubscribeVersionNotify { - location: { - let val = *vals - .get(&Some("location")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "location".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("location"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ForceUnsubscribeVersionNotify { - location: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("location"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceUnsubscribeVersionNotify { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ForceUnsubscribeVersionNotify { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceUnsubscribeVersionNotify { location } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("location"), - location as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ForceUnsubscribeVersionNotify { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceUnsubscribeVersionNotify { location } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("location"), - location as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceUnsubscribeVersionNotify { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ForceUnsubscribeVersionNotify", - "location", - &&self.location, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for ForceUnsubscribeVersionNotify { - const PALLET: &'static str = "XcmPallet"; - const CALL: &'static str = "force_unsubscribe_version_notify"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct LimitedReserveTransferAssets { - pub dest: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - pub beneficiary: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - pub assets: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiAssets, - >, - pub fee_asset_item: ::core::primitive::u32, - pub weight_limit: runtime_types::xcm::v3::WeightLimit, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode - for LimitedReserveTransferAssets { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(LimitedReserveTransferAssets { - dest: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `LimitedReserveTransferAssets::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `LimitedReserveTransferAssets::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - assets: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiAssets, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `LimitedReserveTransferAssets::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fee_asset_item: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `LimitedReserveTransferAssets::fee_asset_item`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - weight_limit: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `LimitedReserveTransferAssets::weight_limit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode - for LimitedReserveTransferAssets { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.beneficiary), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.fee_asset_item), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.weight_limit), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.beneficiary, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.fee_asset_item, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.weight_limit, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for LimitedReserveTransferAssets {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for LimitedReserveTransferAssets { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = LimitedReserveTransferAssets; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(LimitedReserveTransferAssets { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - fee_asset_item: { - let val = *vals - .get(&Some("fee_asset_item")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fee_asset_item".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("fee_asset_item"))? - }, - weight_limit: { - let val = *vals - .get(&Some("weight_limit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "weight_limit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(LimitedReserveTransferAssets { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - fee_asset_item: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("fee_asset_item"))? - }, - weight_limit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for LimitedReserveTransferAssets { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for LimitedReserveTransferAssets { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let LimitedReserveTransferAssets { - dest, - beneficiary, - assets, - fee_asset_item, - weight_limit, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee_asset_item"), - fee_asset_item - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight_limit"), - weight_limit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for LimitedReserveTransferAssets { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let LimitedReserveTransferAssets { - dest, - beneficiary, - assets, - fee_asset_item, - weight_limit, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee_asset_item"), - fee_asset_item - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight_limit"), - weight_limit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for LimitedReserveTransferAssets { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "LimitedReserveTransferAssets", - "dest", - &self.dest, - "beneficiary", - &self.beneficiary, - "assets", - &self.assets, - "fee_asset_item", - &self.fee_asset_item, - "weight_limit", - &&self.weight_limit, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic - for LimitedReserveTransferAssets { - const PALLET: &'static str = "XcmPallet"; - const CALL: &'static str = "limited_reserve_transfer_assets"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct LimitedTeleportAssets { - pub dest: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - pub beneficiary: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - pub assets: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiAssets, - >, - pub fee_asset_item: ::core::primitive::u32, - pub weight_limit: runtime_types::xcm::v3::WeightLimit, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for LimitedTeleportAssets { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(LimitedTeleportAssets { - dest: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `LimitedTeleportAssets::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `LimitedTeleportAssets::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - assets: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiAssets, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `LimitedTeleportAssets::assets`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fee_asset_item: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `LimitedTeleportAssets::fee_asset_item`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - weight_limit: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `LimitedTeleportAssets::weight_limit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for LimitedTeleportAssets { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.beneficiary), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.fee_asset_item), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.weight_limit), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.beneficiary, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.fee_asset_item, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.weight_limit, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for LimitedTeleportAssets {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for LimitedTeleportAssets { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = LimitedTeleportAssets; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(LimitedTeleportAssets { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - fee_asset_item: { - let val = *vals - .get(&Some("fee_asset_item")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fee_asset_item".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("fee_asset_item"))? - }, - weight_limit: { - let val = *vals - .get(&Some("weight_limit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "weight_limit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(LimitedTeleportAssets { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - fee_asset_item: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("fee_asset_item"))? - }, - weight_limit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for LimitedTeleportAssets { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for LimitedTeleportAssets { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let LimitedTeleportAssets { - dest, - beneficiary, - assets, - fee_asset_item, - weight_limit, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee_asset_item"), - fee_asset_item - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight_limit"), - weight_limit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for LimitedTeleportAssets { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let LimitedTeleportAssets { - dest, - beneficiary, - assets, - fee_asset_item, - weight_limit, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee_asset_item"), - fee_asset_item - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight_limit"), - weight_limit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for LimitedTeleportAssets { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "LimitedTeleportAssets", - "dest", - &self.dest, - "beneficiary", - &self.beneficiary, - "assets", - &self.assets, - "fee_asset_item", - &self.fee_asset_item, - "weight_limit", - &&self.weight_limit, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for LimitedTeleportAssets { - const PALLET: &'static str = "XcmPallet"; - const CALL: &'static str = "limited_teleport_assets"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceSuspension { - pub suspended: ::core::primitive::bool, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ForceSuspension { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ForceSuspension { - suspended: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ForceSuspension::suspended`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ForceSuspension { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.suspended) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.suspended, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.suspended) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.suspended, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ForceSuspension {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ForceSuspension { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ForceSuspension; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ForceSuspension { - suspended: { - let val = *vals - .get(&Some("suspended")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "suspended".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("suspended"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(ForceSuspension { - suspended: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("suspended"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ForceSuspension { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ForceSuspension { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceSuspension { suspended } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("suspended"), - suspended as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ForceSuspension { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ForceSuspension { suspended } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("suspended"), - suspended as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ForceSuspension { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ForceSuspension", - "suspended", - &&self.suspended, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ForceSuspension { - const PALLET: &'static str = "XcmPallet"; - const CALL: &'static str = "force_suspension"; - } - } - 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", - types::Send { - dest: ::std::boxed::Box::new(dest), - message: ::std::boxed::Box::new(message), - }, - [ - 147u8, - 255u8, - 86u8, - 82u8, - 17u8, - 159u8, - 225u8, - 145u8, - 220u8, - 89u8, - 71u8, - 23u8, - 193u8, - 249u8, - 12u8, - 70u8, - 19u8, - 140u8, - 232u8, - 97u8, - 12u8, - 220u8, - 113u8, - 65u8, - 4u8, - 255u8, - 138u8, - 10u8, - 231u8, - 122u8, - 67u8, - 105u8, - ], - ) - } - 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", - types::TeleportAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - }, - [ - 56u8, - 144u8, - 237u8, - 60u8, - 157u8, - 5u8, - 7u8, - 129u8, - 41u8, - 149u8, - 160u8, - 100u8, - 233u8, - 102u8, - 181u8, - 140u8, - 115u8, - 213u8, - 29u8, - 132u8, - 16u8, - 30u8, - 23u8, - 82u8, - 140u8, - 134u8, - 37u8, - 87u8, - 3u8, - 99u8, - 172u8, - 42u8, - ], - ) - } - 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", - types::ReserveTransferAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - }, - [ - 21u8, - 167u8, - 44u8, - 22u8, - 210u8, - 73u8, - 148u8, - 7u8, - 91u8, - 108u8, - 148u8, - 205u8, - 170u8, - 243u8, - 142u8, - 224u8, - 205u8, - 119u8, - 252u8, - 22u8, - 203u8, - 32u8, - 73u8, - 200u8, - 178u8, - 14u8, - 167u8, - 147u8, - 166u8, - 55u8, - 14u8, - 231u8, - ], - ) - } - pub fn execute( - &self, - message: runtime_types::xcm::VersionedXcm2, - max_weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "XcmPallet", - "execute", - types::Execute { - message: ::std::boxed::Box::new(message), - max_weight, - }, - [ - 15u8, - 97u8, - 86u8, - 111u8, - 105u8, - 116u8, - 109u8, - 206u8, - 70u8, - 8u8, - 57u8, - 232u8, - 133u8, - 132u8, - 30u8, - 219u8, - 34u8, - 69u8, - 0u8, - 213u8, - 98u8, - 241u8, - 186u8, - 93u8, - 216u8, - 39u8, - 73u8, - 24u8, - 193u8, - 87u8, - 92u8, - 31u8, - ], - ) - } - pub fn force_xcm_version( - &self, - location: runtime_types::xcm::v3::multilocation::MultiLocation, - xcm_version: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "XcmPallet", - "force_xcm_version", - types::ForceXcmVersion { - location: ::std::boxed::Box::new(location), - xcm_version, - }, - [ - 84u8, - 212u8, - 64u8, - 161u8, - 17u8, - 129u8, - 213u8, - 129u8, - 79u8, - 86u8, - 117u8, - 246u8, - 93u8, - 1u8, - 161u8, - 23u8, - 35u8, - 171u8, - 163u8, - 200u8, - 69u8, - 157u8, - 71u8, - 8u8, - 225u8, - 149u8, - 254u8, - 124u8, - 38u8, - 250u8, - 164u8, - 218u8, - ], - ) - } - 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", - types::ForceDefaultXcmVersion { - maybe_xcm_version, - }, - [ - 43u8, - 114u8, - 102u8, - 104u8, - 209u8, - 234u8, - 108u8, - 173u8, - 109u8, - 188u8, - 94u8, - 214u8, - 136u8, - 43u8, - 153u8, - 75u8, - 161u8, - 192u8, - 76u8, - 12u8, - 221u8, - 237u8, - 158u8, - 247u8, - 41u8, - 193u8, - 35u8, - 174u8, - 183u8, - 207u8, - 79u8, - 213u8, - ], - ) - } - 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", - types::ForceSubscribeVersionNotify { - location: ::std::boxed::Box::new(location), - }, - [ - 112u8, - 254u8, - 138u8, - 12u8, - 203u8, - 176u8, - 251u8, - 167u8, - 223u8, - 0u8, - 71u8, - 148u8, - 19u8, - 179u8, - 47u8, - 96u8, - 188u8, - 189u8, - 14u8, - 172u8, - 1u8, - 1u8, - 192u8, - 107u8, - 137u8, - 158u8, - 22u8, - 9u8, - 138u8, - 241u8, - 32u8, - 47u8, - ], - ) - } - 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", - types::ForceUnsubscribeVersionNotify { - location: ::std::boxed::Box::new(location), - }, - [ - 205u8, - 143u8, - 230u8, - 143u8, - 166u8, - 184u8, - 53u8, - 252u8, - 118u8, - 184u8, - 209u8, - 227u8, - 225u8, - 184u8, - 254u8, - 244u8, - 101u8, - 56u8, - 27u8, - 128u8, - 40u8, - 159u8, - 178u8, - 62u8, - 63u8, - 164u8, - 59u8, - 236u8, - 1u8, - 168u8, - 202u8, - 42u8, - ], - ) - } - 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::v3::WeightLimit, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "XcmPallet", - "limited_reserve_transfer_assets", - types::LimitedReserveTransferAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - weight_limit, - }, - [ - 10u8, - 139u8, - 165u8, - 239u8, - 92u8, - 178u8, - 169u8, - 62u8, - 166u8, - 236u8, - 50u8, - 12u8, - 196u8, - 3u8, - 233u8, - 209u8, - 3u8, - 159u8, - 184u8, - 234u8, - 171u8, - 46u8, - 145u8, - 134u8, - 241u8, - 155u8, - 221u8, - 173u8, - 166u8, - 94u8, - 147u8, - 88u8, - ], - ) - } - 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::v3::WeightLimit, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "XcmPallet", - "limited_teleport_assets", - types::LimitedTeleportAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - weight_limit, - }, - [ - 156u8, - 205u8, - 105u8, - 18u8, - 120u8, - 130u8, - 144u8, - 67u8, - 152u8, - 188u8, - 109u8, - 121u8, - 4u8, - 240u8, - 123u8, - 112u8, - 72u8, - 153u8, - 2u8, - 111u8, - 183u8, - 170u8, - 199u8, - 82u8, - 33u8, - 117u8, - 43u8, - 133u8, - 208u8, - 44u8, - 118u8, - 107u8, - ], - ) - } - pub fn force_suspension( - &self, - suspended: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "XcmPallet", - "force_suspension", - types::ForceSuspension { - suspended, - }, - [ - 78u8, - 125u8, - 93u8, - 55u8, - 129u8, - 44u8, - 36u8, - 227u8, - 75u8, - 46u8, - 68u8, - 202u8, - 81u8, - 127u8, - 111u8, - 92u8, - 149u8, - 38u8, - 225u8, - 185u8, - 183u8, - 154u8, - 89u8, - 159u8, - 79u8, - 10u8, - 229u8, - 1u8, - 226u8, - 243u8, - 65u8, - 238u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_xcm::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Attempted(pub runtime_types::xcm::v3::traits::Outcome); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Attempted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - Attempted({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Attempted.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Attempted { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Attempted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Attempted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Attempted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Attempted({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Attempted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Attempted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Attempted(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Attempted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Attempted(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Attempted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Attempted", - &&self.0, - ) - } - } - impl ::subxt::events::StaticEvent for Attempted { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "Attempted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Sent( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub runtime_types::xcm::v3::Xcm, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Sent { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - Sent( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Sent.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Sent.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Sent.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Sent { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.2), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.2, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Sent {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Sent { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Sent; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok( - Sent( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Sent { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Sent { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Sent(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Sent { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Sent(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Sent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "Sent", - &self.0, - &self.1, - &&self.2, - ) - } - } - impl ::subxt::events::StaticEvent for Sent { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "Sent"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnexpectedResponse( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::primitive::u64, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for UnexpectedResponse { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - UnexpectedResponse( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnexpectedResponse.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnexpectedResponse.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for UnexpectedResponse { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for UnexpectedResponse {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for UnexpectedResponse { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UnexpectedResponse; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - UnexpectedResponse( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for UnexpectedResponse { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for UnexpectedResponse { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnexpectedResponse(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for UnexpectedResponse { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnexpectedResponse(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for UnexpectedResponse { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "UnexpectedResponse", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for UnexpectedResponse { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "UnexpectedResponse"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ResponseReady( - pub ::core::primitive::u64, - pub runtime_types::xcm::v3::Response, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ResponseReady { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - ResponseReady( - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ResponseReady.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ResponseReady.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ResponseReady { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ResponseReady {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ResponseReady { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ResponseReady; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - ResponseReady( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ResponseReady { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ResponseReady { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ResponseReady(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ResponseReady { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ResponseReady(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ResponseReady { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "ResponseReady", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for ResponseReady { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "ResponseReady"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Notified( - pub ::core::primitive::u64, - pub ::core::primitive::u8, - pub ::core::primitive::u8, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Notified { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - Notified( - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Notified.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Notified.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Notified.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Notified { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.2), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.2, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Notified {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Notified { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Notified; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok( - Notified( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Notified { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Notified { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Notified(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Notified { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Notified(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Notified { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "Notified", - &self.0, - &self.1, - &&self.2, - ) - } - } - impl ::subxt::events::StaticEvent for Notified { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "Notified"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - 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, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NotifyOverweight { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - NotifyOverweight( - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotifyOverweight.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotifyOverweight.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotifyOverweight.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotifyOverweight.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotifyOverweight.4`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NotifyOverweight { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.2), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.3), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.4), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.2, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.3, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.4, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NotifyOverweight {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for NotifyOverweight { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NotifyOverweight; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok( - NotifyOverweight( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(4usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for NotifyOverweight { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NotifyOverweight { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NotifyOverweight(_0, _1, _2, _3, _4) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _4 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for NotifyOverweight { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NotifyOverweight(_0, _1, _2, _3, _4) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _4 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NotifyOverweight { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field5_finish( - f, - "NotifyOverweight", - &self.0, - &self.1, - &self.2, - &self.3, - &&self.4, - ) - } - } - impl ::subxt::events::StaticEvent for NotifyOverweight { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "NotifyOverweight"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NotifyDispatchError( - pub ::core::primitive::u64, - pub ::core::primitive::u8, - pub ::core::primitive::u8, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NotifyDispatchError { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - NotifyDispatchError( - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotifyDispatchError.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotifyDispatchError.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotifyDispatchError.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NotifyDispatchError { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.2), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.2, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NotifyDispatchError {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for NotifyDispatchError { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NotifyDispatchError; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok( - NotifyDispatchError( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for NotifyDispatchError { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NotifyDispatchError { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NotifyDispatchError(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for NotifyDispatchError { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NotifyDispatchError(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NotifyDispatchError { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "NotifyDispatchError", - &self.0, - &self.1, - &&self.2, - ) - } - } - impl ::subxt::events::StaticEvent for NotifyDispatchError { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "NotifyDispatchError"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NotifyDecodeFailed( - pub ::core::primitive::u64, - pub ::core::primitive::u8, - pub ::core::primitive::u8, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NotifyDecodeFailed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - NotifyDecodeFailed( - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotifyDecodeFailed.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotifyDecodeFailed.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotifyDecodeFailed.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NotifyDecodeFailed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.2), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.2, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NotifyDecodeFailed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for NotifyDecodeFailed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NotifyDecodeFailed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok( - NotifyDecodeFailed( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for NotifyDecodeFailed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NotifyDecodeFailed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NotifyDecodeFailed(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for NotifyDecodeFailed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NotifyDecodeFailed(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NotifyDecodeFailed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "NotifyDecodeFailed", - &self.0, - &self.1, - &&self.2, - ) - } - } - impl ::subxt::events::StaticEvent for NotifyDecodeFailed { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "NotifyDecodeFailed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InvalidResponder( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::primitive::u64, - pub ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - >, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for InvalidResponder { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - InvalidResponder( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `InvalidResponder.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `InvalidResponder.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `InvalidResponder.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for InvalidResponder { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.2), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.2, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for InvalidResponder {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for InvalidResponder { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = InvalidResponder; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok( - InvalidResponder( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for InvalidResponder { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for InvalidResponder { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let InvalidResponder(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for InvalidResponder { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let InvalidResponder(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for InvalidResponder { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "InvalidResponder", - &self.0, - &self.1, - &&self.2, - ) - } - } - impl ::subxt::events::StaticEvent for InvalidResponder { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "InvalidResponder"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InvalidResponderVersion( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::primitive::u64, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for InvalidResponderVersion { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - InvalidResponderVersion( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `InvalidResponderVersion.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `InvalidResponderVersion.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for InvalidResponderVersion { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for InvalidResponderVersion {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for InvalidResponderVersion { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = InvalidResponderVersion; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - InvalidResponderVersion( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for InvalidResponderVersion { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for InvalidResponderVersion { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let InvalidResponderVersion(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for InvalidResponderVersion { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let InvalidResponderVersion(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for InvalidResponderVersion { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "InvalidResponderVersion", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for InvalidResponderVersion { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "InvalidResponderVersion"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ResponseTaken(pub ::core::primitive::u64); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for ResponseTaken { - type As = ::core::primitive::u64; - fn encode_as(&self) -> &::core::primitive::u64 { - &self.0 - } - fn decode_from( - x: ::core::primitive::u64, - ) -> ::core::result::Result< - ResponseTaken, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ResponseTaken(x)) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for ResponseTaken { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> ResponseTaken { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ResponseTaken { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - ResponseTaken({ - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ResponseTaken.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ResponseTaken { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ResponseTaken {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ResponseTaken { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ResponseTaken; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - ResponseTaken({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ResponseTaken { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ResponseTaken { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ResponseTaken(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ResponseTaken { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ResponseTaken(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ResponseTaken { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ResponseTaken", - &&self.0, - ) - } - } - impl ::subxt::events::StaticEvent for ResponseTaken { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "ResponseTaken"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AssetsTrapped( - pub ::subxt::utils::H256, - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub runtime_types::xcm::VersionedMultiAssets, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AssetsTrapped { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - AssetsTrapped( - { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetsTrapped.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetsTrapped.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetsTrapped.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AssetsTrapped { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.2), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.2, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AssetsTrapped {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AssetsTrapped { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AssetsTrapped; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok( - AssetsTrapped( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for AssetsTrapped { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AssetsTrapped { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AssetsTrapped(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AssetsTrapped { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AssetsTrapped(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AssetsTrapped { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "AssetsTrapped", - &self.0, - &self.1, - &&self.2, - ) - } - } - impl ::subxt::events::StaticEvent for AssetsTrapped { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "AssetsTrapped"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VersionChangeNotified( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::primitive::u32, - pub runtime_types::xcm::v3::multiasset::MultiAssets, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VersionChangeNotified { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - VersionChangeNotified( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionChangeNotified.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionChangeNotified.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionChangeNotified.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VersionChangeNotified { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.2), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.2, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VersionChangeNotified {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for VersionChangeNotified { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VersionChangeNotified; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok( - VersionChangeNotified( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for VersionChangeNotified { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for VersionChangeNotified { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VersionChangeNotified(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for VersionChangeNotified { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VersionChangeNotified(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VersionChangeNotified { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "VersionChangeNotified", - &self.0, - &self.1, - &&self.2, - ) - } - } - impl ::subxt::events::StaticEvent for VersionChangeNotified { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "VersionChangeNotified"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SupportedVersionChanged( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::primitive::u32, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SupportedVersionChanged { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - SupportedVersionChanged( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SupportedVersionChanged.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SupportedVersionChanged.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SupportedVersionChanged { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SupportedVersionChanged {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SupportedVersionChanged { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SupportedVersionChanged; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - SupportedVersionChanged( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SupportedVersionChanged { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SupportedVersionChanged { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SupportedVersionChanged(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SupportedVersionChanged { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SupportedVersionChanged(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SupportedVersionChanged { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "SupportedVersionChanged", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for SupportedVersionChanged { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "SupportedVersionChanged"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NotifyTargetSendFail( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::primitive::u64, - pub runtime_types::xcm::v3::traits::Error, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NotifyTargetSendFail { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - NotifyTargetSendFail( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotifyTargetSendFail.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotifyTargetSendFail.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotifyTargetSendFail.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NotifyTargetSendFail { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.2), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.2, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NotifyTargetSendFail {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for NotifyTargetSendFail { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NotifyTargetSendFail; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok( - NotifyTargetSendFail( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for NotifyTargetSendFail { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NotifyTargetSendFail { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NotifyTargetSendFail(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for NotifyTargetSendFail { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NotifyTargetSendFail(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NotifyTargetSendFail { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "NotifyTargetSendFail", - &self.0, - &self.1, - &&self.2, - ) - } - } - impl ::subxt::events::StaticEvent for NotifyTargetSendFail { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "NotifyTargetSendFail"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NotifyTargetMigrationFail( - pub runtime_types::xcm::VersionedMultiLocation, - pub ::core::primitive::u64, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NotifyTargetMigrationFail { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - NotifyTargetMigrationFail( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotifyTargetMigrationFail.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NotifyTargetMigrationFail.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NotifyTargetMigrationFail { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NotifyTargetMigrationFail {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for NotifyTargetMigrationFail { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NotifyTargetMigrationFail; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - NotifyTargetMigrationFail( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for NotifyTargetMigrationFail { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for NotifyTargetMigrationFail { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NotifyTargetMigrationFail(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for NotifyTargetMigrationFail { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NotifyTargetMigrationFail(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NotifyTargetMigrationFail { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "NotifyTargetMigrationFail", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for NotifyTargetMigrationFail { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "NotifyTargetMigrationFail"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InvalidQuerierVersion( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::primitive::u64, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for InvalidQuerierVersion { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - InvalidQuerierVersion( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `InvalidQuerierVersion.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `InvalidQuerierVersion.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for InvalidQuerierVersion { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for InvalidQuerierVersion {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for InvalidQuerierVersion { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = InvalidQuerierVersion; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - InvalidQuerierVersion( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for InvalidQuerierVersion { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for InvalidQuerierVersion { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let InvalidQuerierVersion(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for InvalidQuerierVersion { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let InvalidQuerierVersion(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for InvalidQuerierVersion { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "InvalidQuerierVersion", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for InvalidQuerierVersion { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "InvalidQuerierVersion"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InvalidQuerier( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::primitive::u64, - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - >, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for InvalidQuerier { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - InvalidQuerier( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `InvalidQuerier.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `InvalidQuerier.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `InvalidQuerier.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `InvalidQuerier.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for InvalidQuerier { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.2), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.3), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.2, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.3, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for InvalidQuerier {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for InvalidQuerier { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = InvalidQuerier; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok( - InvalidQuerier( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for InvalidQuerier { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for InvalidQuerier { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let InvalidQuerier(_0, _1, _2, _3) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for InvalidQuerier { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let InvalidQuerier(_0, _1, _2, _3) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for InvalidQuerier { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field4_finish( - f, - "InvalidQuerier", - &self.0, - &self.1, - &self.2, - &&self.3, - ) - } - } - impl ::subxt::events::StaticEvent for InvalidQuerier { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "InvalidQuerier"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VersionNotifyStarted( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub runtime_types::xcm::v3::multiasset::MultiAssets, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VersionNotifyStarted { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - VersionNotifyStarted( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionNotifyStarted.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionNotifyStarted.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VersionNotifyStarted { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VersionNotifyStarted {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for VersionNotifyStarted { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VersionNotifyStarted; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - VersionNotifyStarted( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for VersionNotifyStarted { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for VersionNotifyStarted { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VersionNotifyStarted(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for VersionNotifyStarted { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VersionNotifyStarted(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VersionNotifyStarted { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "VersionNotifyStarted", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for VersionNotifyStarted { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "VersionNotifyStarted"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VersionNotifyRequested( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub runtime_types::xcm::v3::multiasset::MultiAssets, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VersionNotifyRequested { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - VersionNotifyRequested( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionNotifyRequested.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionNotifyRequested.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VersionNotifyRequested { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VersionNotifyRequested {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for VersionNotifyRequested { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VersionNotifyRequested; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - VersionNotifyRequested( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for VersionNotifyRequested { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for VersionNotifyRequested { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VersionNotifyRequested(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for VersionNotifyRequested { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VersionNotifyRequested(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VersionNotifyRequested { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "VersionNotifyRequested", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for VersionNotifyRequested { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "VersionNotifyRequested"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VersionNotifyUnrequested( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub runtime_types::xcm::v3::multiasset::MultiAssets, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VersionNotifyUnrequested { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - VersionNotifyUnrequested( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionNotifyUnrequested.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionNotifyUnrequested.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VersionNotifyUnrequested { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VersionNotifyUnrequested {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for VersionNotifyUnrequested { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VersionNotifyUnrequested; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - VersionNotifyUnrequested( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for VersionNotifyUnrequested { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for VersionNotifyUnrequested { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VersionNotifyUnrequested(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for VersionNotifyUnrequested { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VersionNotifyUnrequested(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VersionNotifyUnrequested { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "VersionNotifyUnrequested", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for VersionNotifyUnrequested { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "VersionNotifyUnrequested"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct FeesPaid( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub runtime_types::xcm::v3::multiasset::MultiAssets, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for FeesPaid { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - FeesPaid( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `FeesPaid.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `FeesPaid.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for FeesPaid { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for FeesPaid {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for FeesPaid { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = FeesPaid; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - FeesPaid( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for FeesPaid { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for FeesPaid { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let FeesPaid(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for FeesPaid { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let FeesPaid(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for FeesPaid { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "FeesPaid", - &self.0, - &&self.1, - ) - } - } - impl ::subxt::events::StaticEvent for FeesPaid { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "FeesPaid"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AssetsClaimed( - pub ::subxt::utils::H256, - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub runtime_types::xcm::VersionedMultiAssets, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AssetsClaimed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - AssetsClaimed( - { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetsClaimed.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetsClaimed.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetsClaimed.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AssetsClaimed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.2), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.2, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AssetsClaimed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AssetsClaimed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AssetsClaimed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok( - AssetsClaimed( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for AssetsClaimed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AssetsClaimed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AssetsClaimed(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for AssetsClaimed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AssetsClaimed(_0, _1, _2) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AssetsClaimed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "AssetsClaimed", - &self.0, - &self.1, - &&self.2, - ) - } - } - 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 { - pub fn query_counter( - &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( - "XcmPallet", - "QueryCounter", - ::alloc::vec::Vec::new(), - [ - 216u8, - 73u8, - 160u8, - 232u8, - 60u8, - 245u8, - 218u8, - 219u8, - 152u8, - 68u8, - 146u8, - 219u8, - 255u8, - 7u8, - 86u8, - 112u8, - 83u8, - 49u8, - 94u8, - 173u8, - 64u8, - 203u8, - 147u8, - 226u8, - 236u8, - 39u8, - 129u8, - 106u8, - 209u8, - 113u8, - 150u8, - 50u8, - ], - ) - } - pub fn queries_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_xcm::pallet::QueryStatus< - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "Queries", - ::alloc::vec::Vec::new(), - [ - 119u8, - 5u8, - 12u8, - 91u8, - 117u8, - 240u8, - 52u8, - 192u8, - 135u8, - 139u8, - 220u8, - 78u8, - 207u8, - 199u8, - 71u8, - 163u8, - 100u8, - 17u8, - 6u8, - 65u8, - 200u8, - 245u8, - 191u8, - 82u8, - 232u8, - 128u8, - 126u8, - 70u8, - 39u8, - 63u8, - 148u8, - 219u8, - ], - ) - } - pub fn queries( - &self, - _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::Address::new_static( - "XcmPallet", - "Queries", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 119u8, - 5u8, - 12u8, - 91u8, - 117u8, - 240u8, - 52u8, - 192u8, - 135u8, - 139u8, - 220u8, - 78u8, - 207u8, - 199u8, - 71u8, - 163u8, - 100u8, - 17u8, - 6u8, - 65u8, - 200u8, - 245u8, - 191u8, - 82u8, - 232u8, - 128u8, - 126u8, - 70u8, - 39u8, - 63u8, - 148u8, - 219u8, - ], - ) - } - pub fn asset_traps_iter( - &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( - "XcmPallet", - "AssetTraps", - ::alloc::vec::Vec::new(), - [ - 148u8, - 41u8, - 254u8, - 134u8, - 61u8, - 172u8, - 126u8, - 146u8, - 78u8, - 178u8, - 50u8, - 77u8, - 226u8, - 8u8, - 200u8, - 78u8, - 77u8, - 91u8, - 26u8, - 133u8, - 104u8, - 126u8, - 28u8, - 28u8, - 202u8, - 62u8, - 87u8, - 183u8, - 231u8, - 191u8, - 5u8, - 181u8, - ], - ) - } - pub fn asset_traps( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "AssetTraps", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 148u8, - 41u8, - 254u8, - 134u8, - 61u8, - 172u8, - 126u8, - 146u8, - 78u8, - 178u8, - 50u8, - 77u8, - 226u8, - 8u8, - 200u8, - 78u8, - 77u8, - 91u8, - 26u8, - 133u8, - 104u8, - 126u8, - 28u8, - 28u8, - 202u8, - 62u8, - 87u8, - 183u8, - 231u8, - 191u8, - 5u8, - 181u8, - ], - ) - } - pub fn safe_xcm_version( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "SafeXcmVersion", - ::alloc::vec::Vec::new(), - [ - 187u8, - 8u8, - 74u8, - 126u8, - 80u8, - 215u8, - 177u8, - 60u8, - 223u8, - 123u8, - 196u8, - 155u8, - 166u8, - 66u8, - 25u8, - 164u8, - 191u8, - 66u8, - 116u8, - 131u8, - 116u8, - 188u8, - 224u8, - 122u8, - 75u8, - 195u8, - 246u8, - 188u8, - 83u8, - 134u8, - 49u8, - 143u8, - ], - ) - } - pub fn supported_version_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "SupportedVersion", - ::alloc::vec::Vec::new(), - [ - 144u8, - 22u8, - 91u8, - 30u8, - 139u8, - 164u8, - 95u8, - 149u8, - 97u8, - 247u8, - 12u8, - 212u8, - 96u8, - 16u8, - 134u8, - 236u8, - 74u8, - 57u8, - 244u8, - 169u8, - 68u8, - 63u8, - 111u8, - 86u8, - 65u8, - 229u8, - 104u8, - 51u8, - 44u8, - 100u8, - 47u8, - 191u8, - ], - ) - } - pub fn supported_version_iter1( - &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::Address::new_static( - "XcmPallet", - "SupportedVersion", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 144u8, - 22u8, - 91u8, - 30u8, - 139u8, - 164u8, - 95u8, - 149u8, - 97u8, - 247u8, - 12u8, - 212u8, - 96u8, - 16u8, - 134u8, - 236u8, - 74u8, - 57u8, - 244u8, - 169u8, - 68u8, - 63u8, - 111u8, - 86u8, - 65u8, - 229u8, - 104u8, - 51u8, - 44u8, - 100u8, - 47u8, - 191u8, - ], - ) - } - pub fn supported_version( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow< - runtime_types::xcm::VersionedMultiLocation, - >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "SupportedVersion", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 144u8, - 22u8, - 91u8, - 30u8, - 139u8, - 164u8, - 95u8, - 149u8, - 97u8, - 247u8, - 12u8, - 212u8, - 96u8, - 16u8, - 134u8, - 236u8, - 74u8, - 57u8, - 244u8, - 169u8, - 68u8, - 63u8, - 111u8, - 86u8, - 65u8, - 229u8, - 104u8, - 51u8, - 44u8, - 100u8, - 47u8, - 191u8, - ], - ) - } - pub fn version_notifiers_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u64, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "VersionNotifiers", - ::alloc::vec::Vec::new(), - [ - 49u8, - 190u8, - 73u8, - 67u8, - 91u8, - 69u8, - 121u8, - 206u8, - 25u8, - 82u8, - 29u8, - 170u8, - 157u8, - 201u8, - 168u8, - 93u8, - 181u8, - 55u8, - 226u8, - 142u8, - 136u8, - 46u8, - 117u8, - 208u8, - 130u8, - 90u8, - 129u8, - 39u8, - 151u8, - 92u8, - 118u8, - 75u8, - ], - ) - } - pub fn version_notifiers_iter1( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u64, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "VersionNotifiers", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 49u8, - 190u8, - 73u8, - 67u8, - 91u8, - 69u8, - 121u8, - 206u8, - 25u8, - 82u8, - 29u8, - 170u8, - 157u8, - 201u8, - 168u8, - 93u8, - 181u8, - 55u8, - 226u8, - 142u8, - 136u8, - 46u8, - 117u8, - 208u8, - 130u8, - 90u8, - 129u8, - 39u8, - 151u8, - 92u8, - 118u8, - 75u8, - ], - ) - } - pub fn version_notifiers( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow< - runtime_types::xcm::VersionedMultiLocation, - >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::u64, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "VersionNotifiers", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 49u8, - 190u8, - 73u8, - 67u8, - 91u8, - 69u8, - 121u8, - 206u8, - 25u8, - 82u8, - 29u8, - 170u8, - 157u8, - 201u8, - 168u8, - 93u8, - 181u8, - 55u8, - 226u8, - 142u8, - 136u8, - 46u8, - 117u8, - 208u8, - 130u8, - 90u8, - 129u8, - 39u8, - 151u8, - 92u8, - 118u8, - 75u8, - ], - ) - } - pub fn version_notify_targets_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - ::core::primitive::u64, - runtime_types::sp_weights::weight_v2::Weight, - ::core::primitive::u32, - ), - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "VersionNotifyTargets", - ::alloc::vec::Vec::new(), - [ - 1u8, - 195u8, - 40u8, - 83u8, - 216u8, - 175u8, - 241u8, - 95u8, - 42u8, - 7u8, - 85u8, - 253u8, - 223u8, - 241u8, - 195u8, - 41u8, - 41u8, - 21u8, - 17u8, - 171u8, - 216u8, - 150u8, - 39u8, - 165u8, - 215u8, - 194u8, - 201u8, - 225u8, - 179u8, - 12u8, - 52u8, - 173u8, - ], - ) - } - pub fn version_notify_targets_iter1( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - ::core::primitive::u64, - runtime_types::sp_weights::weight_v2::Weight, - ::core::primitive::u32, - ), - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "VersionNotifyTargets", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 1u8, - 195u8, - 40u8, - 83u8, - 216u8, - 175u8, - 241u8, - 95u8, - 42u8, - 7u8, - 85u8, - 253u8, - 223u8, - 241u8, - 195u8, - 41u8, - 41u8, - 21u8, - 17u8, - 171u8, - 216u8, - 150u8, - 39u8, - 165u8, - 215u8, - 194u8, - 201u8, - 225u8, - 179u8, - 12u8, - 52u8, - 173u8, - ], - ) - } - pub fn version_notify_targets( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow< - runtime_types::xcm::VersionedMultiLocation, - >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ( - ::core::primitive::u64, - runtime_types::sp_weights::weight_v2::Weight, - ::core::primitive::u32, - ), - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "VersionNotifyTargets", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 1u8, - 195u8, - 40u8, - 83u8, - 216u8, - 175u8, - 241u8, - 95u8, - 42u8, - 7u8, - 85u8, - 253u8, - 223u8, - 241u8, - 195u8, - 41u8, - 41u8, - 21u8, - 17u8, - 171u8, - 216u8, - 150u8, - 39u8, - 165u8, - 215u8, - 194u8, - 201u8, - 225u8, - 179u8, - 12u8, - 52u8, - 173u8, - ], - ) - } - pub fn version_discovery_queue( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - runtime_types::xcm::VersionedMultiLocation, - ::core::primitive::u32, - ), - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "VersionDiscoveryQueue", - ::alloc::vec::Vec::new(), - [ - 110u8, - 87u8, - 102u8, - 193u8, - 125u8, - 129u8, - 0u8, - 221u8, - 218u8, - 229u8, - 101u8, - 94u8, - 74u8, - 229u8, - 246u8, - 180u8, - 113u8, - 11u8, - 15u8, - 159u8, - 98u8, - 90u8, - 30u8, - 112u8, - 164u8, - 236u8, - 151u8, - 220u8, - 19u8, - 83u8, - 67u8, - 248u8, - ], - ) - } - pub fn current_migration( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_xcm::pallet::VersionMigrationStage, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "CurrentMigration", - ::alloc::vec::Vec::new(), - [ - 74u8, - 138u8, - 181u8, - 162u8, - 59u8, - 251u8, - 37u8, - 28u8, - 232u8, - 51u8, - 30u8, - 152u8, - 252u8, - 133u8, - 95u8, - 195u8, - 47u8, - 127u8, - 21u8, - 44u8, - 62u8, - 143u8, - 170u8, - 234u8, - 160u8, - 37u8, - 131u8, - 179u8, - 57u8, - 241u8, - 140u8, - 124u8, - ], - ) - } - pub fn remote_locked_fungibles_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_xcm::pallet::RemoteLockedFungibleRecord< - (), - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "RemoteLockedFungibles", - ::alloc::vec::Vec::new(), - [ - 74u8, - 249u8, - 83u8, - 245u8, - 44u8, - 230u8, - 152u8, - 82u8, - 4u8, - 163u8, - 230u8, - 121u8, - 87u8, - 143u8, - 184u8, - 12u8, - 117u8, - 112u8, - 131u8, - 160u8, - 232u8, - 62u8, - 175u8, - 15u8, - 81u8, - 198u8, - 182u8, - 255u8, - 37u8, - 81u8, - 6u8, - 57u8, - ], - ) - } - pub fn remote_locked_fungibles_iter1( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_xcm::pallet::RemoteLockedFungibleRecord< - (), - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "RemoteLockedFungibles", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 74u8, - 249u8, - 83u8, - 245u8, - 44u8, - 230u8, - 152u8, - 82u8, - 4u8, - 163u8, - 230u8, - 121u8, - 87u8, - 143u8, - 184u8, - 12u8, - 117u8, - 112u8, - 131u8, - 160u8, - 232u8, - 62u8, - 175u8, - 15u8, - 81u8, - 198u8, - 182u8, - 255u8, - 37u8, - 81u8, - 6u8, - 57u8, - ], - ) - } - pub fn remote_locked_fungibles_iter2( - &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_xcm::pallet::RemoteLockedFungibleRecord< - (), - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "RemoteLockedFungibles", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 74u8, - 249u8, - 83u8, - 245u8, - 44u8, - 230u8, - 152u8, - 82u8, - 4u8, - 163u8, - 230u8, - 121u8, - 87u8, - 143u8, - 184u8, - 12u8, - 117u8, - 112u8, - 131u8, - 160u8, - 232u8, - 62u8, - 175u8, - 15u8, - 81u8, - 198u8, - 182u8, - 255u8, - 37u8, - 81u8, - 6u8, - 57u8, - ], - ) - } - pub fn remote_locked_fungibles( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _2: impl ::std::borrow::Borrow< - runtime_types::xcm::VersionedAssetId, - >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_xcm::pallet::RemoteLockedFungibleRecord< - (), - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "RemoteLockedFungibles", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _2.borrow(), - ), - ]), - ), - [ - 74u8, - 249u8, - 83u8, - 245u8, - 44u8, - 230u8, - 152u8, - 82u8, - 4u8, - 163u8, - 230u8, - 121u8, - 87u8, - 143u8, - 184u8, - 12u8, - 117u8, - 112u8, - 131u8, - 160u8, - 232u8, - 62u8, - 175u8, - 15u8, - 81u8, - 198u8, - 182u8, - 255u8, - 37u8, - 81u8, - 6u8, - 57u8, - ], - ) - } - pub fn locked_fungibles_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - ::core::primitive::u128, - runtime_types::xcm::VersionedMultiLocation, - ), - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "LockedFungibles", - ::alloc::vec::Vec::new(), - [ - 110u8, - 220u8, - 127u8, - 176u8, - 219u8, - 23u8, - 132u8, - 36u8, - 224u8, - 187u8, - 25u8, - 103u8, - 126u8, - 99u8, - 34u8, - 105u8, - 57u8, - 182u8, - 162u8, - 69u8, - 24u8, - 67u8, - 221u8, - 103u8, - 79u8, - 139u8, - 187u8, - 162u8, - 113u8, - 109u8, - 163u8, - 35u8, - ], - ) - } - pub fn locked_fungibles( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - ::core::primitive::u128, - runtime_types::xcm::VersionedMultiLocation, - ), - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "LockedFungibles", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 110u8, - 220u8, - 127u8, - 176u8, - 219u8, - 23u8, - 132u8, - 36u8, - 224u8, - 187u8, - 25u8, - 103u8, - 126u8, - 99u8, - 34u8, - 105u8, - 57u8, - 182u8, - 162u8, - 69u8, - 24u8, - 67u8, - 221u8, - 103u8, - 79u8, - 139u8, - 187u8, - 162u8, - 113u8, - 109u8, - 163u8, - 35u8, - ], - ) - } - pub fn xcm_execution_suspended( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - ::core::primitive::bool, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "XcmPallet", - "XcmExecutionSuspended", - ::alloc::vec::Vec::new(), - [ - 182u8, - 54u8, - 69u8, - 68u8, - 78u8, - 76u8, - 103u8, - 79u8, - 47u8, - 136u8, - 99u8, - 104u8, - 128u8, - 129u8, - 249u8, - 54u8, - 214u8, - 136u8, - 97u8, - 48u8, - 178u8, - 42u8, - 26u8, - 27u8, - 82u8, - 24u8, - 33u8, - 77u8, - 33u8, - 27u8, - 20u8, - 127u8, - ], - ) - } - } - } - } - pub mod message_queue { - use super::root_mod; - use super::runtime_types; - pub type Error = runtime_types::pallet_message_queue::pallet::Error; - pub type Call = runtime_types::pallet_message_queue::pallet::Call; - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[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::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - pub page_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ReapPage { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ReapPage { - message_origin: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReapPage::message_origin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - page_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReapPage::page_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ReapPage { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.message_origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.page_index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.message_origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.page_index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ReapPage {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ReapPage { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReapPage; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ReapPage { - message_origin: { - let val = *vals - .get(&Some("message_origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "message_origin".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("message_origin"))? - }, - page_index: { - let val = *vals - .get(&Some("page_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "page_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("page_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ReapPage { - message_origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("message_origin"))? - }, - page_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("page_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ReapPage { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ReapPage { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReapPage { message_origin, page_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("message_origin"), - message_origin - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("page_index"), - page_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ReapPage { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReapPage { message_origin, page_index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("message_origin"), - message_origin - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("page_index"), - page_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ReapPage { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ReapPage", - "message_origin", - &self.message_origin, - "page_index", - &&self.page_index, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ReapPage { - const PALLET: &'static str = "MessageQueue"; - const CALL: &'static str = "reap_page"; - } - #[codec(crate = ::subxt::ext::codec)] - #[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::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - pub page: ::core::primitive::u32, - pub index: ::core::primitive::u32, - pub weight_limit: runtime_types::sp_weights::weight_v2::Weight, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ExecuteOverweight { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ExecuteOverweight { - message_origin: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ExecuteOverweight::message_origin`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - page: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ExecuteOverweight::page`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ExecuteOverweight::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - weight_limit: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `ExecuteOverweight::weight_limit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ExecuteOverweight { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.message_origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.page), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.weight_limit), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.message_origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.page, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.weight_limit, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ExecuteOverweight {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ExecuteOverweight { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ExecuteOverweight; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ExecuteOverweight { - message_origin: { - let val = *vals - .get(&Some("message_origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "message_origin".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("message_origin"))? - }, - page: { - let val = *vals - .get(&Some("page")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "page".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("page"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - weight_limit: { - let val = *vals - .get(&Some("weight_limit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "weight_limit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(ExecuteOverweight { - message_origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("message_origin"))? - }, - page: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("page"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - weight_limit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ExecuteOverweight { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ExecuteOverweight { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExecuteOverweight { - message_origin, - page, - index, - weight_limit, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("message_origin"), - message_origin - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("page"), - page as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight_limit"), - weight_limit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ExecuteOverweight { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExecuteOverweight { - message_origin, - page, - index, - weight_limit, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("message_origin"), - message_origin - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("page"), - page as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight_limit"), - weight_limit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ExecuteOverweight { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "ExecuteOverweight", - "message_origin", - &self.message_origin, - "page", - &self.page, - "index", - &self.index, - "weight_limit", - &&self.weight_limit, - ) - } - } - impl ::subxt::blocks::StaticExtrinsic for ExecuteOverweight { - const PALLET: &'static str = "MessageQueue"; - const CALL: &'static str = "execute_overweight"; - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn reap_page( - &self, - message_origin: runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - page_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "MessageQueue", - "reap_page", - types::ReapPage { - message_origin, - page_index, - }, - [ - 217u8, - 3u8, - 106u8, - 158u8, - 151u8, - 194u8, - 234u8, - 4u8, - 254u8, - 4u8, - 200u8, - 201u8, - 107u8, - 140u8, - 220u8, - 201u8, - 245u8, - 14u8, - 23u8, - 156u8, - 41u8, - 106u8, - 39u8, - 90u8, - 214u8, - 1u8, - 183u8, - 45u8, - 3u8, - 83u8, - 242u8, - 30u8, - ], - ) - } - pub fn execute_overweight( - &self, - message_origin: runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - 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", - types::ExecuteOverweight { - message_origin, - page, - index, - weight_limit, - }, - [ - 101u8, - 2u8, - 86u8, - 225u8, - 217u8, - 229u8, - 143u8, - 214u8, - 146u8, - 190u8, - 182u8, - 102u8, - 251u8, - 18u8, - 179u8, - 187u8, - 113u8, - 29u8, - 182u8, - 24u8, - 34u8, - 179u8, - 64u8, - 249u8, - 139u8, - 76u8, - 50u8, - 238u8, - 132u8, - 167u8, - 115u8, - 141u8, - ], - ) - } - } - } - pub type Event = runtime_types::pallet_message_queue::pallet::Event; - pub mod events { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProcessingFailed { - pub id: [::core::primitive::u8; 32usize], - pub origin: runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - pub error: runtime_types::frame_support::traits::messages::ProcessMessageError, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ProcessingFailed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ProcessingFailed { - id: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProcessingFailed::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - origin: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProcessingFailed::origin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - error: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProcessingFailed::error`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ProcessingFailed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.error), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.error, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ProcessingFailed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ProcessingFailed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ProcessingFailed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ProcessingFailed { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - origin: { - let val = *vals - .get(&Some("origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "origin".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - error: { - let val = *vals - .get(&Some("error")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "error".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("error"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(ProcessingFailed { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - error: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("error"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ProcessingFailed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ProcessingFailed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProcessingFailed { id, origin, error } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("error"), - error as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ProcessingFailed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProcessingFailed { id, origin, error } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("error"), - error as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ProcessingFailed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ProcessingFailed", - "id", - &self.id, - "origin", - &self.origin, - "error", - &&self.error, - ) - } - } - impl ::subxt::events::StaticEvent for ProcessingFailed { - const PALLET: &'static str = "MessageQueue"; - const EVENT: &'static str = "ProcessingFailed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Processed { - pub id: [::core::primitive::u8; 32usize], - pub origin: runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - pub weight_used: runtime_types::sp_weights::weight_v2::Weight, - pub success: ::core::primitive::bool, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Processed { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Processed { - id: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Processed::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - origin: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Processed::origin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - weight_used: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Processed::weight_used`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - success: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Processed::success`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Processed { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.weight_used), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.success), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.weight_used, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.success, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Processed {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Processed { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Processed; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Processed { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - origin: { - let val = *vals - .get(&Some("origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "origin".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - weight_used: { - let val = *vals - .get(&Some("weight_used")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "weight_used".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("weight_used"))? - }, - success: { - let val = *vals - .get(&Some("success")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "success".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("success"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(Processed { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - weight_used: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("weight_used"))? - }, - success: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("success"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Processed { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Processed { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Processed { id, origin, weight_used, success } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight_used"), - weight_used as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("success"), - success as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Processed { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Processed { id, origin, weight_used, success } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight_used"), - weight_used as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("success"), - success as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Processed { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Processed", - "id", - &self.id, - "origin", - &self.origin, - "weight_used", - &self.weight_used, - "success", - &&self.success, - ) - } - } - impl ::subxt::events::StaticEvent for Processed { - const PALLET: &'static str = "MessageQueue"; - const EVENT: &'static str = "Processed"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OverweightEnqueued { - pub id: [::core::primitive::u8; 32usize], - pub origin: runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - pub page_index: ::core::primitive::u32, - pub message_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for OverweightEnqueued { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(OverweightEnqueued { - id: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OverweightEnqueued::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - origin: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OverweightEnqueued::origin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - page_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OverweightEnqueued::page_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - message_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `OverweightEnqueued::message_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for OverweightEnqueued { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.page_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.message_index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.page_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.message_index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for OverweightEnqueued {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for OverweightEnqueued { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = OverweightEnqueued; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(OverweightEnqueued { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - origin: { - let val = *vals - .get(&Some("origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "origin".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - page_index: { - let val = *vals - .get(&Some("page_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "page_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("page_index"))? - }, - message_index: { - let val = *vals - .get(&Some("message_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "message_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("message_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(OverweightEnqueued { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - page_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("page_index"))? - }, - message_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("message_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for OverweightEnqueued { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for OverweightEnqueued { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OverweightEnqueued { - id, - origin, - page_index, - message_index, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("page_index"), - page_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("message_index"), - message_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for OverweightEnqueued { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OverweightEnqueued { - id, - origin, - page_index, - message_index, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("page_index"), - page_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("message_index"), - message_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for OverweightEnqueued { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "OverweightEnqueued", - "id", - &self.id, - "origin", - &self.origin, - "page_index", - &self.page_index, - "message_index", - &&self.message_index, - ) - } - } - impl ::subxt::events::StaticEvent for OverweightEnqueued { - const PALLET: &'static str = "MessageQueue"; - const EVENT: &'static str = "OverweightEnqueued"; - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PageReaped { - pub origin: runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PageReaped { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(PageReaped { - origin: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PageReaped::origin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PageReaped::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PageReaped { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PageReaped {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PageReaped { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PageReaped; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PageReaped { - origin: { - let val = *vals - .get(&Some("origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "origin".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(PageReaped { - origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for PageReaped { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PageReaped { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PageReaped { origin, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PageReaped { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PageReaped { origin, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PageReaped { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PageReaped", - "origin", - &self.origin, - "index", - &&self.index, - ) - } - } - 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 { - pub fn book_state_for_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_message_queue::BookState< - runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "MessageQueue", - "BookStateFor", - ::alloc::vec::Vec::new(), - [ - 32u8, - 61u8, - 161u8, - 81u8, - 134u8, - 136u8, - 252u8, - 113u8, - 204u8, - 115u8, - 206u8, - 180u8, - 33u8, - 185u8, - 137u8, - 155u8, - 178u8, - 189u8, - 234u8, - 201u8, - 31u8, - 230u8, - 156u8, - 72u8, - 37u8, - 56u8, - 152u8, - 91u8, - 50u8, - 82u8, - 191u8, - 2u8, - ], - ) - } - pub fn book_state_for( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_message_queue::BookState< - runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "MessageQueue", - "BookStateFor", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 32u8, - 61u8, - 161u8, - 81u8, - 134u8, - 136u8, - 252u8, - 113u8, - 204u8, - 115u8, - 206u8, - 180u8, - 33u8, - 185u8, - 137u8, - 155u8, - 178u8, - 189u8, - 234u8, - 201u8, - 31u8, - 230u8, - 156u8, - 72u8, - 37u8, - 56u8, - 152u8, - 91u8, - 50u8, - 82u8, - 191u8, - 2u8, - ], - ) - } - pub fn service_head( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "MessageQueue", - "ServiceHead", - ::alloc::vec::Vec::new(), - [ - 17u8, - 130u8, - 229u8, - 193u8, - 127u8, - 237u8, - 60u8, - 232u8, - 99u8, - 109u8, - 102u8, - 228u8, - 124u8, - 103u8, - 24u8, - 188u8, - 151u8, - 121u8, - 55u8, - 97u8, - 85u8, - 63u8, - 131u8, - 60u8, - 99u8, - 12u8, - 88u8, - 230u8, - 86u8, - 50u8, - 12u8, - 75u8, - ], - ) - } - pub fn pages_iter( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_message_queue::Page< - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "MessageQueue", - "Pages", - ::alloc::vec::Vec::new(), - [ - 56u8, - 181u8, - 157u8, - 16u8, - 157u8, - 123u8, - 106u8, - 93u8, - 199u8, - 208u8, - 153u8, - 53u8, - 168u8, - 188u8, - 124u8, - 77u8, - 140u8, - 163u8, - 113u8, - 16u8, - 232u8, - 47u8, - 10u8, - 185u8, - 113u8, - 230u8, - 47u8, - 91u8, - 253u8, - 196u8, - 95u8, - 102u8, - ], - ) - } - pub fn pages_iter1( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - >, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_message_queue::Page< - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::Address::new_static( - "MessageQueue", - "Pages", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ]), - ), - [ - 56u8, - 181u8, - 157u8, - 16u8, - 157u8, - 123u8, - 106u8, - 93u8, - 199u8, - 208u8, - 153u8, - 53u8, - 168u8, - 188u8, - 124u8, - 77u8, - 140u8, - 163u8, - 113u8, - 16u8, - 232u8, - 47u8, - 10u8, - 185u8, - 113u8, - 230u8, - 47u8, - 91u8, - 253u8, - 196u8, - 95u8, - 102u8, - ], - ) - } - pub fn pages( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - >, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - runtime_types::pallet_message_queue::Page< - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::Address::new_static( - "MessageQueue", - "Pages", - <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - ::subxt::storage::address::make_static_storage_map_key( - _0.borrow(), - ), - ::subxt::storage::address::make_static_storage_map_key( - _1.borrow(), - ), - ]), - ), - [ - 56u8, - 181u8, - 157u8, - 16u8, - 157u8, - 123u8, - 106u8, - 93u8, - 199u8, - 208u8, - 153u8, - 53u8, - 168u8, - 188u8, - 124u8, - 77u8, - 140u8, - 163u8, - 113u8, - 16u8, - 232u8, - 47u8, - 10u8, - 185u8, - 113u8, - 230u8, - 47u8, - 91u8, - 253u8, - 196u8, - 95u8, - 102u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn heap_size( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "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, - ], - ) - } - pub fn max_stale( - &self, - ) -> ::subxt::constants::Address<::core::primitive::u32> { - ::subxt::constants::Address::new_static( - "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, - ], - ) - } - pub fn service_weight( - &self, - ) -> ::subxt::constants::Address< - ::core::option::Option< - runtime_types::sp_weights::weight_v2::Weight, - >, - > { - ::subxt::constants::Address::new_static( - "MessageQueue", - "ServiceWeight", - [ - 204u8, - 140u8, - 63u8, - 167u8, - 49u8, - 8u8, - 148u8, - 163u8, - 190u8, - 224u8, - 15u8, - 103u8, - 86u8, - 153u8, - 248u8, - 117u8, - 223u8, - 117u8, - 210u8, - 80u8, - 205u8, - 155u8, - 40u8, - 11u8, - 59u8, - 63u8, - 129u8, - 156u8, - 17u8, - 83u8, - 177u8, - 250u8, - ], - ) - } - } - } - } - pub mod runtime_types { - use super::runtime_types; - pub mod bounded_collections { - use super::runtime_types; - pub mod bounded_btree_map { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BoundedBTreeMap<_0, _1>( - pub ::subxt::utils::KeyedVec<_0, _1>, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode - for BoundedBTreeMap<_0, _1> - where - ::subxt::utils::KeyedVec< - _0, - _1, - >: ::subxt::ext::codec::Decode, - ::subxt::utils::KeyedVec< - _0, - _1, - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - BoundedBTreeMap::< - _0, - _1, - >({ - let __codec_res_edqy = <::subxt::utils::KeyedVec< - _0, - _1, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BoundedBTreeMap.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode - for BoundedBTreeMap<_0, _1> - where - ::subxt::utils::KeyedVec< - _0, - _1, - >: ::subxt::ext::codec::Encode, - ::subxt::utils::KeyedVec< - _0, - _1, - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for BoundedBTreeMap<_0, _1> - where - ::subxt::utils::KeyedVec< - _0, - _1, - >: ::subxt::ext::codec::Encode, - ::subxt::utils::KeyedVec< - _0, - _1, - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>( - ::core::marker::PhantomData<(_0, _1)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for BoundedBTreeMap<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BoundedBTreeMap<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - BoundedBTreeMap({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for BoundedBTreeMap<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for BoundedBTreeMap<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BoundedBTreeMap(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for BoundedBTreeMap<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BoundedBTreeMap(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - > ::core::fmt::Debug for BoundedBTreeMap<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "BoundedBTreeMap", - &&self.0, - ) - } - } - } - pub mod bounded_vec { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for BoundedVec<_0> - where - ::std::vec::Vec<_0>: ::subxt::ext::codec::Decode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - BoundedVec::< - _0, - >({ - let __codec_res_edqy = <::std::vec::Vec< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BoundedVec.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for BoundedVec<_0> - where - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for BoundedVec<_0> - where - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for BoundedVec<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BoundedVec<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - BoundedVec({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for BoundedVec<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for BoundedVec<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BoundedVec(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for BoundedVec<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BoundedVec(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for BoundedVec<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "BoundedVec", - &&self.0, - ) - } - } - } - pub mod weak_bounded_vec { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for WeakBoundedVec<_0> - where - ::std::vec::Vec<_0>: ::subxt::ext::codec::Decode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - WeakBoundedVec::< - _0, - >({ - let __codec_res_edqy = <::std::vec::Vec< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WeakBoundedVec.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for WeakBoundedVec<_0> - where - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for WeakBoundedVec<_0> - where - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for WeakBoundedVec<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = WeakBoundedVec<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - WeakBoundedVec({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for WeakBoundedVec<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for WeakBoundedVec<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WeakBoundedVec(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for WeakBoundedVec<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WeakBoundedVec(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for WeakBoundedVec<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "WeakBoundedVec", - &&self.0, - ) - } - } - } - } - pub mod finality_grandpa { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Equivocation<_0, _1, _2> { - pub round_number: ::core::primitive::u64, - pub identity: _0, - pub first: (_1, _2), - pub second: (_1, _2), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Decode - for Equivocation<_0, _1, _2> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - (_1, _2): ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - (_1, _2): ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Equivocation::<_0, _1, _2> { - round_number: { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Equivocation::round_number`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - identity: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Equivocation::identity`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - first: { - let __codec_res_edqy = <( - _1, - _2, - ) as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Equivocation::first`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - second: { - let __codec_res_edqy = <( - _1, - _2, - ) as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Equivocation::second`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Encode - for Equivocation<_0, _1, _2> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - (_1, _2): ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - (_1, _2): ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.round_number), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.identity), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.first), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.second), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.round_number, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.identity, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.first, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.second, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::EncodeLike - for Equivocation<_0, _1, _2> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - (_1, _2): ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - (_1, _2): ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2>( - ::core::marker::PhantomData<(_0, _1, _2)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1, _2> ::subxt::ext::scale_decode::IntoVisitor - for Equivocation<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Equivocation<_0, _1, _2>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Equivocation { - round_number: { - let val = *vals - .get(&Some("round_number")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "round_number".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("round_number"))? - }, - identity: { - let val = *vals - .get(&Some("identity")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "identity".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("identity"))? - }, - first: { - let val = *vals - .get(&Some("first")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "first".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("first"))? - }, - second: { - let val = *vals - .get(&Some("second")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "second".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("second"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(Equivocation { - round_number: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("round_number"))? - }, - identity: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("identity"))? - }, - first: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("first"))? - }, - second: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("second"))? - }, - }) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::DecodeAsFields - for Equivocation<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsType - for Equivocation<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Equivocation { round_number, identity, first, second } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("round_number"), - round_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("identity"), - identity as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first"), - first as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("second"), - second as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsFields - for Equivocation<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Equivocation { round_number, identity, first, second } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("round_number"), - round_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("identity"), - identity as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first"), - first as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("second"), - second as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - > ::core::fmt::Debug for Equivocation<_0, _1, _2> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Equivocation", - "round_number", - &self.round_number, - "identity", - &self.identity, - "first", - &self.first, - "second", - &&self.second, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Precommit<_0, _1> { - pub target_hash: _0, - pub target_number: _1, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for Precommit<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Precommit::<_0, _1> { - target_hash: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Precommit::target_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - target_number: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Precommit::target_number`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for Precommit<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.target_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.target_number), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.target_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.target_number, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike for Precommit<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for Precommit<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Precommit<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Precommit { - target_hash: { - let val = *vals - .get(&Some("target_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target_hash"))? - }, - target_number: { - let val = *vals - .get(&Some("target_number")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target_number".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("target_number"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Precommit { - target_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target_hash"))? - }, - target_number: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("target_number"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for Precommit<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for Precommit<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Precommit { target_hash, target_number } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target_hash"), - target_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target_number"), - target_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for Precommit<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Precommit { target_hash, target_number } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target_hash"), - target_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target_number"), - target_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for Precommit<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Precommit", - "target_hash", - &self.target_hash, - "target_number", - &&self.target_number, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Prevote<_0, _1> { - pub target_hash: _0, - pub target_number: _1, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for Prevote<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Prevote::<_0, _1> { - target_hash: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Prevote::target_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - target_number: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Prevote::target_number`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for Prevote<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.target_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.target_number), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.target_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.target_number, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike for Prevote<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for Prevote<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Prevote<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Prevote { - target_hash: { - let val = *vals - .get(&Some("target_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target_hash"))? - }, - target_number: { - let val = *vals - .get(&Some("target_number")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target_number".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("target_number"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Prevote { - target_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target_hash"))? - }, - target_number: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("target_number"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for Prevote<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType for Prevote<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Prevote { target_hash, target_number } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target_hash"), - target_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target_number"), - target_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for Prevote<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Prevote { target_hash, target_number } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target_hash"), - target_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target_number"), - target_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for Prevote<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Prevote", - "target_hash", - &self.target_hash, - "target_number", - &&self.target_number, - ) - } - } - } - pub mod frame_support { - use super::runtime_types; - pub mod dispatch { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum DispatchClass { - #[codec(index = 0)] - Normal, - #[codec(index = 1)] - Operational, - #[codec(index = 2)] - Mandatory, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DispatchClass { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `DispatchClass`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DispatchClass::Normal) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DispatchClass::Operational) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DispatchClass::Mandatory) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `DispatchClass`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DispatchClass { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - DispatchClass::Normal => 0_usize, - DispatchClass::Operational => 0_usize, - DispatchClass::Mandatory => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - DispatchClass::Normal => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - DispatchClass::Operational => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - DispatchClass::Mandatory => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DispatchClass {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for DispatchClass { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DispatchClass; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Normal" { - return Ok(DispatchClass::Normal); - } - if value.name() == "Operational" { - return Ok(DispatchClass::Operational); - } - if value.name() == "Mandatory" { - return Ok(DispatchClass::Mandatory); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Normal", - "Operational", - "Mandatory", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DispatchClass { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Normal => { - ::subxt::ext::scale_encode::Variant { - name: "Normal", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Operational => { - ::subxt::ext::scale_encode::Variant { - name: "Operational", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mandatory => { - ::subxt::ext::scale_encode::Variant { - name: "Mandatory", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DispatchClass { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - DispatchClass::Normal => "Normal", - DispatchClass::Operational => "Operational", - DispatchClass::Mandatory => "Mandatory", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DispatchInfo { - pub weight: runtime_types::sp_weights::weight_v2::Weight, - pub class: runtime_types::frame_support::dispatch::DispatchClass, - pub pays_fee: runtime_types::frame_support::dispatch::Pays, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DispatchInfo { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(DispatchInfo { - weight: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DispatchInfo::weight`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - class: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DispatchInfo::class`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pays_fee: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DispatchInfo::pays_fee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DispatchInfo { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.weight), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.class), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pays_fee), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.weight, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.class, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.pays_fee, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DispatchInfo {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for DispatchInfo { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DispatchInfo; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DispatchInfo { - weight: { - let val = *vals - .get(&Some("weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "weight".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("weight"))? - }, - class: { - let val = *vals - .get(&Some("class")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "class".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - pays_fee: { - let val = *vals - .get(&Some("pays_fee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pays_fee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pays_fee"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(DispatchInfo { - weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("weight"))? - }, - class: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - pays_fee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pays_fee"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for DispatchInfo { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DispatchInfo { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DispatchInfo { weight, class, pays_fee } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("weight"), - weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("class"), - class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pays_fee"), - pays_fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for DispatchInfo { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DispatchInfo { weight, class, pays_fee } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("weight"), - weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("class"), - class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pays_fee"), - pays_fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DispatchInfo { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "DispatchInfo", - "weight", - &self.weight, - "class", - &self.class, - "pays_fee", - &&self.pays_fee, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Pays { - #[codec(index = 0)] - Yes, - #[codec(index = 1)] - No, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Pays { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Pays`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Pays::Yes) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { ::core::result::Result::Ok(Pays::No) })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Pays`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Pays { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Pays::Yes => 0_usize, - Pays::No => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Pays::Yes => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Pays::No => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Pays {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Pays { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Pays; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Yes" { - return Ok(Pays::Yes); - } - if value.name() == "No" { - return Ok(Pays::No); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Yes", "No"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Pays { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Yes => { - ::subxt::ext::scale_encode::Variant { - name: "Yes", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::No => { - ::subxt::ext::scale_encode::Variant { - name: "No", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Pays { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Pays::Yes => "Yes", - Pays::No => "No", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PerDispatchClass<_0> { - pub normal: _0, - pub operational: _0, - pub mandatory: _0, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for PerDispatchClass<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(PerDispatchClass::<_0> { - normal: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PerDispatchClass::normal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - operational: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PerDispatchClass::operational`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - mandatory: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PerDispatchClass::mandatory`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for PerDispatchClass<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.normal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.operational), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.mandatory), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.normal, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.operational, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.mandatory, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for PerDispatchClass<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for PerDispatchClass<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PerDispatchClass<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PerDispatchClass { - normal: { - let val = *vals - .get(&Some("normal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "normal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("normal"))? - }, - operational: { - let val = *vals - .get(&Some("operational")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "operational".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("operational"))? - }, - mandatory: { - let val = *vals - .get(&Some("mandatory")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "mandatory".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("mandatory"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(PerDispatchClass { - normal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("normal"))? - }, - operational: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("operational"))? - }, - mandatory: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("mandatory"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for PerDispatchClass<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for PerDispatchClass<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PerDispatchClass { normal, operational, mandatory } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("normal"), - normal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("operational"), - operational as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("mandatory"), - mandatory as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for PerDispatchClass<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PerDispatchClass { normal, operational, mandatory } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("normal"), - normal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("operational"), - operational as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("mandatory"), - mandatory as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for PerDispatchClass<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "PerDispatchClass", - "normal", - &self.normal, - "operational", - &self.operational, - "mandatory", - &&self.mandatory, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PostDispatchInfo { - pub actual_weight: ::core::option::Option< - runtime_types::sp_weights::weight_v2::Weight, - >, - pub pays_fee: runtime_types::frame_support::dispatch::Pays, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PostDispatchInfo { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(PostDispatchInfo { - actual_weight: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::sp_weights::weight_v2::Weight, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `PostDispatchInfo::actual_weight`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pays_fee: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PostDispatchInfo::pays_fee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PostDispatchInfo { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.actual_weight), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pays_fee), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.actual_weight, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.pays_fee, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PostDispatchInfo {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for PostDispatchInfo { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PostDispatchInfo; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PostDispatchInfo { - actual_weight: { - let val = *vals - .get(&Some("actual_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "actual_weight".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("actual_weight"))? - }, - pays_fee: { - let val = *vals - .get(&Some("pays_fee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pays_fee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pays_fee"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(PostDispatchInfo { - actual_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("actual_weight"))? - }, - pays_fee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pays_fee"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PostDispatchInfo { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PostDispatchInfo { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PostDispatchInfo { actual_weight, pays_fee } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("actual_weight"), - actual_weight - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pays_fee"), - pays_fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for PostDispatchInfo { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PostDispatchInfo { actual_weight, pays_fee } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("actual_weight"), - actual_weight - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pays_fee"), - pays_fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PostDispatchInfo { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PostDispatchInfo", - "actual_weight", - &self.actual_weight, - "pays_fee", - &&self.pays_fee, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum RawOrigin<_0> { - #[codec(index = 0)] - Root, - #[codec(index = 1)] - Signed(_0), - #[codec(index = 2)] - None, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for RawOrigin<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `RawOrigin`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(RawOrigin::<_0>::Root) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RawOrigin::< - _0, - >::Signed({ - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RawOrigin::Signed.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(RawOrigin::<_0>::None) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `RawOrigin`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for RawOrigin<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - RawOrigin::Root => 0_usize, - RawOrigin::Signed(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RawOrigin::None => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - RawOrigin::Root => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - RawOrigin::Signed(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RawOrigin::None => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for RawOrigin<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for RawOrigin<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RawOrigin<_0>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Root" { - return Ok(RawOrigin::Root); - } - if value.name() == "Signed" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RawOrigin::Signed({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "None" { - return Ok(RawOrigin::None); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Root", "Signed", "None"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for RawOrigin<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Root => { - ::subxt::ext::scale_encode::Variant { - name: "Root", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Signed(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Signed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::None => { - ::subxt::ext::scale_encode::Variant { - name: "None", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for RawOrigin<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - RawOrigin::Root => { - ::core::fmt::Formatter::write_str(f, "Root") - } - RawOrigin::Signed(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Signed", - &__self_0, - ) - } - RawOrigin::None => { - ::core::fmt::Formatter::write_str(f, "None") - } - } - } - } - } - pub mod traits { - use super::runtime_types; - pub mod messages { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ProcessMessageError { - #[codec(index = 0)] - BadFormat, - #[codec(index = 1)] - Corrupt, - #[codec(index = 2)] - Unsupported, - #[codec(index = 3)] - Overweight(runtime_types::sp_weights::weight_v2::Weight), - #[codec(index = 4)] - Yield, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ProcessMessageError { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `ProcessMessageError`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ProcessMessageError::BadFormat) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ProcessMessageError::Corrupt) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ProcessMessageError::Unsupported) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ProcessMessageError::Overweight({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ProcessMessageError::Overweight.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ProcessMessageError::Yield) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `ProcessMessageError`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ProcessMessageError { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - ProcessMessageError::BadFormat => 0_usize, - ProcessMessageError::Corrupt => 0_usize, - ProcessMessageError::Unsupported => 0_usize, - ProcessMessageError::Overweight(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - ProcessMessageError::Yield => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - ProcessMessageError::BadFormat => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - ProcessMessageError::Corrupt => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - ProcessMessageError::Unsupported => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - ProcessMessageError::Overweight(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - ProcessMessageError::Yield => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for ProcessMessageError {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ProcessMessageError { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ProcessMessageError; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "BadFormat" { - return Ok(ProcessMessageError::BadFormat); - } - if value.name() == "Corrupt" { - return Ok(ProcessMessageError::Corrupt); - } - if value.name() == "Unsupported" { - return Ok(ProcessMessageError::Unsupported); - } - if value.name() == "Overweight" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - ProcessMessageError::Overweight({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Yield" { - return Ok(ProcessMessageError::Yield); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "BadFormat", - "Corrupt", - "Unsupported", - "Overweight", - "Yield", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ProcessMessageError { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::BadFormat => { - ::subxt::ext::scale_encode::Variant { - name: "BadFormat", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Corrupt => { - ::subxt::ext::scale_encode::Variant { - name: "Corrupt", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unsupported => { - ::subxt::ext::scale_encode::Variant { - name: "Unsupported", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Overweight(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Overweight", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Yield => { - ::subxt::ext::scale_encode::Variant { - name: "Yield", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ProcessMessageError { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - ProcessMessageError::BadFormat => { - ::core::fmt::Formatter::write_str(f, "BadFormat") - } - ProcessMessageError::Corrupt => { - ::core::fmt::Formatter::write_str(f, "Corrupt") - } - ProcessMessageError::Unsupported => { - ::core::fmt::Formatter::write_str(f, "Unsupported") - } - ProcessMessageError::Overweight(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Overweight", - &__self_0, - ) - } - ProcessMessageError::Yield => { - ::core::fmt::Formatter::write_str(f, "Yield") - } - } - } - } - } - pub mod misc { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct WrapperOpaque<_0>( - #[codec(compact)] - pub ::core::primitive::u32, - pub _0, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for WrapperOpaque<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - WrapperOpaque::< - _0, - >( - { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WrapperOpaque.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WrapperOpaque.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for WrapperOpaque<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.0), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.0), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike - for WrapperOpaque<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for WrapperOpaque<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = WrapperOpaque<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - WrapperOpaque( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for WrapperOpaque<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for WrapperOpaque<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WrapperOpaque(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for WrapperOpaque<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WrapperOpaque(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for WrapperOpaque<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "WrapperOpaque", - &self.0, - &&self.1, - ) - } - } - } - pub mod preimages { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Bounded<_0> { - #[codec(index = 0)] - Legacy { hash: ::subxt::utils::H256 }, - #[codec(index = 1)] - Inline( - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ), - #[codec(index = 2)] - Lookup { - hash: ::subxt::utils::H256, - len: ::core::primitive::u32, - }, - __Ignore(::core::marker::PhantomData<_0>), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for Bounded<_0> - where - ::core::marker::PhantomData< - _0, - >: ::subxt::ext::codec::Decode, - ::core::marker::PhantomData< - _0, - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Bounded`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Bounded::<_0>::Legacy { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bounded::Legacy::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Bounded::< - _0, - >::Inline({ - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bounded::Inline.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Bounded::<_0>::Lookup { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bounded::Lookup::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - len: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bounded::Lookup::len`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3usize as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Bounded::< - _0, - >::__Ignore({ - let __codec_res_edqy = <::core::marker::PhantomData< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bounded::__Ignore.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Bounded`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for Bounded<_0> - where - ::core::marker::PhantomData< - _0, - >: ::subxt::ext::codec::Encode, - ::core::marker::PhantomData< - _0, - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Bounded::Legacy { ref hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - } - Bounded::Inline(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Bounded::Lookup { ref hash, ref len } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(len)) - } - Bounded::__Ignore(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Bounded::Legacy { ref hash } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - } - Bounded::Inline(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Bounded::Lookup { ref hash, ref len } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - len, - __codec_dest_edqy, - ); - } - Bounded::__Ignore(ref aa) => { - __codec_dest_edqy - .push_byte(3usize as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for Bounded<_0> - where - ::core::marker::PhantomData< - _0, - >: ::subxt::ext::codec::Encode, - ::core::marker::PhantomData< - _0, - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for Bounded<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Bounded<_0>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Legacy" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Bounded::Legacy { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Bounded::Legacy { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - }; - } - if value.name() == "Inline" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Bounded::Inline({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Lookup" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Bounded::Lookup { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - len: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("len"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Bounded::Lookup { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - len: { - let val = *vals - .get(&Some("len")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "len".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("len"))? - }, - }) - }; - } - if value.name() == "__Ignore" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Bounded::__Ignore({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Legacy", - "Inline", - "Lookup", - "__Ignore", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for Bounded<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Legacy { hash } => { - ::subxt::ext::scale_encode::Variant { - name: "Legacy", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Inline(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Inline", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Lookup { hash, len } => { - ::subxt::ext::scale_encode::Variant { - name: "Lookup", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("len"), - len as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::__Ignore(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "__Ignore", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for Bounded<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Bounded::Legacy { hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Legacy", - "hash", - &__self_0, - ) - } - Bounded::Inline(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Inline", - &__self_0, - ) - } - Bounded::Lookup { hash: __self_0, len: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Lookup", - "hash", - __self_0, - "len", - &__self_1, - ) - } - Bounded::__Ignore(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "__Ignore", - &__self_0, - ) - } - } - } - } - } - pub mod schedule { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum DispatchTime<_0> { - #[codec(index = 0)] - At(_0), - #[codec(index = 1)] - After(_0), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for DispatchTime<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `DispatchTime`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - DispatchTime::< - _0, - >::At({ - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DispatchTime::At.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - DispatchTime::< - _0, - >::After({ - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DispatchTime::After.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `DispatchTime`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for DispatchTime<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - DispatchTime::At(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - DispatchTime::After(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - DispatchTime::At(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - DispatchTime::After(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for DispatchTime<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for DispatchTime<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DispatchTime<_0>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "At" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - DispatchTime::At({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "After" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - DispatchTime::After({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["At", "After"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for DispatchTime<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::At(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "At", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::After(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "After", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for DispatchTime<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - DispatchTime::At(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "At", - &__self_0, - ) - } - DispatchTime::After(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "After", - &__self_0, - ) - } - } - } - } - } - pub mod tokens { - use super::runtime_types; - pub mod misc { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type( - crate_path = ":: subxt :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: scale_encode" - )] - pub enum BalanceStatus { - #[codec(index = 0)] - Free, - #[codec(index = 1)] - Reserved, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BalanceStatus { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `BalanceStatus`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BalanceStatus::Free) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BalanceStatus::Reserved) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `BalanceStatus`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BalanceStatus { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - BalanceStatus::Free => 0_usize, - BalanceStatus::Reserved => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - BalanceStatus::Free => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - BalanceStatus::Reserved => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BalanceStatus {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for BalanceStatus { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BalanceStatus; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Free" { - return Ok(BalanceStatus::Free); - } - if value.name() == "Reserved" { - return Ok(BalanceStatus::Reserved); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Free", "Reserved"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for BalanceStatus { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Free => { - ::subxt::ext::scale_encode::Variant { - name: "Free", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Reserved => { - ::subxt::ext::scale_encode::Variant { - name: "Reserved", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BalanceStatus { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - BalanceStatus::Free => "Free", - BalanceStatus::Reserved => "Reserved", - }, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PalletId(pub [::core::primitive::u8; 8usize]); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PalletId { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - PalletId({ - let __codec_res_edqy = <[::core::primitive::u8; 8usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PalletId.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PalletId { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PalletId {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PalletId { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PalletId; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - PalletId({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for PalletId { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PalletId { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PalletId(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PalletId { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PalletId(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PalletId { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "PalletId", - &&self.0, - ) - } - } - } - pub mod frame_system { - use super::runtime_types; - pub mod extensions { - use super::runtime_types; - pub mod check_genesis { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CheckGenesis; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CheckGenesis { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CheckGenesis) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CheckGenesis { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CheckGenesis {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for CheckGenesis { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CheckGenesis; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(CheckGenesis) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CheckGenesis { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CheckGenesis { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CheckGenesis = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for CheckGenesis { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CheckGenesis = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CheckGenesis { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "CheckGenesis") - } - } - } - pub mod check_mortality { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CheckMortality( - pub runtime_types::sp_runtime::generic::era::Era, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CheckMortality { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - CheckMortality({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CheckMortality.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CheckMortality { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CheckMortality {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for CheckMortality { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CheckMortality; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - CheckMortality({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CheckMortality { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for CheckMortality { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CheckMortality(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for CheckMortality { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CheckMortality(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CheckMortality { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "CheckMortality", - &&self.0, - ) - } - } - } - pub mod check_non_zero_sender { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CheckNonZeroSender; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CheckNonZeroSender { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CheckNonZeroSender) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CheckNonZeroSender { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CheckNonZeroSender {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for CheckNonZeroSender { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CheckNonZeroSender; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(CheckNonZeroSender) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CheckNonZeroSender { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for CheckNonZeroSender { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CheckNonZeroSender = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for CheckNonZeroSender { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CheckNonZeroSender = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CheckNonZeroSender { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "CheckNonZeroSender") - } - } - } - pub mod check_nonce { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CheckNonce( - #[codec(compact)] - pub ::core::primitive::u32, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CheckNonce { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - CheckNonce({ - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CheckNonce.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CheckNonce { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.0) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.0) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.0) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.0) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CheckNonce {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CheckNonce { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CheckNonce; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - CheckNonce({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CheckNonce { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CheckNonce { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CheckNonce(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CheckNonce { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CheckNonce(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CheckNonce { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "CheckNonce", - &&self.0, - ) - } - } - } - pub mod check_spec_version { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CheckSpecVersion; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CheckSpecVersion { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CheckSpecVersion) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CheckSpecVersion { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CheckSpecVersion {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for CheckSpecVersion { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CheckSpecVersion; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(CheckSpecVersion) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CheckSpecVersion { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for CheckSpecVersion { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CheckSpecVersion = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for CheckSpecVersion { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CheckSpecVersion = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CheckSpecVersion { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "CheckSpecVersion") - } - } - } - pub mod check_tx_version { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CheckTxVersion; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CheckTxVersion { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CheckTxVersion) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CheckTxVersion { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CheckTxVersion {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for CheckTxVersion { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CheckTxVersion; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(CheckTxVersion) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CheckTxVersion { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for CheckTxVersion { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CheckTxVersion = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for CheckTxVersion { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CheckTxVersion = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CheckTxVersion { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "CheckTxVersion") - } - } - } - pub mod check_weight { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CheckWeight; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CheckWeight { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CheckWeight) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CheckWeight { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CheckWeight {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for CheckWeight { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CheckWeight; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(CheckWeight) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CheckWeight { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CheckWeight { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CheckWeight = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CheckWeight { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CheckWeight = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CheckWeight { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "CheckWeight") - } - } - } - } - pub mod limits { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BlockLength { - pub max: runtime_types::frame_support::dispatch::PerDispatchClass< - ::core::primitive::u32, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BlockLength { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(BlockLength { - max: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BlockLength::max`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BlockLength { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.max) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.max, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.max) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.max, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BlockLength {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BlockLength { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BlockLength; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BlockLength { - max: { - let val = *vals - .get(&Some("max")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(BlockLength { - max: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for BlockLength { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BlockLength { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BlockLength { max } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("max"), - max as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BlockLength { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BlockLength { max } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("max"), - max as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BlockLength { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "BlockLength", - "max", - &&self.max, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BlockWeights { - pub base_block: runtime_types::sp_weights::weight_v2::Weight, - pub max_block: runtime_types::sp_weights::weight_v2::Weight, - pub per_class: runtime_types::frame_support::dispatch::PerDispatchClass< - runtime_types::frame_system::limits::WeightsPerClass, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BlockWeights { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(BlockWeights { - base_block: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BlockWeights::base_block`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_block: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BlockWeights::max_block`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - per_class: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BlockWeights::per_class`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BlockWeights { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.base_block), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_block), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.per_class), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.base_block, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_block, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.per_class, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BlockWeights {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BlockWeights { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BlockWeights; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BlockWeights { - base_block: { - let val = *vals - .get(&Some("base_block")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "base_block".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("base_block"))? - }, - max_block: { - let val = *vals - .get(&Some("max_block")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_block".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_block"))? - }, - per_class: { - let val = *vals - .get(&Some("per_class")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "per_class".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("per_class"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(BlockWeights { - base_block: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("base_block"))? - }, - max_block: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_block"))? - }, - per_class: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("per_class"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for BlockWeights { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BlockWeights { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BlockWeights { base_block, max_block, per_class } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("base_block"), - base_block as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_block"), - max_block as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("per_class"), - per_class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BlockWeights { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BlockWeights { base_block, max_block, per_class } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("base_block"), - base_block as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_block"), - max_block as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("per_class"), - per_class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BlockWeights { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "BlockWeights", - "base_block", - &self.base_block, - "max_block", - &self.max_block, - "per_class", - &&self.per_class, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct WeightsPerClass { - pub base_extrinsic: runtime_types::sp_weights::weight_v2::Weight, - pub max_extrinsic: ::core::option::Option< - 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, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for WeightsPerClass { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(WeightsPerClass { - base_extrinsic: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `WeightsPerClass::base_extrinsic`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_extrinsic: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::sp_weights::weight_v2::Weight, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WeightsPerClass::max_extrinsic`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_total: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::sp_weights::weight_v2::Weight, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WeightsPerClass::max_total`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - reserved: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::sp_weights::weight_v2::Weight, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WeightsPerClass::reserved`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for WeightsPerClass { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.base_extrinsic), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_extrinsic), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_total), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.reserved), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.base_extrinsic, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_extrinsic, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_total, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.reserved, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for WeightsPerClass {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for WeightsPerClass { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = WeightsPerClass; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(WeightsPerClass { - base_extrinsic: { - let val = *vals - .get(&Some("base_extrinsic")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "base_extrinsic".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("base_extrinsic"))? - }, - max_extrinsic: { - let val = *vals - .get(&Some("max_extrinsic")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_extrinsic".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_extrinsic"))? - }, - max_total: { - let val = *vals - .get(&Some("max_total")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_total".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_total"))? - }, - reserved: { - let val = *vals - .get(&Some("reserved")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reserved".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reserved"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(WeightsPerClass { - base_extrinsic: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("base_extrinsic"))? - }, - max_extrinsic: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_extrinsic"))? - }, - max_total: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_total"))? - }, - reserved: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reserved"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for WeightsPerClass { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for WeightsPerClass { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WeightsPerClass { - base_extrinsic, - max_extrinsic, - max_total, - reserved, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("base_extrinsic"), - base_extrinsic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_extrinsic"), - max_extrinsic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_total"), - max_total as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("reserved"), - reserved as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for WeightsPerClass { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let WeightsPerClass { - base_extrinsic, - max_extrinsic, - max_total, - reserved, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("base_extrinsic"), - base_extrinsic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_extrinsic"), - max_extrinsic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_total"), - max_total as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("reserved"), - reserved as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for WeightsPerClass { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "WeightsPerClass", - "base_extrinsic", - &self.base_extrinsic, - "max_extrinsic", - &self.max_extrinsic, - "max_total", - &self.max_total, - "reserved", - &&self.reserved, - ) - } - } - } - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - remark { remark: ::std::vec::Vec<::core::primitive::u8> }, - #[codec(index = 1)] - set_heap_pages { pages: ::core::primitive::u64 }, - #[codec(index = 2)] - set_code { code: ::std::vec::Vec<::core::primitive::u8> }, - #[codec(index = 3)] - set_code_without_checks { - code: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 4)] - set_storage { - items: ::std::vec::Vec< - ( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, - ), - >, - }, - #[codec(index = 5)] - kill_storage { - keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - }, - #[codec(index = 6)] - kill_prefix { - prefix: ::std::vec::Vec<::core::primitive::u8>, - subkeys: ::core::primitive::u32, - }, - #[codec(index = 7)] - remark_with_event { - remark: ::std::vec::Vec<::core::primitive::u8>, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::remark { - remark: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::remark::remark`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_heap_pages { - pages: { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_heap_pages::pages`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_code { - code: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_code::code`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_code_without_checks { - code: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_code_without_checks::code`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_storage { - items: { - let __codec_res_edqy = <::std::vec::Vec< - ( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_storage::items`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::kill_storage { - keys: { - let __codec_res_edqy = <::std::vec::Vec< - ::std::vec::Vec<::core::primitive::u8>, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::kill_storage::keys`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::kill_prefix { - prefix: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::kill_prefix::prefix`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - subkeys: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::kill_prefix::subkeys`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::remark_with_event { - remark: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::remark_with_event::remark`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::remark { ref remark } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(remark), - ) - } - Call::set_heap_pages { ref pages } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pages), - ) - } - Call::set_code { ref code } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(code), - ) - } - Call::set_code_without_checks { ref code } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(code), - ) - } - Call::set_storage { ref items } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(items), - ) - } - Call::kill_storage { ref keys } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(keys), - ) - } - Call::kill_prefix { ref prefix, ref subkeys } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(prefix), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(subkeys), - ) - } - Call::remark_with_event { ref remark } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(remark), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::remark { ref remark } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - remark, - __codec_dest_edqy, - ); - } - Call::set_heap_pages { ref pages } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pages, - __codec_dest_edqy, - ); - } - Call::set_code { ref code } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - code, - __codec_dest_edqy, - ); - } - Call::set_code_without_checks { ref code } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - code, - __codec_dest_edqy, - ); - } - Call::set_storage { ref items } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - items, - __codec_dest_edqy, - ); - } - Call::kill_storage { ref keys } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - keys, - __codec_dest_edqy, - ); - } - Call::kill_prefix { ref prefix, ref subkeys } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - prefix, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - subkeys, - __codec_dest_edqy, - ); - } - Call::remark_with_event { ref remark } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - remark, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "remark" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::remark { - remark: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("remark"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::remark { - remark: { - let val = *vals - .get(&Some("remark")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "remark".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("remark"))? - }, - }) - }; - } - if value.name() == "set_heap_pages" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_heap_pages { - pages: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pages"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_heap_pages { - pages: { - let val = *vals - .get(&Some("pages")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pages".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pages"))? - }, - }) - }; - } - if value.name() == "set_code" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_code { - code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("code"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_code { - code: { - let val = *vals - .get(&Some("code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "code".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("code"))? - }, - }) - }; - } - if value.name() == "set_code_without_checks" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_code_without_checks { - code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("code"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_code_without_checks { - code: { - let val = *vals - .get(&Some("code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "code".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("code"))? - }, - }) - }; - } - if value.name() == "set_storage" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_storage { - items: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("items"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_storage { - items: { - let val = *vals - .get(&Some("items")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "items".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("items"))? - }, - }) - }; - } - if value.name() == "kill_storage" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::kill_storage { - keys: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("keys"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::kill_storage { - keys: { - let val = *vals - .get(&Some("keys")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "keys".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("keys"))? - }, - }) - }; - } - if value.name() == "kill_prefix" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::kill_prefix { - prefix: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prefix"))? - }, - subkeys: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("subkeys"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::kill_prefix { - prefix: { - let val = *vals - .get(&Some("prefix")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prefix".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prefix"))? - }, - subkeys: { - let val = *vals - .get(&Some("subkeys")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "subkeys".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("subkeys"))? - }, - }) - }; - } - if value.name() == "remark_with_event" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::remark_with_event { - remark: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("remark"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::remark_with_event { - remark: { - let val = *vals - .get(&Some("remark")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "remark".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("remark"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "remark", - "set_heap_pages", - "set_code", - "set_code_without_checks", - "set_storage", - "kill_storage", - "kill_prefix", - "remark_with_event", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::remark { remark } => { - ::subxt::ext::scale_encode::Variant { - name: "remark", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("remark"), - remark as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_heap_pages { pages } => { - ::subxt::ext::scale_encode::Variant { - name: "set_heap_pages", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pages"), - pages as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_code { code } => { - ::subxt::ext::scale_encode::Variant { - name: "set_code", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("code"), - code as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_code_without_checks { code } => { - ::subxt::ext::scale_encode::Variant { - name: "set_code_without_checks", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("code"), - code as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_storage { items } => { - ::subxt::ext::scale_encode::Variant { - name: "set_storage", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("items"), - items as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::kill_storage { keys } => { - ::subxt::ext::scale_encode::Variant { - name: "kill_storage", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("keys"), - keys as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::kill_prefix { prefix, subkeys } => { - ::subxt::ext::scale_encode::Variant { - name: "kill_prefix", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("prefix"), - prefix as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("subkeys"), - subkeys as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::remark_with_event { remark } => { - ::subxt::ext::scale_encode::Variant { - name: "remark_with_event", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("remark"), - remark as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::remark { remark: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "remark", - "remark", - &__self_0, - ) - } - Call::set_heap_pages { pages: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_heap_pages", - "pages", - &__self_0, - ) - } - Call::set_code { code: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_code", - "code", - &__self_0, - ) - } - Call::set_code_without_checks { code: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_code_without_checks", - "code", - &__self_0, - ) - } - Call::set_storage { items: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_storage", - "items", - &__self_0, - ) - } - Call::kill_storage { keys: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "kill_storage", - "keys", - &__self_0, - ) - } - Call::kill_prefix { - prefix: __self_0, - subkeys: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "kill_prefix", - "prefix", - __self_0, - "subkeys", - &__self_1, - ) - } - Call::remark_with_event { remark: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "remark_with_event", - "remark", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - InvalidSpecName, - #[codec(index = 1)] - SpecVersionNeedsToIncrease, - #[codec(index = 2)] - FailedToExtractRuntimeVersion, - #[codec(index = 3)] - NonDefaultComposite, - #[codec(index = 4)] - NonZeroRefCount, - #[codec(index = 5)] - CallFiltered, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidSpecName) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::SpecVersionNeedsToIncrease, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::FailedToExtractRuntimeVersion, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NonDefaultComposite) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NonZeroRefCount) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CallFiltered) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::InvalidSpecName => 0_usize, - Error::SpecVersionNeedsToIncrease => 0_usize, - Error::FailedToExtractRuntimeVersion => 0_usize, - Error::NonDefaultComposite => 0_usize, - Error::NonZeroRefCount => 0_usize, - Error::CallFiltered => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::InvalidSpecName => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::SpecVersionNeedsToIncrease => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::FailedToExtractRuntimeVersion => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::NonDefaultComposite => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::NonZeroRefCount => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::CallFiltered => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "InvalidSpecName" { - return Ok(Error::InvalidSpecName); - } - if value.name() == "SpecVersionNeedsToIncrease" { - return Ok(Error::SpecVersionNeedsToIncrease); - } - if value.name() == "FailedToExtractRuntimeVersion" { - return Ok(Error::FailedToExtractRuntimeVersion); - } - if value.name() == "NonDefaultComposite" { - return Ok(Error::NonDefaultComposite); - } - if value.name() == "NonZeroRefCount" { - return Ok(Error::NonZeroRefCount); - } - if value.name() == "CallFiltered" { - return Ok(Error::CallFiltered); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "InvalidSpecName", - "SpecVersionNeedsToIncrease", - "FailedToExtractRuntimeVersion", - "NonDefaultComposite", - "NonZeroRefCount", - "CallFiltered", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::InvalidSpecName => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidSpecName", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SpecVersionNeedsToIncrease => { - ::subxt::ext::scale_encode::Variant { - name: "SpecVersionNeedsToIncrease", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FailedToExtractRuntimeVersion => { - ::subxt::ext::scale_encode::Variant { - name: "FailedToExtractRuntimeVersion", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NonDefaultComposite => { - ::subxt::ext::scale_encode::Variant { - name: "NonDefaultComposite", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NonZeroRefCount => { - ::subxt::ext::scale_encode::Variant { - name: "NonZeroRefCount", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CallFiltered => { - ::subxt::ext::scale_encode::Variant { - name: "CallFiltered", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::InvalidSpecName => "InvalidSpecName", - Error::SpecVersionNeedsToIncrease => { - "SpecVersionNeedsToIncrease" - } - Error::FailedToExtractRuntimeVersion => { - "FailedToExtractRuntimeVersion" - } - Error::NonDefaultComposite => "NonDefaultComposite", - Error::NonZeroRefCount => "NonZeroRefCount", - Error::CallFiltered => "CallFiltered", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - ExtrinsicSuccess { - dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, - }, - #[codec(index = 1)] - ExtrinsicFailed { - dispatch_error: runtime_types::sp_runtime::DispatchError, - dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, - }, - #[codec(index = 2)] - CodeUpdated, - #[codec(index = 3)] - NewAccount { account: ::subxt::utils::AccountId32 }, - #[codec(index = 4)] - KilledAccount { account: ::subxt::utils::AccountId32 }, - #[codec(index = 5)] - Remarked { - sender: ::subxt::utils::AccountId32, - hash: ::subxt::utils::H256, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ExtrinsicSuccess { - dispatch_info: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::ExtrinsicSuccess::dispatch_info`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ExtrinsicFailed { - dispatch_error: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::ExtrinsicFailed::dispatch_error`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - dispatch_info: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::ExtrinsicFailed::dispatch_info`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::CodeUpdated) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::NewAccount { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NewAccount::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::KilledAccount { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::KilledAccount::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Remarked { - sender: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Remarked::sender`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Remarked::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::ExtrinsicSuccess { ref dispatch_info } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dispatch_info), - ) - } - Event::ExtrinsicFailed { - ref dispatch_error, - ref dispatch_info, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dispatch_error), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dispatch_info), - ) - } - Event::CodeUpdated => 0_usize, - Event::NewAccount { ref account } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(account), - ) - } - Event::KilledAccount { ref account } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(account), - ) - } - Event::Remarked { ref sender, ref hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(sender), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::ExtrinsicSuccess { ref dispatch_info } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - dispatch_info, - __codec_dest_edqy, - ); - } - Event::ExtrinsicFailed { - ref dispatch_error, - ref dispatch_info, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - dispatch_error, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - dispatch_info, - __codec_dest_edqy, - ); - } - Event::CodeUpdated => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Event::NewAccount { ref account } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - account, - __codec_dest_edqy, - ); - } - Event::KilledAccount { ref account } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - account, - __codec_dest_edqy, - ); - } - Event::Remarked { ref sender, ref hash } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - sender, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "ExtrinsicSuccess" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::ExtrinsicSuccess { - dispatch_info: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("dispatch_info"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::ExtrinsicSuccess { - dispatch_info: { - let val = *vals - .get(&Some("dispatch_info")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dispatch_info".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("dispatch_info"))? - }, - }) - }; - } - if value.name() == "ExtrinsicFailed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::ExtrinsicFailed { - dispatch_error: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("dispatch_error"))? - }, - dispatch_info: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("dispatch_info"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::ExtrinsicFailed { - dispatch_error: { - let val = *vals - .get(&Some("dispatch_error")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dispatch_error".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("dispatch_error"))? - }, - dispatch_info: { - let val = *vals - .get(&Some("dispatch_info")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dispatch_info".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("dispatch_info"))? - }, - }) - }; - } - if value.name() == "CodeUpdated" { - return Ok(Event::CodeUpdated); - } - if value.name() == "NewAccount" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::NewAccount { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::NewAccount { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - }; - } - if value.name() == "KilledAccount" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::KilledAccount { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::KilledAccount { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - }; - } - if value.name() == "Remarked" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Remarked { - sender: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Remarked { - sender: { - let val = *vals - .get(&Some("sender")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sender".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "ExtrinsicSuccess", - "ExtrinsicFailed", - "CodeUpdated", - "NewAccount", - "KilledAccount", - "Remarked", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::ExtrinsicSuccess { dispatch_info } => { - ::subxt::ext::scale_encode::Variant { - name: "ExtrinsicSuccess", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dispatch_info"), - dispatch_info - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExtrinsicFailed { dispatch_error, dispatch_info } => { - ::subxt::ext::scale_encode::Variant { - name: "ExtrinsicFailed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dispatch_error"), - dispatch_error - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dispatch_info"), - dispatch_info - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CodeUpdated => { - ::subxt::ext::scale_encode::Variant { - name: "CodeUpdated", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NewAccount { account } => { - ::subxt::ext::scale_encode::Variant { - name: "NewAccount", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::KilledAccount { account } => { - ::subxt::ext::scale_encode::Variant { - name: "KilledAccount", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Remarked { sender, hash } => { - ::subxt::ext::scale_encode::Variant { - name: "Remarked", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::ExtrinsicSuccess { dispatch_info: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ExtrinsicSuccess", - "dispatch_info", - &__self_0, - ) - } - Event::ExtrinsicFailed { - dispatch_error: __self_0, - dispatch_info: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ExtrinsicFailed", - "dispatch_error", - __self_0, - "dispatch_info", - &__self_1, - ) - } - Event::CodeUpdated => { - ::core::fmt::Formatter::write_str(f, "CodeUpdated") - } - Event::NewAccount { account: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "NewAccount", - "account", - &__self_0, - ) - } - Event::KilledAccount { account: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "KilledAccount", - "account", - &__self_0, - ) - } - Event::Remarked { sender: __self_0, hash: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Remarked", - "sender", - __self_0, - "hash", - &__self_1, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AccountInfo<_0, _1> { - pub nonce: _0, - pub consumers: ::core::primitive::u32, - pub providers: ::core::primitive::u32, - pub sufficients: ::core::primitive::u32, - pub data: _1, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for AccountInfo<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(AccountInfo::<_0, _1> { - nonce: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountInfo::nonce`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - consumers: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountInfo::consumers`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - providers: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountInfo::providers`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - sufficients: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountInfo::sufficients`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - data: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountInfo::data`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for AccountInfo<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.nonce), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.consumers), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.providers), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.sufficients), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.data), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.nonce, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.consumers, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.providers, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.sufficients, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.data, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike for AccountInfo<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for AccountInfo<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AccountInfo<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AccountInfo { - nonce: { - let val = *vals - .get(&Some("nonce")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nonce".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nonce"))? - }, - consumers: { - let val = *vals - .get(&Some("consumers")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "consumers".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("consumers"))? - }, - providers: { - let val = *vals - .get(&Some("providers")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "providers".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("providers"))? - }, - sufficients: { - let val = *vals - .get(&Some("sufficients")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sufficients".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sufficients"))? - }, - data: { - let val = *vals - .get(&Some("data")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "data".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(AccountInfo { - nonce: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nonce"))? - }, - consumers: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("consumers"))? - }, - providers: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("providers"))? - }, - sufficients: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sufficients"))? - }, - data: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for AccountInfo<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for AccountInfo<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AccountInfo { - nonce, - consumers, - providers, - sufficients, - data, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("nonce"), - nonce as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("consumers"), - consumers as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("providers"), - providers as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("sufficients"), - sufficients as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("data"), - data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for AccountInfo<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AccountInfo { - nonce, - consumers, - providers, - sufficients, - data, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("nonce"), - nonce as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("consumers"), - consumers as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("providers"), - providers as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("sufficients"), - sufficients as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("data"), - data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for AccountInfo<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "AccountInfo", - "nonce", - &self.nonce, - "consumers", - &self.consumers, - "providers", - &self.providers, - "sufficients", - &self.sufficients, - "data", - &&self.data, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct EventRecord<_0, _1> { - pub phase: runtime_types::frame_system::Phase, - pub event: _0, - pub topics: ::std::vec::Vec<_1>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for EventRecord<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - ::std::vec::Vec<_1>: ::subxt::ext::codec::Decode, - ::std::vec::Vec<_1>: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(EventRecord::<_0, _1> { - phase: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `EventRecord::phase`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - event: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `EventRecord::event`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - topics: { - let __codec_res_edqy = <::std::vec::Vec< - _1, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `EventRecord::topics`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for EventRecord<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_1>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_1>: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.phase), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.event), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.topics), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.phase, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.event, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.topics, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike for EventRecord<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_1>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_1>: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for EventRecord<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = EventRecord<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(EventRecord { - phase: { - let val = *vals - .get(&Some("phase")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "phase".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("phase"))? - }, - event: { - let val = *vals - .get(&Some("event")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "event".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("event"))? - }, - topics: { - let val = *vals - .get(&Some("topics")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "topics".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("topics"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(EventRecord { - phase: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("phase"))? - }, - event: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("event"))? - }, - topics: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("topics"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for EventRecord<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for EventRecord<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EventRecord { phase, event, topics } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("phase"), - phase as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("event"), - event as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("topics"), - topics as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for EventRecord<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EventRecord { phase, event, topics } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("phase"), - phase as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("event"), - event as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("topics"), - topics as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for EventRecord<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "EventRecord", - "phase", - &self.phase, - "event", - &self.event, - "topics", - &&self.topics, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct LastRuntimeUpgradeInfo { - #[codec(compact)] - pub spec_version: ::core::primitive::u32, - pub spec_name: ::std::string::String, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for LastRuntimeUpgradeInfo { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(LastRuntimeUpgradeInfo { - spec_version: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `LastRuntimeUpgradeInfo::spec_version`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - spec_name: { - let __codec_res_edqy = <::std::string::String as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `LastRuntimeUpgradeInfo::spec_name`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for LastRuntimeUpgradeInfo { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.spec_version), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.spec_name), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.spec_version), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.spec_name, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for LastRuntimeUpgradeInfo {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for LastRuntimeUpgradeInfo { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = LastRuntimeUpgradeInfo; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(LastRuntimeUpgradeInfo { - spec_version: { - let val = *vals - .get(&Some("spec_version")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "spec_version".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("spec_version"))? - }, - spec_name: { - let val = *vals - .get(&Some("spec_name")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "spec_name".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("spec_name"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(LastRuntimeUpgradeInfo { - spec_version: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("spec_version"))? - }, - spec_name: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("spec_name"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for LastRuntimeUpgradeInfo { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for LastRuntimeUpgradeInfo { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let LastRuntimeUpgradeInfo { spec_version, spec_name } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("spec_version"), - spec_version - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("spec_name"), - spec_name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for LastRuntimeUpgradeInfo { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let LastRuntimeUpgradeInfo { spec_version, spec_name } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("spec_version"), - spec_version - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("spec_name"), - spec_name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for LastRuntimeUpgradeInfo { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "LastRuntimeUpgradeInfo", - "spec_version", - &self.spec_version, - "spec_name", - &&self.spec_name, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Phase { - #[codec(index = 0)] - ApplyExtrinsic(::core::primitive::u32), - #[codec(index = 1)] - Finalization, - #[codec(index = 2)] - Initialization, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Phase { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Phase`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Phase::ApplyExtrinsic({ - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Phase::ApplyExtrinsic.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Phase::Finalization) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Phase::Initialization) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Phase`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Phase { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Phase::ApplyExtrinsic(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Phase::Finalization => 0_usize, - Phase::Initialization => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Phase::ApplyExtrinsic(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Phase::Finalization => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Phase::Initialization => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Phase {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Phase { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Phase; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "ApplyExtrinsic" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Phase::ApplyExtrinsic({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Finalization" { - return Ok(Phase::Finalization); - } - if value.name() == "Initialization" { - return Ok(Phase::Initialization); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "ApplyExtrinsic", - "Finalization", - "Initialization", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Phase { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::ApplyExtrinsic(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ApplyExtrinsic", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Finalization => { - ::subxt::ext::scale_encode::Variant { - name: "Finalization", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Initialization => { - ::subxt::ext::scale_encode::Variant { - name: "Initialization", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Phase { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Phase::ApplyExtrinsic(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ApplyExtrinsic", - &__self_0, - ) - } - Phase::Finalization => { - ::core::fmt::Formatter::write_str(f, "Finalization") - } - Phase::Initialization => { - ::core::fmt::Formatter::write_str(f, "Initialization") - } - } - } - } - } - pub mod pallet_babe { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - 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)] - 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)] - plan_config_change { - config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::report_equivocation { - equivocation_proof: { - let __codec_res_edqy = <::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, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::report_equivocation::equivocation_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - key_owner_proof: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::report_equivocation::key_owner_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::report_equivocation_unsigned { - equivocation_proof: { - let __codec_res_edqy = <::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, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::report_equivocation_unsigned::equivocation_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - key_owner_proof: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::report_equivocation_unsigned::key_owner_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::plan_config_change { - config: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::plan_config_change::config`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::report_equivocation { - ref equivocation_proof, - ref key_owner_proof, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(equivocation_proof), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(key_owner_proof), - ) - } - Call::report_equivocation_unsigned { - ref equivocation_proof, - ref key_owner_proof, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(equivocation_proof), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(key_owner_proof), - ) - } - Call::plan_config_change { ref config } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(config), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::report_equivocation { - ref equivocation_proof, - ref key_owner_proof, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - equivocation_proof, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - key_owner_proof, - __codec_dest_edqy, - ); - } - Call::report_equivocation_unsigned { - ref equivocation_proof, - ref key_owner_proof, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - equivocation_proof, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - key_owner_proof, - __codec_dest_edqy, - ); - } - Call::plan_config_change { ref config } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - config, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "report_equivocation" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::report_equivocation { - equivocation_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation_proof"))? - }, - key_owner_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::report_equivocation { - equivocation_proof: { - let val = *vals - .get(&Some("equivocation_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "equivocation_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation_proof"))? - }, - key_owner_proof: { - let val = *vals - .get(&Some("key_owner_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "key_owner_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - }; - } - if value.name() == "report_equivocation_unsigned" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::report_equivocation_unsigned { - equivocation_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation_proof"))? - }, - key_owner_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::report_equivocation_unsigned { - equivocation_proof: { - let val = *vals - .get(&Some("equivocation_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "equivocation_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation_proof"))? - }, - key_owner_proof: { - let val = *vals - .get(&Some("key_owner_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "key_owner_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - }; - } - if value.name() == "plan_config_change" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::plan_config_change { - config: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("config"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::plan_config_change { - config: { - let val = *vals - .get(&Some("config")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "config".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("config"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "report_equivocation", - "report_equivocation_unsigned", - "plan_config_change", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::report_equivocation { - equivocation_proof, - key_owner_proof, - } => { - ::subxt::ext::scale_encode::Variant { - name: "report_equivocation", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("equivocation_proof"), - equivocation_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("key_owner_proof"), - key_owner_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::report_equivocation_unsigned { - equivocation_proof, - key_owner_proof, - } => { - ::subxt::ext::scale_encode::Variant { - name: "report_equivocation_unsigned", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("equivocation_proof"), - equivocation_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("key_owner_proof"), - key_owner_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::plan_config_change { config } => { - ::subxt::ext::scale_encode::Variant { - name: "plan_config_change", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("config"), - config as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::report_equivocation { - equivocation_proof: __self_0, - key_owner_proof: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "report_equivocation", - "equivocation_proof", - __self_0, - "key_owner_proof", - &__self_1, - ) - } - Call::report_equivocation_unsigned { - equivocation_proof: __self_0, - key_owner_proof: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "report_equivocation_unsigned", - "equivocation_proof", - __self_0, - "key_owner_proof", - &__self_1, - ) - } - Call::plan_config_change { config: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "plan_config_change", - "config", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - InvalidEquivocationProof, - #[codec(index = 1)] - InvalidKeyOwnershipProof, - #[codec(index = 2)] - DuplicateOffenceReport, - #[codec(index = 3)] - InvalidConfiguration, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidEquivocationProof) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidKeyOwnershipProof) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::DuplicateOffenceReport) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidConfiguration) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::InvalidEquivocationProof => 0_usize, - Error::InvalidKeyOwnershipProof => 0_usize, - Error::DuplicateOffenceReport => 0_usize, - Error::InvalidConfiguration => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::InvalidEquivocationProof => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::InvalidKeyOwnershipProof => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::DuplicateOffenceReport => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::InvalidConfiguration => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "InvalidEquivocationProof" { - return Ok(Error::InvalidEquivocationProof); - } - if value.name() == "InvalidKeyOwnershipProof" { - return Ok(Error::InvalidKeyOwnershipProof); - } - if value.name() == "DuplicateOffenceReport" { - return Ok(Error::DuplicateOffenceReport); - } - if value.name() == "InvalidConfiguration" { - return Ok(Error::InvalidConfiguration); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "InvalidEquivocationProof", - "InvalidKeyOwnershipProof", - "DuplicateOffenceReport", - "InvalidConfiguration", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::InvalidEquivocationProof => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidEquivocationProof", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidKeyOwnershipProof => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidKeyOwnershipProof", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DuplicateOffenceReport => { - ::subxt::ext::scale_encode::Variant { - name: "DuplicateOffenceReport", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidConfiguration => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidConfiguration", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::InvalidEquivocationProof => { - "InvalidEquivocationProof" - } - Error::InvalidKeyOwnershipProof => { - "InvalidKeyOwnershipProof" - } - Error::DuplicateOffenceReport => "DuplicateOffenceReport", - Error::InvalidConfiguration => "InvalidConfiguration", - }, - ) - } - } - } - } - pub mod pallet_bags_list { - use super::runtime_types; - pub mod list { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Bag { - pub head: ::core::option::Option<::subxt::utils::AccountId32>, - pub tail: ::core::option::Option<::subxt::utils::AccountId32>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Bag { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Bag { - head: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bag::head`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tail: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bag::tail`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Bag { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.head), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.tail), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.head, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.tail, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Bag {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Bag { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Bag; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Bag { - head: { - let val = *vals - .get(&Some("head")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "head".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("head"))? - }, - tail: { - let val = *vals - .get(&Some("tail")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tail".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tail"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Bag { - head: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("head"))? - }, - tail: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tail"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Bag { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Bag { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Bag { head, tail } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("head"), - head as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tail"), - tail as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Bag { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Bag { head, tail } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("head"), - head as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tail"), - tail as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Bag { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Bag", - "head", - &self.head, - "tail", - &&self.tail, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ListError { - #[codec(index = 0)] - Duplicate, - #[codec(index = 1)] - NotHeavier, - #[codec(index = 2)] - NotInSameBag, - #[codec(index = 3)] - NodeNotFound, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ListError { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `ListError`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ListError::Duplicate) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ListError::NotHeavier) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ListError::NotInSameBag) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ListError::NodeNotFound) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `ListError`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ListError { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - ListError::Duplicate => 0_usize, - ListError::NotHeavier => 0_usize, - ListError::NotInSameBag => 0_usize, - ListError::NodeNotFound => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - ListError::Duplicate => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - ListError::NotHeavier => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - ListError::NotInSameBag => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - ListError::NodeNotFound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ListError {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ListError { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ListError; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Duplicate" { - return Ok(ListError::Duplicate); - } - if value.name() == "NotHeavier" { - return Ok(ListError::NotHeavier); - } - if value.name() == "NotInSameBag" { - return Ok(ListError::NotInSameBag); - } - if value.name() == "NodeNotFound" { - return Ok(ListError::NodeNotFound); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Duplicate", - "NotHeavier", - "NotInSameBag", - "NodeNotFound", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ListError { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Duplicate => { - ::subxt::ext::scale_encode::Variant { - name: "Duplicate", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotHeavier => { - ::subxt::ext::scale_encode::Variant { - name: "NotHeavier", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotInSameBag => { - ::subxt::ext::scale_encode::Variant { - name: "NotInSameBag", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NodeNotFound => { - ::subxt::ext::scale_encode::Variant { - name: "NodeNotFound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ListError { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - ListError::Duplicate => "Duplicate", - ListError::NotHeavier => "NotHeavier", - ListError::NotInSameBag => "NotInSameBag", - ListError::NodeNotFound => "NodeNotFound", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Node { - pub id: ::subxt::utils::AccountId32, - pub prev: ::core::option::Option<::subxt::utils::AccountId32>, - pub next: ::core::option::Option<::subxt::utils::AccountId32>, - pub bag_upper: ::core::primitive::u64, - pub score: ::core::primitive::u64, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Node { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Node { - id: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Node::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - prev: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Node::prev`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - next: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Node::next`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - bag_upper: { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Node::bag_upper`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - score: { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Node::score`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Node { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.prev), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.next), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.bag_upper), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.score), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.prev, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.next, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.bag_upper, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.score, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Node {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Node { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Node; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Node { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - prev: { - let val = *vals - .get(&Some("prev")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prev".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prev"))? - }, - next: { - let val = *vals - .get(&Some("next")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "next".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("next"))? - }, - bag_upper: { - let val = *vals - .get(&Some("bag_upper")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bag_upper".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bag_upper"))? - }, - score: { - let val = *vals - .get(&Some("score")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "score".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("score"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(Node { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - prev: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prev"))? - }, - next: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("next"))? - }, - bag_upper: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bag_upper"))? - }, - score: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("score"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Node { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Node { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Node { id, prev, next, bag_upper, score } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prev"), - prev as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("next"), - next as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bag_upper"), - bag_upper as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("score"), - score as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Node { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Node { id, prev, next, bag_upper, score } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prev"), - prev as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("next"), - next as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bag_upper"), - bag_upper as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("score"), - score as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Node { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "Node", - "id", - &self.id, - "prev", - &self.prev, - "next", - &self.next, - "bag_upper", - &self.bag_upper, - "score", - &&self.score, - ) - } - } - } - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - rebag { - dislocated: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 1)] - put_in_front_of { - lighter: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::rebag { - dislocated: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::rebag::dislocated`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::put_in_front_of { - lighter: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::put_in_front_of::lighter`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::rebag { ref dislocated } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dislocated), - ) - } - Call::put_in_front_of { ref lighter } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(lighter), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::rebag { ref dislocated } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - dislocated, - __codec_dest_edqy, - ); - } - Call::put_in_front_of { ref lighter } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - lighter, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "rebag" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::rebag { - dislocated: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dislocated"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::rebag { - dislocated: { - let val = *vals - .get(&Some("dislocated")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dislocated".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dislocated"))? - }, - }) - }; - } - if value.name() == "put_in_front_of" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::put_in_front_of { - lighter: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("lighter"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::put_in_front_of { - lighter: { - let val = *vals - .get(&Some("lighter")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "lighter".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("lighter"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["rebag", "put_in_front_of"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::rebag { dislocated } => { - ::subxt::ext::scale_encode::Variant { - name: "rebag", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dislocated"), - dislocated as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::put_in_front_of { lighter } => { - ::subxt::ext::scale_encode::Variant { - name: "put_in_front_of", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("lighter"), - lighter as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::rebag { dislocated: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "rebag", - "dislocated", - &__self_0, - ) - } - Call::put_in_front_of { lighter: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "put_in_front_of", - "lighter", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - List(runtime_types::pallet_bags_list::list::ListError), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::List({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Error::List.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::List(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::List(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "List" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Error::List({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["List"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::List(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "List", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Error::List(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "List", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - Rebagged { - who: ::subxt::utils::AccountId32, - from: ::core::primitive::u64, - to: ::core::primitive::u64, - }, - #[codec(index = 1)] - ScoreUpdated { - who: ::subxt::utils::AccountId32, - new_score: ::core::primitive::u64, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Rebagged { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Rebagged::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - from: { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Rebagged::from`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - to: { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Rebagged::to`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ScoreUpdated { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ScoreUpdated::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_score: { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ScoreUpdated::new_score`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::Rebagged { ref who, ref from, ref to } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(from), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(to)) - } - Event::ScoreUpdated { ref who, ref new_score } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(new_score), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::Rebagged { ref who, ref from, ref to } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - from, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - to, - __codec_dest_edqy, - ); - } - Event::ScoreUpdated { ref who, ref new_score } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - new_score, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Rebagged" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::Rebagged { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - from: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - to: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Rebagged { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - from: { - let val = *vals - .get(&Some("from")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "from".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - to: { - let val = *vals - .get(&Some("to")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "to".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - }) - }; - } - if value.name() == "ScoreUpdated" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::ScoreUpdated { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - new_score: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_score"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::ScoreUpdated { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - new_score: { - let val = *vals - .get(&Some("new_score")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_score".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_score"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Rebagged", "ScoreUpdated"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Rebagged { who, from, to } => { - ::subxt::ext::scale_encode::Variant { - name: "Rebagged", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("from"), - from as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ScoreUpdated { who, new_score } => { - ::subxt::ext::scale_encode::Variant { - name: "ScoreUpdated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_score"), - new_score as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::Rebagged { - who: __self_0, - from: __self_1, - to: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Rebagged", - "who", - __self_0, - "from", - __self_1, - "to", - &__self_2, - ) - } - Event::ScoreUpdated { - who: __self_0, - new_score: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ScoreUpdated", - "who", - __self_0, - "new_score", - &__self_1, - ) - } - } - } - } - } - } - pub mod pallet_balances { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - transfer_allow_death { - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 1)] - set_balance_deprecated { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - #[codec(compact)] - new_free: ::core::primitive::u128, - #[codec(compact)] - old_reserved: ::core::primitive::u128, - }, - #[codec(index = 2)] - 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)] - transfer_keep_alive { - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 4)] - transfer_all { - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - keep_alive: ::core::primitive::bool, - }, - #[codec(index = 5)] - force_unreserve { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - amount: ::core::primitive::u128, - }, - #[codec(index = 6)] - upgrade_accounts { - who: ::std::vec::Vec<::subxt::utils::AccountId32>, - }, - #[codec(index = 7)] - transfer { - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 8)] - force_set_balance { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - #[codec(compact)] - new_free: ::core::primitive::u128, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::transfer_allow_death { - dest: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::transfer_allow_death::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::transfer_allow_death::value`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_balance_deprecated { - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_balance_deprecated::who`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_free: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_balance_deprecated::new_free`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - old_reserved: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_balance_deprecated::old_reserved`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_transfer { - source: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_transfer::source`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - dest: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_transfer::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_transfer::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::transfer_keep_alive { - dest: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::transfer_keep_alive::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::transfer_keep_alive::value`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::transfer_all { - dest: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::transfer_all::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - keep_alive: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::transfer_all::keep_alive`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_unreserve { - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_unreserve::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_unreserve::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::upgrade_accounts { - who: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::upgrade_accounts::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::transfer { - dest: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::transfer::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::transfer::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_set_balance { - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_set_balance::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_free: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_set_balance::new_free`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::transfer_allow_death { ref dest, ref value } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - ), - ) - } - Call::set_balance_deprecated { - ref who, - ref new_free, - ref old_reserved, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(new_free), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(old_reserved), - ), - ) - } - Call::force_transfer { ref source, ref dest, ref value } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(source), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - ), - ) - } - Call::transfer_keep_alive { ref dest, ref value } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - ), - ) - } - Call::transfer_all { ref dest, ref keep_alive } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(keep_alive), - ) - } - Call::force_unreserve { ref who, ref amount } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Call::upgrade_accounts { ref who } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - } - Call::transfer { ref dest, ref value } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - ), - ) - } - Call::force_set_balance { ref who, ref new_free } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(new_free), - ), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::transfer_allow_death { ref dest, ref value } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - __codec_dest_edqy, - ); - } - } - Call::set_balance_deprecated { - ref who, - ref new_free, - ref old_reserved, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(new_free), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(old_reserved), - __codec_dest_edqy, - ); - } - } - Call::force_transfer { - ref source, - ref dest, - ref value, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - source, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - __codec_dest_edqy, - ); - } - } - Call::transfer_keep_alive { ref dest, ref value } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - __codec_dest_edqy, - ); - } - } - Call::transfer_all { ref dest, ref keep_alive } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - keep_alive, - __codec_dest_edqy, - ); - } - Call::force_unreserve { ref who, ref amount } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Call::upgrade_accounts { ref who } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - } - Call::transfer { ref dest, ref value } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - __codec_dest_edqy, - ); - } - } - Call::force_set_balance { ref who, ref new_free } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(new_free), - __codec_dest_edqy, - ); - } - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "transfer_allow_death" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::transfer_allow_death { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::transfer_allow_death { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - }; - } - if value.name() == "set_balance_deprecated" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::set_balance_deprecated { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - new_free: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_free"))? - }, - old_reserved: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("old_reserved"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_balance_deprecated { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - new_free: { - let val = *vals - .get(&Some("new_free")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_free".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_free"))? - }, - old_reserved: { - let val = *vals - .get(&Some("old_reserved")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "old_reserved".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("old_reserved"))? - }, - }) - }; - } - if value.name() == "force_transfer" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::force_transfer { - source: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("source"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_transfer { - source: { - let val = *vals - .get(&Some("source")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "source".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("source"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - }; - } - if value.name() == "transfer_keep_alive" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::transfer_keep_alive { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::transfer_keep_alive { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - }; - } - if value.name() == "transfer_all" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::transfer_all { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - keep_alive: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("keep_alive"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::transfer_all { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - keep_alive: { - let val = *vals - .get(&Some("keep_alive")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "keep_alive".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("keep_alive"))? - }, - }) - }; - } - if value.name() == "force_unreserve" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::force_unreserve { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_unreserve { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "upgrade_accounts" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::upgrade_accounts { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::upgrade_accounts { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - }; - } - if value.name() == "transfer" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::transfer { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::transfer { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - }; - } - if value.name() == "force_set_balance" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::force_set_balance { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - new_free: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_free"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_set_balance { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - new_free: { - let val = *vals - .get(&Some("new_free")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_free".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_free"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "transfer_allow_death", - "set_balance_deprecated", - "force_transfer", - "transfer_keep_alive", - "transfer_all", - "force_unreserve", - "upgrade_accounts", - "transfer", - "force_set_balance", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::transfer_allow_death { dest, value } => { - ::subxt::ext::scale_encode::Variant { - name: "transfer_allow_death", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_balance_deprecated { - who, - new_free, - old_reserved, - } => { - ::subxt::ext::scale_encode::Variant { - name: "set_balance_deprecated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_free"), - new_free as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("old_reserved"), - old_reserved - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_transfer { source, dest, value } => { - ::subxt::ext::scale_encode::Variant { - name: "force_transfer", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("source"), - source as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::transfer_keep_alive { dest, value } => { - ::subxt::ext::scale_encode::Variant { - name: "transfer_keep_alive", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::transfer_all { dest, keep_alive } => { - ::subxt::ext::scale_encode::Variant { - name: "transfer_all", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("keep_alive"), - keep_alive as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_unreserve { who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "force_unreserve", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::upgrade_accounts { who } => { - ::subxt::ext::scale_encode::Variant { - name: "upgrade_accounts", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::transfer { dest, value } => { - ::subxt::ext::scale_encode::Variant { - name: "transfer", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_set_balance { who, new_free } => { - ::subxt::ext::scale_encode::Variant { - name: "force_set_balance", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_free"), - new_free as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::transfer_allow_death { - dest: __self_0, - value: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "transfer_allow_death", - "dest", - __self_0, - "value", - &__self_1, - ) - } - Call::set_balance_deprecated { - who: __self_0, - new_free: __self_1, - old_reserved: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "set_balance_deprecated", - "who", - __self_0, - "new_free", - __self_1, - "old_reserved", - &__self_2, - ) - } - Call::force_transfer { - source: __self_0, - dest: __self_1, - value: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "force_transfer", - "source", - __self_0, - "dest", - __self_1, - "value", - &__self_2, - ) - } - Call::transfer_keep_alive { - dest: __self_0, - value: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "transfer_keep_alive", - "dest", - __self_0, - "value", - &__self_1, - ) - } - Call::transfer_all { - dest: __self_0, - keep_alive: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "transfer_all", - "dest", - __self_0, - "keep_alive", - &__self_1, - ) - } - Call::force_unreserve { - who: __self_0, - amount: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "force_unreserve", - "who", - __self_0, - "amount", - &__self_1, - ) - } - Call::upgrade_accounts { who: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "upgrade_accounts", - "who", - &__self_0, - ) - } - Call::transfer { dest: __self_0, value: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "transfer", - "dest", - __self_0, - "value", - &__self_1, - ) - } - Call::force_set_balance { - who: __self_0, - new_free: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "force_set_balance", - "who", - __self_0, - "new_free", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - VestingBalance, - #[codec(index = 1)] - LiquidityRestrictions, - #[codec(index = 2)] - InsufficientBalance, - #[codec(index = 3)] - ExistentialDeposit, - #[codec(index = 4)] - Expendability, - #[codec(index = 5)] - ExistingVestingSchedule, - #[codec(index = 6)] - DeadAccount, - #[codec(index = 7)] - TooManyReserves, - #[codec(index = 8)] - TooManyHolds, - #[codec(index = 9)] - TooManyFreezes, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::VestingBalance) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::LiquidityRestrictions) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InsufficientBalance) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ExistentialDeposit) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Expendability) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ExistingVestingSchedule) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::DeadAccount) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyReserves) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyHolds) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyFreezes) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::VestingBalance => 0_usize, - Error::LiquidityRestrictions => 0_usize, - Error::InsufficientBalance => 0_usize, - Error::ExistentialDeposit => 0_usize, - Error::Expendability => 0_usize, - Error::ExistingVestingSchedule => 0_usize, - Error::DeadAccount => 0_usize, - Error::TooManyReserves => 0_usize, - Error::TooManyHolds => 0_usize, - Error::TooManyFreezes => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::VestingBalance => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::LiquidityRestrictions => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::InsufficientBalance => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::ExistentialDeposit => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::Expendability => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::ExistingVestingSchedule => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::DeadAccount => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::TooManyReserves => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::TooManyHolds => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::TooManyFreezes => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "VestingBalance" { - return Ok(Error::VestingBalance); - } - if value.name() == "LiquidityRestrictions" { - return Ok(Error::LiquidityRestrictions); - } - if value.name() == "InsufficientBalance" { - return Ok(Error::InsufficientBalance); - } - if value.name() == "ExistentialDeposit" { - return Ok(Error::ExistentialDeposit); - } - if value.name() == "Expendability" { - return Ok(Error::Expendability); - } - if value.name() == "ExistingVestingSchedule" { - return Ok(Error::ExistingVestingSchedule); - } - if value.name() == "DeadAccount" { - return Ok(Error::DeadAccount); - } - if value.name() == "TooManyReserves" { - return Ok(Error::TooManyReserves); - } - if value.name() == "TooManyHolds" { - return Ok(Error::TooManyHolds); - } - if value.name() == "TooManyFreezes" { - return Ok(Error::TooManyFreezes); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "VestingBalance", - "LiquidityRestrictions", - "InsufficientBalance", - "ExistentialDeposit", - "Expendability", - "ExistingVestingSchedule", - "DeadAccount", - "TooManyReserves", - "TooManyHolds", - "TooManyFreezes", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::VestingBalance => { - ::subxt::ext::scale_encode::Variant { - name: "VestingBalance", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LiquidityRestrictions => { - ::subxt::ext::scale_encode::Variant { - name: "LiquidityRestrictions", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InsufficientBalance => { - ::subxt::ext::scale_encode::Variant { - name: "InsufficientBalance", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExistentialDeposit => { - ::subxt::ext::scale_encode::Variant { - name: "ExistentialDeposit", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Expendability => { - ::subxt::ext::scale_encode::Variant { - name: "Expendability", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExistingVestingSchedule => { - ::subxt::ext::scale_encode::Variant { - name: "ExistingVestingSchedule", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DeadAccount => { - ::subxt::ext::scale_encode::Variant { - name: "DeadAccount", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyReserves => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyReserves", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyHolds => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyHolds", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyFreezes => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyFreezes", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::VestingBalance => "VestingBalance", - Error::LiquidityRestrictions => "LiquidityRestrictions", - Error::InsufficientBalance => "InsufficientBalance", - Error::ExistentialDeposit => "ExistentialDeposit", - Error::Expendability => "Expendability", - Error::ExistingVestingSchedule => "ExistingVestingSchedule", - Error::DeadAccount => "DeadAccount", - Error::TooManyReserves => "TooManyReserves", - Error::TooManyHolds => "TooManyHolds", - Error::TooManyFreezes => "TooManyFreezes", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - Endowed { - account: ::subxt::utils::AccountId32, - free_balance: ::core::primitive::u128, - }, - #[codec(index = 1)] - DustLost { - account: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 2)] - Transfer { - from: ::subxt::utils::AccountId32, - to: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 3)] - BalanceSet { - who: ::subxt::utils::AccountId32, - free: ::core::primitive::u128, - }, - #[codec(index = 4)] - Reserved { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 5)] - Unreserved { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 6)] - ReserveRepatriated { - from: ::subxt::utils::AccountId32, - to: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - destination_status: runtime_types::frame_support::traits::tokens::misc::BalanceStatus, - }, - #[codec(index = 7)] - Deposit { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 8)] - Withdraw { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 9)] - Slashed { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 10)] - Minted { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 11)] - Burned { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 12)] - Suspended { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 13)] - Restored { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 14)] - Upgraded { who: ::subxt::utils::AccountId32 }, - #[codec(index = 15)] - Issued { amount: ::core::primitive::u128 }, - #[codec(index = 16)] - Rescinded { amount: ::core::primitive::u128 }, - #[codec(index = 17)] - Locked { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 18)] - Unlocked { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 19)] - Frozen { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 20)] - Thawed { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Endowed { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Endowed::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - free_balance: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Endowed::free_balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::DustLost { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::DustLost::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::DustLost::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Transfer { - from: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Transfer::from`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - to: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Transfer::to`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Transfer::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::BalanceSet { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BalanceSet::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - free: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BalanceSet::free`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Reserved { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Reserved::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Reserved::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Unreserved { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Unreserved::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Unreserved::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ReserveRepatriated { - from: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::ReserveRepatriated::from`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - to: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ReserveRepatriated::to`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::ReserveRepatriated::amount`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - destination_status: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::ReserveRepatriated::destination_status`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Deposit { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Deposit::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Deposit::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Withdraw { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Withdraw::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Withdraw::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Slashed { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Slashed::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Slashed::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Minted { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Minted::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Minted::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Burned { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Burned::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Burned::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Suspended { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Suspended::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Suspended::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Restored { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Restored::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Restored::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Upgraded { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Upgraded::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Issued { - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Issued::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Rescinded { - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Rescinded::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Locked { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Locked::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Locked::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Unlocked { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Unlocked::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Unlocked::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Frozen { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Frozen::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Frozen::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Thawed { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Thawed::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Thawed::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::Endowed { ref account, ref free_balance } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(free_balance), - ) - } - Event::DustLost { ref account, ref amount } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Transfer { ref from, ref to, ref amount } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(from), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(to)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::BalanceSet { ref who, ref free } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(free), - ) - } - Event::Reserved { ref who, ref amount } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Unreserved { ref who, ref amount } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::ReserveRepatriated { - ref from, - ref to, - ref amount, - ref destination_status, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(from), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(to)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(destination_status), - ) - } - Event::Deposit { ref who, ref amount } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Withdraw { ref who, ref amount } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Slashed { ref who, ref amount } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Minted { ref who, ref amount } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Burned { ref who, ref amount } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Suspended { ref who, ref amount } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Restored { ref who, ref amount } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Upgraded { ref who } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - } - Event::Issued { ref amount } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Rescinded { ref amount } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Locked { ref who, ref amount } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Unlocked { ref who, ref amount } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Frozen { ref who, ref amount } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Thawed { ref who, ref amount } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::Endowed { ref account, ref free_balance } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - free_balance, - __codec_dest_edqy, - ); - } - Event::DustLost { ref account, ref amount } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Transfer { ref from, ref to, ref amount } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - from, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - to, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::BalanceSet { ref who, ref free } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - free, - __codec_dest_edqy, - ); - } - Event::Reserved { ref who, ref amount } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Unreserved { ref who, ref amount } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::ReserveRepatriated { - ref from, - ref to, - ref amount, - ref destination_status, - } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - from, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - to, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - destination_status, - __codec_dest_edqy, - ); - } - Event::Deposit { ref who, ref amount } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Withdraw { ref who, ref amount } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Slashed { ref who, ref amount } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Minted { ref who, ref amount } => { - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Burned { ref who, ref amount } => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Suspended { ref who, ref amount } => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Restored { ref who, ref amount } => { - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Upgraded { ref who } => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - } - Event::Issued { ref amount } => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Rescinded { ref amount } => { - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Locked { ref who, ref amount } => { - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Unlocked { ref who, ref amount } => { - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Frozen { ref who, ref amount } => { - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Thawed { ref who, ref amount } => { - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Endowed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Endowed { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - free_balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("free_balance"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Endowed { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - free_balance: { - let val = *vals - .get(&Some("free_balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "free_balance".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("free_balance"))? - }, - }) - }; - } - if value.name() == "DustLost" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::DustLost { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::DustLost { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Transfer" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::Transfer { - from: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - to: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Transfer { - from: { - let val = *vals - .get(&Some("from")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "from".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - to: { - let val = *vals - .get(&Some("to")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "to".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "BalanceSet" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::BalanceSet { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - free: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("free"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::BalanceSet { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - free: { - let val = *vals - .get(&Some("free")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "free".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("free"))? - }, - }) - }; - } - if value.name() == "Reserved" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Reserved { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Reserved { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Unreserved" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Unreserved { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Unreserved { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "ReserveRepatriated" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Event::ReserveRepatriated { - from: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - to: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - destination_status: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("destination_status"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::ReserveRepatriated { - from: { - let val = *vals - .get(&Some("from")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "from".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - to: { - let val = *vals - .get(&Some("to")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "to".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - destination_status: { - let val = *vals - .get(&Some("destination_status")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "destination_status".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("destination_status"))? - }, - }) - }; - } - if value.name() == "Deposit" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Deposit { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Deposit { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Withdraw" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Withdraw { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Withdraw { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Slashed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Slashed { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Slashed { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Minted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Minted { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Minted { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Burned" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Burned { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Burned { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Suspended" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Suspended { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Suspended { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Restored" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Restored { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Restored { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Upgraded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Upgraded { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Upgraded { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - }; - } - if value.name() == "Issued" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Issued { - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Issued { - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Rescinded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Rescinded { - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Rescinded { - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Locked" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Locked { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Locked { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Unlocked" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Unlocked { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Unlocked { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Frozen" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Frozen { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Frozen { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Thawed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Thawed { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Thawed { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Endowed", - "DustLost", - "Transfer", - "BalanceSet", - "Reserved", - "Unreserved", - "ReserveRepatriated", - "Deposit", - "Withdraw", - "Slashed", - "Minted", - "Burned", - "Suspended", - "Restored", - "Upgraded", - "Issued", - "Rescinded", - "Locked", - "Unlocked", - "Frozen", - "Thawed", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Endowed { account, free_balance } => { - ::subxt::ext::scale_encode::Variant { - name: "Endowed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("free_balance"), - free_balance - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DustLost { account, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "DustLost", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Transfer { from, to, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Transfer", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("from"), - from as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BalanceSet { who, free } => { - ::subxt::ext::scale_encode::Variant { - name: "BalanceSet", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("free"), - free as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Reserved { who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Reserved", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unreserved { who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Unreserved", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReserveRepatriated { - from, - to, - amount, - destination_status, - } => { - ::subxt::ext::scale_encode::Variant { - name: "ReserveRepatriated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("from"), - from as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("destination_status"), - destination_status - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Deposit { who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Deposit", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Withdraw { who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Withdraw", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Slashed { who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Slashed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Minted { who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Minted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Burned { who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Burned", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Suspended { who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Suspended", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Restored { who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Restored", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Upgraded { who } => { - ::subxt::ext::scale_encode::Variant { - name: "Upgraded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Issued { amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Issued", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Rescinded { amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Rescinded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Locked { who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Locked", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unlocked { who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Unlocked", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Frozen { who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Frozen", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Thawed { who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Thawed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::Endowed { - account: __self_0, - free_balance: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Endowed", - "account", - __self_0, - "free_balance", - &__self_1, - ) - } - Event::DustLost { account: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "DustLost", - "account", - __self_0, - "amount", - &__self_1, - ) - } - Event::Transfer { - from: __self_0, - to: __self_1, - amount: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Transfer", - "from", - __self_0, - "to", - __self_1, - "amount", - &__self_2, - ) - } - Event::BalanceSet { who: __self_0, free: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "BalanceSet", - "who", - __self_0, - "free", - &__self_1, - ) - } - Event::Reserved { who: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Reserved", - "who", - __self_0, - "amount", - &__self_1, - ) - } - Event::Unreserved { who: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Unreserved", - "who", - __self_0, - "amount", - &__self_1, - ) - } - Event::ReserveRepatriated { - from: __self_0, - to: __self_1, - amount: __self_2, - destination_status: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "ReserveRepatriated", - "from", - __self_0, - "to", - __self_1, - "amount", - __self_2, - "destination_status", - &__self_3, - ) - } - Event::Deposit { who: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Deposit", - "who", - __self_0, - "amount", - &__self_1, - ) - } - Event::Withdraw { who: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Withdraw", - "who", - __self_0, - "amount", - &__self_1, - ) - } - Event::Slashed { who: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Slashed", - "who", - __self_0, - "amount", - &__self_1, - ) - } - Event::Minted { who: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Minted", - "who", - __self_0, - "amount", - &__self_1, - ) - } - Event::Burned { who: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Burned", - "who", - __self_0, - "amount", - &__self_1, - ) - } - Event::Suspended { who: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Suspended", - "who", - __self_0, - "amount", - &__self_1, - ) - } - Event::Restored { who: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Restored", - "who", - __self_0, - "amount", - &__self_1, - ) - } - Event::Upgraded { who: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Upgraded", - "who", - &__self_0, - ) - } - Event::Issued { amount: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Issued", - "amount", - &__self_0, - ) - } - Event::Rescinded { amount: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Rescinded", - "amount", - &__self_0, - ) - } - Event::Locked { who: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Locked", - "who", - __self_0, - "amount", - &__self_1, - ) - } - Event::Unlocked { who: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Unlocked", - "who", - __self_0, - "amount", - &__self_1, - ) - } - Event::Frozen { who: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Frozen", - "who", - __self_0, - "amount", - &__self_1, - ) - } - Event::Thawed { who: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Thawed", - "who", - __self_0, - "amount", - &__self_1, - ) - } - } - } - } - } - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AccountData<_0> { - pub free: _0, - pub reserved: _0, - pub frozen: _0, - pub flags: runtime_types::pallet_balances::types::ExtraFlags, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for AccountData<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AccountData::<_0> { - free: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountData::free`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - reserved: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountData::reserved`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - frozen: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountData::frozen`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - flags: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountData::flags`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for AccountData<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.free), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.reserved), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.frozen), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.flags), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.free, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.reserved, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.frozen, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.flags, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for AccountData<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for AccountData<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AccountData<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AccountData { - free: { - let val = *vals - .get(&Some("free")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "free".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("free"))? - }, - reserved: { - let val = *vals - .get(&Some("reserved")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reserved".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reserved"))? - }, - frozen: { - let val = *vals - .get(&Some("frozen")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "frozen".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("frozen"))? - }, - flags: { - let val = *vals - .get(&Some("flags")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "flags".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("flags"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(AccountData { - free: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("free"))? - }, - reserved: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reserved"))? - }, - frozen: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("frozen"))? - }, - flags: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("flags"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for AccountData<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for AccountData<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AccountData { free, reserved, frozen, flags } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("free"), - free as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("reserved"), - reserved as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("frozen"), - frozen as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("flags"), - flags as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for AccountData<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AccountData { free, reserved, frozen, flags } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("free"), - free as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("reserved"), - reserved as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("frozen"), - frozen as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("flags"), - flags as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for AccountData<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "AccountData", - "free", - &self.free, - "reserved", - &self.reserved, - "frozen", - &self.frozen, - "flags", - &&self.flags, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BalanceLock<_0> { - pub id: [::core::primitive::u8; 8usize], - pub amount: _0, - pub reasons: runtime_types::pallet_balances::types::Reasons, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for BalanceLock<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(BalanceLock::<_0> { - id: { - let __codec_res_edqy = <[::core::primitive::u8; 8usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BalanceLock::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BalanceLock::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - reasons: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BalanceLock::reasons`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for BalanceLock<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.reasons), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.reasons, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for BalanceLock<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for BalanceLock<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BalanceLock<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BalanceLock { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - reasons: { - let val = *vals - .get(&Some("reasons")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reasons".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reasons"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(BalanceLock { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - reasons: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reasons"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for BalanceLock<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for BalanceLock<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BalanceLock { id, amount, reasons } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("reasons"), - reasons as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for BalanceLock<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BalanceLock { id, amount, reasons } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("reasons"), - reasons as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for BalanceLock<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "BalanceLock", - "id", - &self.id, - "amount", - &self.amount, - "reasons", - &&self.reasons, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ExtraFlags(pub ::core::primitive::u128); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for ExtraFlags { - type As = ::core::primitive::u128; - fn encode_as(&self) -> &::core::primitive::u128 { - &self.0 - } - fn decode_from( - x: ::core::primitive::u128, - ) -> ::core::result::Result< - ExtraFlags, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ExtraFlags(x)) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for ExtraFlags { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> ExtraFlags { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ExtraFlags { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - ExtraFlags({ - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ExtraFlags.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ExtraFlags { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ExtraFlags {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ExtraFlags { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ExtraFlags; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - ExtraFlags({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ExtraFlags { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ExtraFlags { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExtraFlags(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ExtraFlags { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExtraFlags(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ExtraFlags { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ExtraFlags", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IdAmount<_0, _1> { - pub id: _0, - pub amount: _1, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for IdAmount<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(IdAmount::<_0, _1> { - id: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IdAmount::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IdAmount::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for IdAmount<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike for IdAmount<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>( - ::core::marker::PhantomData<(_0, _1)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for IdAmount<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = IdAmount<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(IdAmount { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(IdAmount { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for IdAmount<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for IdAmount<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IdAmount { id, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for IdAmount<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IdAmount { id, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - > ::core::fmt::Debug for IdAmount<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "IdAmount", - "id", - &self.id, - "amount", - &&self.amount, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Reasons { - #[codec(index = 0)] - Fee, - #[codec(index = 1)] - Misc, - #[codec(index = 2)] - All, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Reasons { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Reasons`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Reasons::Fee) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Reasons::Misc) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Reasons::All) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Reasons`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Reasons { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Reasons::Fee => 0_usize, - Reasons::Misc => 0_usize, - Reasons::All => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Reasons::Fee => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Reasons::Misc => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Reasons::All => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Reasons {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Reasons { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Reasons; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Fee" { - return Ok(Reasons::Fee); - } - if value.name() == "Misc" { - return Ok(Reasons::Misc); - } - if value.name() == "All" { - return Ok(Reasons::All); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Fee", "Misc", "All"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Reasons { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Fee => { - ::subxt::ext::scale_encode::Variant { - name: "Fee", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Misc => { - ::subxt::ext::scale_encode::Variant { - name: "Misc", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::All => { - ::subxt::ext::scale_encode::Variant { - name: "All", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Reasons { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Reasons::Fee => "Fee", - Reasons::Misc => "Misc", - Reasons::All => "All", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReserveData<_0, _1> { - pub id: _0, - pub amount: _1, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for ReserveData<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ReserveData::<_0, _1> { - id: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReserveData::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReserveData::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for ReserveData<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for ReserveData<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>( - ::core::marker::PhantomData<(_0, _1)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for ReserveData<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReserveData<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ReserveData { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ReserveData { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for ReserveData<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for ReserveData<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReserveData { id, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for ReserveData<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReserveData { id, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - > ::core::fmt::Debug for ReserveData<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ReserveData", - "id", - &self.id, - "amount", - &&self.amount, - ) - } - } - } - } - pub mod pallet_bounties { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - propose_bounty { - #[codec(compact)] - value: ::core::primitive::u128, - description: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 1)] - approve_bounty { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - }, - #[codec(index = 2)] - 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)] - unassign_curator { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - }, - #[codec(index = 4)] - accept_curator { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - }, - #[codec(index = 5)] - award_bounty { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 6)] - claim_bounty { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - }, - #[codec(index = 7)] - close_bounty { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - }, - #[codec(index = 8)] - extend_bounty_expiry { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - remark: ::std::vec::Vec<::core::primitive::u8>, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::propose_bounty { - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::propose_bounty::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - description: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::propose_bounty::description`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::approve_bounty { - bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::approve_bounty::bounty_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::propose_curator { - bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::propose_curator::bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - curator: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::propose_curator::curator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fee: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::propose_curator::fee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::unassign_curator { - bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::unassign_curator::bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::accept_curator { - bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::accept_curator::bounty_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::award_bounty { - bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::award_bounty::bounty_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::award_bounty::beneficiary`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::claim_bounty { - bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::claim_bounty::bounty_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::close_bounty { - bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::close_bounty::bounty_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::extend_bounty_expiry { - bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::extend_bounty_expiry::bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - remark: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::extend_bounty_expiry::remark`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::propose_bounty { ref value, ref description } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(description), - ) - } - Call::approve_bounty { ref bounty_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(bounty_id), - ), - ) - } - Call::propose_curator { - ref bounty_id, - ref curator, - ref fee, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(curator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(fee), - ), - ) - } - Call::unassign_curator { ref bounty_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(bounty_id), - ), - ) - } - Call::accept_curator { ref bounty_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(bounty_id), - ), - ) - } - Call::award_bounty { ref bounty_id, ref beneficiary } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - } - Call::claim_bounty { ref bounty_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(bounty_id), - ), - ) - } - Call::close_bounty { ref bounty_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(bounty_id), - ), - ) - } - Call::extend_bounty_expiry { ref bounty_id, ref remark } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(remark), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::propose_bounty { ref value, ref description } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - description, - __codec_dest_edqy, - ); - } - Call::approve_bounty { ref bounty_id } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(bounty_id), - __codec_dest_edqy, - ); - } - } - Call::propose_curator { - ref bounty_id, - ref curator, - ref fee, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(bounty_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - curator, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(fee), - __codec_dest_edqy, - ); - } - } - Call::unassign_curator { ref bounty_id } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(bounty_id), - __codec_dest_edqy, - ); - } - } - Call::accept_curator { ref bounty_id } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(bounty_id), - __codec_dest_edqy, - ); - } - } - Call::award_bounty { ref bounty_id, ref beneficiary } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(bounty_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - } - Call::claim_bounty { ref bounty_id } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(bounty_id), - __codec_dest_edqy, - ); - } - } - Call::close_bounty { ref bounty_id } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(bounty_id), - __codec_dest_edqy, - ); - } - } - Call::extend_bounty_expiry { - ref bounty_id, - ref remark, - } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(bounty_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - remark, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "propose_bounty" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::propose_bounty { - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - description: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("description"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::propose_bounty { - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - description: { - let val = *vals - .get(&Some("description")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "description".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("description"))? - }, - }) - }; - } - if value.name() == "approve_bounty" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::approve_bounty { - bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::approve_bounty { - bounty_id: { - let val = *vals - .get(&Some("bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bounty_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - }; - } - if value.name() == "propose_curator" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::propose_curator { - bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - curator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - fee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::propose_curator { - bounty_id: { - let val = *vals - .get(&Some("bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bounty_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - curator: { - let val = *vals - .get(&Some("curator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "curator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - fee: { - let val = *vals - .get(&Some("fee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - }) - }; - } - if value.name() == "unassign_curator" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::unassign_curator { - bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::unassign_curator { - bounty_id: { - let val = *vals - .get(&Some("bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bounty_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - }; - } - if value.name() == "accept_curator" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::accept_curator { - bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::accept_curator { - bounty_id: { - let val = *vals - .get(&Some("bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bounty_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - }; - } - if value.name() == "award_bounty" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::award_bounty { - bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::award_bounty { - bounty_id: { - let val = *vals - .get(&Some("bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bounty_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - }; - } - if value.name() == "claim_bounty" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::claim_bounty { - bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::claim_bounty { - bounty_id: { - let val = *vals - .get(&Some("bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bounty_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - }; - } - if value.name() == "close_bounty" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::close_bounty { - bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::close_bounty { - bounty_id: { - let val = *vals - .get(&Some("bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bounty_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - }) - }; - } - if value.name() == "extend_bounty_expiry" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::extend_bounty_expiry { - bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - remark: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("remark"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::extend_bounty_expiry { - bounty_id: { - let val = *vals - .get(&Some("bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bounty_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bounty_id"))? - }, - remark: { - let val = *vals - .get(&Some("remark")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "remark".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("remark"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "propose_bounty", - "approve_bounty", - "propose_curator", - "unassign_curator", - "accept_curator", - "award_bounty", - "claim_bounty", - "close_bounty", - "extend_bounty_expiry", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::propose_bounty { value, description } => { - ::subxt::ext::scale_encode::Variant { - name: "propose_bounty", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("description"), - description as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::approve_bounty { bounty_id } => { - ::subxt::ext::scale_encode::Variant { - name: "approve_bounty", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::propose_curator { bounty_id, curator, fee } => { - ::subxt::ext::scale_encode::Variant { - name: "propose_curator", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("curator"), - curator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee"), - fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::unassign_curator { bounty_id } => { - ::subxt::ext::scale_encode::Variant { - name: "unassign_curator", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::accept_curator { bounty_id } => { - ::subxt::ext::scale_encode::Variant { - name: "accept_curator", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::award_bounty { bounty_id, beneficiary } => { - ::subxt::ext::scale_encode::Variant { - name: "award_bounty", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::claim_bounty { bounty_id } => { - ::subxt::ext::scale_encode::Variant { - name: "claim_bounty", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::close_bounty { bounty_id } => { - ::subxt::ext::scale_encode::Variant { - name: "close_bounty", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::extend_bounty_expiry { bounty_id, remark } => { - ::subxt::ext::scale_encode::Variant { - name: "extend_bounty_expiry", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bounty_id"), - bounty_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("remark"), - remark as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::propose_bounty { - value: __self_0, - description: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "propose_bounty", - "value", - __self_0, - "description", - &__self_1, - ) - } - Call::approve_bounty { bounty_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "approve_bounty", - "bounty_id", - &__self_0, - ) - } - Call::propose_curator { - bounty_id: __self_0, - curator: __self_1, - fee: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "propose_curator", - "bounty_id", - __self_0, - "curator", - __self_1, - "fee", - &__self_2, - ) - } - Call::unassign_curator { bounty_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "unassign_curator", - "bounty_id", - &__self_0, - ) - } - Call::accept_curator { bounty_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "accept_curator", - "bounty_id", - &__self_0, - ) - } - Call::award_bounty { - bounty_id: __self_0, - beneficiary: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "award_bounty", - "bounty_id", - __self_0, - "beneficiary", - &__self_1, - ) - } - Call::claim_bounty { bounty_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "claim_bounty", - "bounty_id", - &__self_0, - ) - } - Call::close_bounty { bounty_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "close_bounty", - "bounty_id", - &__self_0, - ) - } - Call::extend_bounty_expiry { - bounty_id: __self_0, - remark: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "extend_bounty_expiry", - "bounty_id", - __self_0, - "remark", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - InsufficientProposersBalance, - #[codec(index = 1)] - InvalidIndex, - #[codec(index = 2)] - ReasonTooBig, - #[codec(index = 3)] - UnexpectedStatus, - #[codec(index = 4)] - RequireCurator, - #[codec(index = 5)] - InvalidValue, - #[codec(index = 6)] - InvalidFee, - #[codec(index = 7)] - PendingPayout, - #[codec(index = 8)] - Premature, - #[codec(index = 9)] - HasActiveChildBounty, - #[codec(index = 10)] - TooManyQueued, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::InsufficientProposersBalance, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidIndex) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ReasonTooBig) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UnexpectedStatus) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::RequireCurator) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidValue) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidFee) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::PendingPayout) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Premature) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::HasActiveChildBounty) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyQueued) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::InsufficientProposersBalance => 0_usize, - Error::InvalidIndex => 0_usize, - Error::ReasonTooBig => 0_usize, - Error::UnexpectedStatus => 0_usize, - Error::RequireCurator => 0_usize, - Error::InvalidValue => 0_usize, - Error::InvalidFee => 0_usize, - Error::PendingPayout => 0_usize, - Error::Premature => 0_usize, - Error::HasActiveChildBounty => 0_usize, - Error::TooManyQueued => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::InsufficientProposersBalance => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::InvalidIndex => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::ReasonTooBig => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::UnexpectedStatus => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::RequireCurator => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::InvalidValue => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::InvalidFee => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::PendingPayout => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::Premature => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::HasActiveChildBounty => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::TooManyQueued => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "InsufficientProposersBalance" { - return Ok(Error::InsufficientProposersBalance); - } - if value.name() == "InvalidIndex" { - return Ok(Error::InvalidIndex); - } - if value.name() == "ReasonTooBig" { - return Ok(Error::ReasonTooBig); - } - if value.name() == "UnexpectedStatus" { - return Ok(Error::UnexpectedStatus); - } - if value.name() == "RequireCurator" { - return Ok(Error::RequireCurator); - } - if value.name() == "InvalidValue" { - return Ok(Error::InvalidValue); - } - if value.name() == "InvalidFee" { - return Ok(Error::InvalidFee); - } - if value.name() == "PendingPayout" { - return Ok(Error::PendingPayout); - } - if value.name() == "Premature" { - return Ok(Error::Premature); - } - if value.name() == "HasActiveChildBounty" { - return Ok(Error::HasActiveChildBounty); - } - if value.name() == "TooManyQueued" { - return Ok(Error::TooManyQueued); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "InsufficientProposersBalance", - "InvalidIndex", - "ReasonTooBig", - "UnexpectedStatus", - "RequireCurator", - "InvalidValue", - "InvalidFee", - "PendingPayout", - "Premature", - "HasActiveChildBounty", - "TooManyQueued", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::InsufficientProposersBalance => { - ::subxt::ext::scale_encode::Variant { - name: "InsufficientProposersBalance", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidIndex => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidIndex", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReasonTooBig => { - ::subxt::ext::scale_encode::Variant { - name: "ReasonTooBig", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnexpectedStatus => { - ::subxt::ext::scale_encode::Variant { - name: "UnexpectedStatus", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::RequireCurator => { - ::subxt::ext::scale_encode::Variant { - name: "RequireCurator", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidValue => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidValue", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidFee => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidFee", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PendingPayout => { - ::subxt::ext::scale_encode::Variant { - name: "PendingPayout", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Premature => { - ::subxt::ext::scale_encode::Variant { - name: "Premature", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HasActiveChildBounty => { - ::subxt::ext::scale_encode::Variant { - name: "HasActiveChildBounty", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyQueued => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyQueued", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::InsufficientProposersBalance => { - "InsufficientProposersBalance" - } - Error::InvalidIndex => "InvalidIndex", - Error::ReasonTooBig => "ReasonTooBig", - Error::UnexpectedStatus => "UnexpectedStatus", - Error::RequireCurator => "RequireCurator", - Error::InvalidValue => "InvalidValue", - Error::InvalidFee => "InvalidFee", - Error::PendingPayout => "PendingPayout", - Error::Premature => "Premature", - Error::HasActiveChildBounty => "HasActiveChildBounty", - Error::TooManyQueued => "TooManyQueued", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - BountyProposed { index: ::core::primitive::u32 }, - #[codec(index = 1)] - BountyRejected { - index: ::core::primitive::u32, - bond: ::core::primitive::u128, - }, - #[codec(index = 2)] - BountyBecameActive { index: ::core::primitive::u32 }, - #[codec(index = 3)] - BountyAwarded { - index: ::core::primitive::u32, - beneficiary: ::subxt::utils::AccountId32, - }, - #[codec(index = 4)] - BountyClaimed { - index: ::core::primitive::u32, - payout: ::core::primitive::u128, - beneficiary: ::subxt::utils::AccountId32, - }, - #[codec(index = 5)] - BountyCanceled { index: ::core::primitive::u32 }, - #[codec(index = 6)] - BountyExtended { index: ::core::primitive::u32 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::BountyProposed { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BountyProposed::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::BountyRejected { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BountyRejected::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - bond: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BountyRejected::bond`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::BountyBecameActive { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::BountyBecameActive::index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::BountyAwarded { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BountyAwarded::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::BountyAwarded::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::BountyClaimed { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BountyClaimed::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - payout: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BountyClaimed::payout`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::BountyClaimed::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::BountyCanceled { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BountyCanceled::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::BountyExtended { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BountyExtended::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::BountyProposed { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Event::BountyRejected { ref index, ref bond } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(bond), - ) - } - Event::BountyBecameActive { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Event::BountyAwarded { ref index, ref beneficiary } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - } - Event::BountyClaimed { - ref index, - ref payout, - ref beneficiary, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(payout), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - } - Event::BountyCanceled { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Event::BountyExtended { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::BountyProposed { ref index } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Event::BountyRejected { ref index, ref bond } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - bond, - __codec_dest_edqy, - ); - } - Event::BountyBecameActive { ref index } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Event::BountyAwarded { ref index, ref beneficiary } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - } - Event::BountyClaimed { - ref index, - ref payout, - ref beneficiary, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - payout, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - } - Event::BountyCanceled { ref index } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Event::BountyExtended { ref index } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "BountyProposed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::BountyProposed { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::BountyProposed { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "BountyRejected" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::BountyRejected { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - bond: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bond"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::BountyRejected { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - bond: { - let val = *vals - .get(&Some("bond")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bond".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bond"))? - }, - }) - }; - } - if value.name() == "BountyBecameActive" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::BountyBecameActive { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::BountyBecameActive { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "BountyAwarded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::BountyAwarded { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::BountyAwarded { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - }; - } - if value.name() == "BountyClaimed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::BountyClaimed { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - payout: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::BountyClaimed { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - payout: { - let val = *vals - .get(&Some("payout")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "payout".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - }; - } - if value.name() == "BountyCanceled" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::BountyCanceled { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::BountyCanceled { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "BountyExtended" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::BountyExtended { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::BountyExtended { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "BountyProposed", - "BountyRejected", - "BountyBecameActive", - "BountyAwarded", - "BountyClaimed", - "BountyCanceled", - "BountyExtended", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::BountyProposed { index } => { - ::subxt::ext::scale_encode::Variant { - name: "BountyProposed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BountyRejected { index, bond } => { - ::subxt::ext::scale_encode::Variant { - name: "BountyRejected", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bond"), - bond as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BountyBecameActive { index } => { - ::subxt::ext::scale_encode::Variant { - name: "BountyBecameActive", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BountyAwarded { index, beneficiary } => { - ::subxt::ext::scale_encode::Variant { - name: "BountyAwarded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BountyClaimed { index, payout, beneficiary } => { - ::subxt::ext::scale_encode::Variant { - name: "BountyClaimed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("payout"), - payout as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BountyCanceled { index } => { - ::subxt::ext::scale_encode::Variant { - name: "BountyCanceled", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BountyExtended { index } => { - ::subxt::ext::scale_encode::Variant { - name: "BountyExtended", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::BountyProposed { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "BountyProposed", - "index", - &__self_0, - ) - } - Event::BountyRejected { - index: __self_0, - bond: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "BountyRejected", - "index", - __self_0, - "bond", - &__self_1, - ) - } - Event::BountyBecameActive { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "BountyBecameActive", - "index", - &__self_0, - ) - } - Event::BountyAwarded { - index: __self_0, - beneficiary: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "BountyAwarded", - "index", - __self_0, - "beneficiary", - &__self_1, - ) - } - Event::BountyClaimed { - index: __self_0, - payout: __self_1, - beneficiary: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "BountyClaimed", - "index", - __self_0, - "payout", - __self_1, - "beneficiary", - &__self_2, - ) - } - Event::BountyCanceled { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "BountyCanceled", - "index", - &__self_0, - ) - } - Event::BountyExtended { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "BountyExtended", - "index", - &__self_0, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Bounty<_0, _1, _2> { - pub proposer: _0, - pub value: _1, - pub fee: _1, - pub curator_deposit: _1, - pub bond: _1, - pub status: runtime_types::pallet_bounties::BountyStatus<_0, _2>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Decode for Bounty<_0, _1, _2> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - runtime_types::pallet_bounties::BountyStatus< - _0, - _2, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_bounties::BountyStatus< - _0, - _2, - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Bounty::<_0, _1, _2> { - proposer: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bounty::proposer`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bounty::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fee: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bounty::fee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - curator_deposit: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bounty::curator_deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - bond: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bounty::bond`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - status: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Bounty::status`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Encode for Bounty<_0, _1, _2> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - runtime_types::pallet_bounties::BountyStatus< - _0, - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_bounties::BountyStatus< - _0, - _2, - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposer), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.value), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.fee), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.curator_deposit, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.bond), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.status), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposer, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.value, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.fee, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.curator_deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.bond, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.status, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::EncodeLike - for Bounty<_0, _1, _2> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - runtime_types::pallet_bounties::BountyStatus< - _0, - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_bounties::BountyStatus< - _0, - _2, - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2>( - ::core::marker::PhantomData<(_0, _1, _2)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1, _2> ::subxt::ext::scale_decode::IntoVisitor - for Bounty<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Bounty<_0, _1, _2>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Bounty { - proposer: { - let val = *vals - .get(&Some("proposer")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposer".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposer"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - fee: { - let val = *vals - .get(&Some("fee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - curator_deposit: { - let val = *vals - .get(&Some("curator_deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "curator_deposit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("curator_deposit"))? - }, - bond: { - let val = *vals - .get(&Some("bond")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bond".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bond"))? - }, - status: { - let val = *vals - .get(&Some("status")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "status".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("status"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = value; - Ok(Bounty { - proposer: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposer"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - fee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - curator_deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("curator_deposit"))? - }, - bond: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bond"))? - }, - status: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("status"))? - }, - }) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::DecodeAsFields - for Bounty<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsType - for Bounty<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Bounty { - proposer, - value, - fee, - curator_deposit, - bond, - status, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposer"), - proposer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee"), - fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("curator_deposit"), - curator_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bond"), - bond as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("status"), - status as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsFields - for Bounty<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Bounty { - proposer, - value, - fee, - curator_deposit, - bond, - status, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposer"), - proposer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee"), - fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("curator_deposit"), - curator_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bond"), - bond as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("status"), - status as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - > ::core::fmt::Debug for Bounty<_0, _1, _2> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "proposer", - "value", - "fee", - "curator_deposit", - "bond", - "status", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.proposer, - &self.value, - &self.fee, - &self.curator_deposit, - &self.bond, - &&self.status, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "Bounty", - names, - values, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum BountyStatus<_0, _1> { - #[codec(index = 0)] - Proposed, - #[codec(index = 1)] - Approved, - #[codec(index = 2)] - Funded, - #[codec(index = 3)] - CuratorProposed { curator: _0 }, - #[codec(index = 4)] - Active { curator: _0, update_due: _1 }, - #[codec(index = 5)] - PendingPayout { curator: _0, beneficiary: _0, unlock_at: _1 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for BountyStatus<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `BountyStatus`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BountyStatus::<_0, _1>::Proposed) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BountyStatus::<_0, _1>::Approved) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BountyStatus::<_0, _1>::Funded) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BountyStatus::< - _0, - _1, - >::CuratorProposed { - curator: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BountyStatus::CuratorProposed::curator`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BountyStatus::<_0, _1>::Active { - curator: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BountyStatus::Active::curator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - update_due: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BountyStatus::Active::update_due`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BountyStatus::< - _0, - _1, - >::PendingPayout { - curator: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BountyStatus::PendingPayout::curator`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BountyStatus::PendingPayout::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - unlock_at: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BountyStatus::PendingPayout::unlock_at`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `BountyStatus`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for BountyStatus<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - BountyStatus::Proposed => 0_usize, - BountyStatus::Approved => 0_usize, - BountyStatus::Funded => 0_usize, - BountyStatus::CuratorProposed { ref curator } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(curator), - ) - } - BountyStatus::Active { ref curator, ref update_due } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(curator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(update_due), - ) - } - BountyStatus::PendingPayout { - ref curator, - ref beneficiary, - ref unlock_at, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(curator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(unlock_at), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - BountyStatus::Proposed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - BountyStatus::Approved => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - BountyStatus::Funded => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - BountyStatus::CuratorProposed { ref curator } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - curator, - __codec_dest_edqy, - ); - } - BountyStatus::Active { ref curator, ref update_due } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - curator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - update_due, - __codec_dest_edqy, - ); - } - BountyStatus::PendingPayout { - ref curator, - ref beneficiary, - ref unlock_at, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - curator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - unlock_at, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike for BountyStatus<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for BountyStatus<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BountyStatus<_0, _1>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Proposed" { - return Ok(BountyStatus::Proposed); - } - if value.name() == "Approved" { - return Ok(BountyStatus::Approved); - } - if value.name() == "Funded" { - return Ok(BountyStatus::Funded); - } - if value.name() == "CuratorProposed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(BountyStatus::CuratorProposed { - curator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BountyStatus::CuratorProposed { - curator: { - let val = *vals - .get(&Some("curator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "curator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - }) - }; - } - if value.name() == "Active" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(BountyStatus::Active { - curator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - update_due: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("update_due"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BountyStatus::Active { - curator: { - let val = *vals - .get(&Some("curator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "curator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - update_due: { - let val = *vals - .get(&Some("update_due")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "update_due".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("update_due"))? - }, - }) - }; - } - if value.name() == "PendingPayout" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(BountyStatus::PendingPayout { - curator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - unlock_at: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("unlock_at"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BountyStatus::PendingPayout { - curator: { - let val = *vals - .get(&Some("curator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "curator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - unlock_at: { - let val = *vals - .get(&Some("unlock_at")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "unlock_at".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("unlock_at"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Proposed", - "Approved", - "Funded", - "CuratorProposed", - "Active", - "PendingPayout", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for BountyStatus<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Proposed => { - ::subxt::ext::scale_encode::Variant { - name: "Proposed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Approved => { - ::subxt::ext::scale_encode::Variant { - name: "Approved", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Funded => { - ::subxt::ext::scale_encode::Variant { - name: "Funded", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CuratorProposed { curator } => { - ::subxt::ext::scale_encode::Variant { - name: "CuratorProposed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("curator"), - curator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Active { curator, update_due } => { - ::subxt::ext::scale_encode::Variant { - name: "Active", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("curator"), - curator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("update_due"), - update_due as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PendingPayout { curator, beneficiary, unlock_at } => { - ::subxt::ext::scale_encode::Variant { - name: "PendingPayout", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("curator"), - curator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("unlock_at"), - unlock_at as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for BountyStatus<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - BountyStatus::Proposed => { - ::core::fmt::Formatter::write_str(f, "Proposed") - } - BountyStatus::Approved => { - ::core::fmt::Formatter::write_str(f, "Approved") - } - BountyStatus::Funded => { - ::core::fmt::Formatter::write_str(f, "Funded") - } - BountyStatus::CuratorProposed { curator: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "CuratorProposed", - "curator", - &__self_0, - ) - } - BountyStatus::Active { - curator: __self_0, - update_due: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Active", - "curator", - __self_0, - "update_due", - &__self_1, - ) - } - BountyStatus::PendingPayout { - curator: __self_0, - beneficiary: __self_1, - unlock_at: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "PendingPayout", - "curator", - __self_0, - "beneficiary", - __self_1, - "unlock_at", - &__self_2, - ) - } - } - } - } - } - pub mod pallet_child_bounties { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - 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)] - 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)] - accept_curator { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - child_bounty_id: ::core::primitive::u32, - }, - #[codec(index = 3)] - unassign_curator { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - child_bounty_id: ::core::primitive::u32, - }, - #[codec(index = 4)] - 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)] - claim_child_bounty { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - child_bounty_id: ::core::primitive::u32, - }, - #[codec(index = 6)] - close_child_bounty { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - child_bounty_id: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::add_child_bounty { - parent_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::add_child_bounty::parent_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::add_child_bounty::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - description: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::add_child_bounty::description`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::propose_curator { - parent_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::propose_curator::parent_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - child_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::propose_curator::child_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - curator: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::propose_curator::curator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fee: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::propose_curator::fee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::accept_curator { - parent_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::accept_curator::parent_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - child_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::accept_curator::child_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::unassign_curator { - parent_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::unassign_curator::parent_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - child_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::unassign_curator::child_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::award_child_bounty { - parent_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::award_child_bounty::parent_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - child_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::award_child_bounty::child_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::award_child_bounty::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::claim_child_bounty { - parent_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::claim_child_bounty::parent_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - child_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::claim_child_bounty::child_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::close_child_bounty { - parent_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::close_child_bounty::parent_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - child_bounty_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::close_child_bounty::child_bounty_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::add_child_bounty { - ref parent_bounty_id, - ref value, - ref description, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(parent_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(description), - ) - } - Call::propose_curator { - ref parent_bounty_id, - ref child_bounty_id, - ref curator, - ref fee, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(parent_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(child_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(curator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(fee), - ), - ) - } - Call::accept_curator { - ref parent_bounty_id, - ref child_bounty_id, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(parent_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(child_bounty_id), - ), - ) - } - Call::unassign_curator { - ref parent_bounty_id, - ref child_bounty_id, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(parent_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(child_bounty_id), - ), - ) - } - Call::award_child_bounty { - ref parent_bounty_id, - ref child_bounty_id, - ref beneficiary, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(parent_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(child_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - } - Call::claim_child_bounty { - ref parent_bounty_id, - ref child_bounty_id, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(parent_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(child_bounty_id), - ), - ) - } - Call::close_child_bounty { - ref parent_bounty_id, - ref child_bounty_id, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(parent_bounty_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(child_bounty_id), - ), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::add_child_bounty { - ref parent_bounty_id, - ref value, - ref description, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(parent_bounty_id), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - description, - __codec_dest_edqy, - ); - } - Call::propose_curator { - ref parent_bounty_id, - ref child_bounty_id, - ref curator, - ref fee, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(parent_bounty_id), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(child_bounty_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - curator, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(fee), - __codec_dest_edqy, - ); - } - } - Call::accept_curator { - ref parent_bounty_id, - ref child_bounty_id, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(parent_bounty_id), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(child_bounty_id), - __codec_dest_edqy, - ); - } - } - Call::unassign_curator { - ref parent_bounty_id, - ref child_bounty_id, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(parent_bounty_id), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(child_bounty_id), - __codec_dest_edqy, - ); - } - } - Call::award_child_bounty { - ref parent_bounty_id, - ref child_bounty_id, - ref beneficiary, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(parent_bounty_id), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(child_bounty_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - } - Call::claim_child_bounty { - ref parent_bounty_id, - ref child_bounty_id, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(parent_bounty_id), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(child_bounty_id), - __codec_dest_edqy, - ); - } - } - Call::close_child_bounty { - ref parent_bounty_id, - ref child_bounty_id, - } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(parent_bounty_id), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(child_bounty_id), - __codec_dest_edqy, - ); - } - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "add_child_bounty" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::add_child_bounty { - parent_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - description: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("description"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::add_child_bounty { - parent_bounty_id: { - let val = *vals - .get(&Some("parent_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parent_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - description: { - let val = *vals - .get(&Some("description")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "description".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("description"))? - }, - }) - }; - } - if value.name() == "propose_curator" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Call::propose_curator { - parent_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - curator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - fee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::propose_curator { - parent_bounty_id: { - let val = *vals - .get(&Some("parent_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parent_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = *vals - .get(&Some("child_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - curator: { - let val = *vals - .get(&Some("curator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "curator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - fee: { - let val = *vals - .get(&Some("fee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - }) - }; - } - if value.name() == "accept_curator" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::accept_curator { - parent_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::accept_curator { - parent_bounty_id: { - let val = *vals - .get(&Some("parent_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parent_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = *vals - .get(&Some("child_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - }) - }; - } - if value.name() == "unassign_curator" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::unassign_curator { - parent_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::unassign_curator { - parent_bounty_id: { - let val = *vals - .get(&Some("parent_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parent_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = *vals - .get(&Some("child_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - }) - }; - } - if value.name() == "award_child_bounty" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::award_child_bounty { - parent_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::award_child_bounty { - parent_bounty_id: { - let val = *vals - .get(&Some("parent_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parent_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = *vals - .get(&Some("child_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - }; - } - if value.name() == "claim_child_bounty" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::claim_child_bounty { - parent_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::claim_child_bounty { - parent_bounty_id: { - let val = *vals - .get(&Some("parent_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parent_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = *vals - .get(&Some("child_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - }) - }; - } - if value.name() == "close_child_bounty" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::close_child_bounty { - parent_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::close_child_bounty { - parent_bounty_id: { - let val = *vals - .get(&Some("parent_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parent_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty_id"))? - }, - child_bounty_id: { - let val = *vals - .get(&Some("child_bounty_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_bounty_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("child_bounty_id"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "add_child_bounty", - "propose_curator", - "accept_curator", - "unassign_curator", - "award_child_bounty", - "claim_child_bounty", - "close_child_bounty", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::add_child_bounty { - parent_bounty_id, - value, - description, - } => { - ::subxt::ext::scale_encode::Variant { - name: "add_child_bounty", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("description"), - description as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::propose_curator { - parent_bounty_id, - child_bounty_id, - curator, - fee, - } => { - ::subxt::ext::scale_encode::Variant { - name: "propose_curator", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("curator"), - curator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee"), - fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::accept_curator { - parent_bounty_id, - child_bounty_id, - } => { - ::subxt::ext::scale_encode::Variant { - name: "accept_curator", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::unassign_curator { - parent_bounty_id, - child_bounty_id, - } => { - ::subxt::ext::scale_encode::Variant { - name: "unassign_curator", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::award_child_bounty { - parent_bounty_id, - child_bounty_id, - beneficiary, - } => { - ::subxt::ext::scale_encode::Variant { - name: "award_child_bounty", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::claim_child_bounty { - parent_bounty_id, - child_bounty_id, - } => { - ::subxt::ext::scale_encode::Variant { - name: "claim_child_bounty", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::close_child_bounty { - parent_bounty_id, - child_bounty_id, - } => { - ::subxt::ext::scale_encode::Variant { - name: "close_child_bounty", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty_id"), - parent_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_bounty_id"), - child_bounty_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::add_child_bounty { - parent_bounty_id: __self_0, - value: __self_1, - description: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "add_child_bounty", - "parent_bounty_id", - __self_0, - "value", - __self_1, - "description", - &__self_2, - ) - } - Call::propose_curator { - parent_bounty_id: __self_0, - child_bounty_id: __self_1, - curator: __self_2, - fee: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "propose_curator", - "parent_bounty_id", - __self_0, - "child_bounty_id", - __self_1, - "curator", - __self_2, - "fee", - &__self_3, - ) - } - Call::accept_curator { - parent_bounty_id: __self_0, - child_bounty_id: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "accept_curator", - "parent_bounty_id", - __self_0, - "child_bounty_id", - &__self_1, - ) - } - Call::unassign_curator { - parent_bounty_id: __self_0, - child_bounty_id: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "unassign_curator", - "parent_bounty_id", - __self_0, - "child_bounty_id", - &__self_1, - ) - } - Call::award_child_bounty { - parent_bounty_id: __self_0, - child_bounty_id: __self_1, - beneficiary: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "award_child_bounty", - "parent_bounty_id", - __self_0, - "child_bounty_id", - __self_1, - "beneficiary", - &__self_2, - ) - } - Call::claim_child_bounty { - parent_bounty_id: __self_0, - child_bounty_id: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "claim_child_bounty", - "parent_bounty_id", - __self_0, - "child_bounty_id", - &__self_1, - ) - } - Call::close_child_bounty { - parent_bounty_id: __self_0, - child_bounty_id: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "close_child_bounty", - "parent_bounty_id", - __self_0, - "child_bounty_id", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - ParentBountyNotActive, - #[codec(index = 1)] - InsufficientBountyBalance, - #[codec(index = 2)] - TooManyChildBounties, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ParentBountyNotActive) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InsufficientBountyBalance) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyChildBounties) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::ParentBountyNotActive => 0_usize, - Error::InsufficientBountyBalance => 0_usize, - Error::TooManyChildBounties => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::ParentBountyNotActive => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::InsufficientBountyBalance => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::TooManyChildBounties => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "ParentBountyNotActive" { - return Ok(Error::ParentBountyNotActive); - } - if value.name() == "InsufficientBountyBalance" { - return Ok(Error::InsufficientBountyBalance); - } - if value.name() == "TooManyChildBounties" { - return Ok(Error::TooManyChildBounties); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "ParentBountyNotActive", - "InsufficientBountyBalance", - "TooManyChildBounties", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::ParentBountyNotActive => { - ::subxt::ext::scale_encode::Variant { - name: "ParentBountyNotActive", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InsufficientBountyBalance => { - ::subxt::ext::scale_encode::Variant { - name: "InsufficientBountyBalance", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyChildBounties => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyChildBounties", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::ParentBountyNotActive => "ParentBountyNotActive", - Error::InsufficientBountyBalance => { - "InsufficientBountyBalance" - } - Error::TooManyChildBounties => "TooManyChildBounties", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - Added { - index: ::core::primitive::u32, - child_index: ::core::primitive::u32, - }, - #[codec(index = 1)] - Awarded { - index: ::core::primitive::u32, - child_index: ::core::primitive::u32, - beneficiary: ::subxt::utils::AccountId32, - }, - #[codec(index = 2)] - Claimed { - index: ::core::primitive::u32, - child_index: ::core::primitive::u32, - payout: ::core::primitive::u128, - beneficiary: ::subxt::utils::AccountId32, - }, - #[codec(index = 3)] - Canceled { - index: ::core::primitive::u32, - child_index: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Added { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Added::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - child_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Added::child_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Awarded { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Awarded::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - child_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Awarded::child_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Awarded::beneficiary`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Claimed { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Claimed::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - child_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Claimed::child_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - payout: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Claimed::payout`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Claimed::beneficiary`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Canceled { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Canceled::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - child_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Canceled::child_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::Added { ref index, ref child_index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(child_index), - ) - } - Event::Awarded { - ref index, - ref child_index, - ref beneficiary, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(child_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - } - Event::Claimed { - ref index, - ref child_index, - ref payout, - ref beneficiary, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(child_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(payout), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - } - Event::Canceled { ref index, ref child_index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(child_index), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::Added { ref index, ref child_index } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - child_index, - __codec_dest_edqy, - ); - } - Event::Awarded { - ref index, - ref child_index, - ref beneficiary, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - child_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - } - Event::Claimed { - ref index, - ref child_index, - ref payout, - ref beneficiary, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - child_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - payout, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - } - Event::Canceled { ref index, ref child_index } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - child_index, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Added" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Added { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - child_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("child_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Added { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - child_index: { - let val = *vals - .get(&Some("child_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("child_index"))? - }, - }) - }; - } - if value.name() == "Awarded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::Awarded { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - child_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("child_index"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Awarded { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - child_index: { - let val = *vals - .get(&Some("child_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("child_index"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - }; - } - if value.name() == "Claimed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Event::Claimed { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - child_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("child_index"))? - }, - payout: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Claimed { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - child_index: { - let val = *vals - .get(&Some("child_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("child_index"))? - }, - payout: { - let val = *vals - .get(&Some("payout")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "payout".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - }; - } - if value.name() == "Canceled" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Canceled { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - child_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("child_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Canceled { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - child_index: { - let val = *vals - .get(&Some("child_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "child_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("child_index"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Added", - "Awarded", - "Claimed", - "Canceled", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Added { index, child_index } => { - ::subxt::ext::scale_encode::Variant { - name: "Added", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_index"), - child_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Awarded { index, child_index, beneficiary } => { - ::subxt::ext::scale_encode::Variant { - name: "Awarded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_index"), - child_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Claimed { - index, - child_index, - payout, - beneficiary, - } => { - ::subxt::ext::scale_encode::Variant { - name: "Claimed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_index"), - child_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("payout"), - payout as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Canceled { index, child_index } => { - ::subxt::ext::scale_encode::Variant { - name: "Canceled", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("child_index"), - child_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::Added { index: __self_0, child_index: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Added", - "index", - __self_0, - "child_index", - &__self_1, - ) - } - Event::Awarded { - index: __self_0, - child_index: __self_1, - beneficiary: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Awarded", - "index", - __self_0, - "child_index", - __self_1, - "beneficiary", - &__self_2, - ) - } - Event::Claimed { - index: __self_0, - child_index: __self_1, - payout: __self_2, - beneficiary: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Claimed", - "index", - __self_0, - "child_index", - __self_1, - "payout", - __self_2, - "beneficiary", - &__self_3, - ) - } - Event::Canceled { - index: __self_0, - child_index: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Canceled", - "index", - __self_0, - "child_index", - &__self_1, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ChildBounty<_0, _1, _2> { - pub parent_bounty: ::core::primitive::u32, - pub value: _1, - pub fee: _1, - pub curator_deposit: _1, - pub status: runtime_types::pallet_child_bounties::ChildBountyStatus< - _0, - _2, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Decode - for ChildBounty<_0, _1, _2> - where - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - runtime_types::pallet_child_bounties::ChildBountyStatus< - _0, - _2, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_child_bounties::ChildBountyStatus< - _0, - _2, - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ChildBounty::<_0, _1, _2> { - parent_bounty: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ChildBounty::parent_bounty`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ChildBounty::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fee: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ChildBounty::fee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - curator_deposit: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ChildBounty::curator_deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - status: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ChildBounty::status`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Encode - for ChildBounty<_0, _1, _2> - where - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - runtime_types::pallet_child_bounties::ChildBountyStatus< - _0, - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_child_bounties::ChildBountyStatus< - _0, - _2, - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.parent_bounty), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.value), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.fee), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.curator_deposit, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.status), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.parent_bounty, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.value, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.fee, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.curator_deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.status, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::EncodeLike - for ChildBounty<_0, _1, _2> - where - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - runtime_types::pallet_child_bounties::ChildBountyStatus< - _0, - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_child_bounties::ChildBountyStatus< - _0, - _2, - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2>( - ::core::marker::PhantomData<(_0, _1, _2)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1, _2> ::subxt::ext::scale_decode::IntoVisitor - for ChildBounty<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ChildBounty<_0, _1, _2>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ChildBounty { - parent_bounty: { - let val = *vals - .get(&Some("parent_bounty")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parent_bounty".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - fee: { - let val = *vals - .get(&Some("fee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - curator_deposit: { - let val = *vals - .get(&Some("curator_deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "curator_deposit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("curator_deposit"))? - }, - status: { - let val = *vals - .get(&Some("status")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "status".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("status"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(ChildBounty { - parent_bounty: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_bounty"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - fee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - curator_deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("curator_deposit"))? - }, - status: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("status"))? - }, - }) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::DecodeAsFields - for ChildBounty<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsType - for ChildBounty<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ChildBounty { - parent_bounty, - value, - fee, - curator_deposit, - status, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty"), - parent_bounty - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee"), - fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("curator_deposit"), - curator_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("status"), - status as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsFields - for ChildBounty<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ChildBounty { - parent_bounty, - value, - fee, - curator_deposit, - status, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_bounty"), - parent_bounty - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee"), - fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("curator_deposit"), - curator_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("status"), - status as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - > ::core::fmt::Debug for ChildBounty<_0, _1, _2> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "ChildBounty", - "parent_bounty", - &self.parent_bounty, - "value", - &self.value, - "fee", - &self.fee, - "curator_deposit", - &self.curator_deposit, - "status", - &&self.status, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ChildBountyStatus<_0, _1> { - #[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 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode - for ChildBountyStatus<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `ChildBountyStatus`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ChildBountyStatus::<_0, _1>::Added, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ChildBountyStatus::< - _0, - _1, - >::CuratorProposed { - curator: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ChildBountyStatus::CuratorProposed::curator`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ChildBountyStatus::< - _0, - _1, - >::Active { - curator: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ChildBountyStatus::Active::curator`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ChildBountyStatus::< - _0, - _1, - >::PendingPayout { - curator: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ChildBountyStatus::PendingPayout::curator`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ChildBountyStatus::PendingPayout::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - unlock_at: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ChildBountyStatus::PendingPayout::unlock_at`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `ChildBountyStatus`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode - for ChildBountyStatus<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - ChildBountyStatus::Added => 0_usize, - ChildBountyStatus::CuratorProposed { ref curator } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(curator), - ) - } - ChildBountyStatus::Active { ref curator } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(curator), - ) - } - ChildBountyStatus::PendingPayout { - ref curator, - ref beneficiary, - ref unlock_at, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(curator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(unlock_at), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - ChildBountyStatus::Added => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - ChildBountyStatus::CuratorProposed { ref curator } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - curator, - __codec_dest_edqy, - ); - } - ChildBountyStatus::Active { ref curator } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - curator, - __codec_dest_edqy, - ); - } - ChildBountyStatus::PendingPayout { - ref curator, - ref beneficiary, - ref unlock_at, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - curator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - unlock_at, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for ChildBountyStatus<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for ChildBountyStatus<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ChildBountyStatus<_0, _1>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Added" { - return Ok(ChildBountyStatus::Added); - } - if value.name() == "CuratorProposed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(ChildBountyStatus::CuratorProposed { - curator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ChildBountyStatus::CuratorProposed { - curator: { - let val = *vals - .get(&Some("curator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "curator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - }) - }; - } - if value.name() == "Active" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(ChildBountyStatus::Active { - curator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ChildBountyStatus::Active { - curator: { - let val = *vals - .get(&Some("curator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "curator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - }) - }; - } - if value.name() == "PendingPayout" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(ChildBountyStatus::PendingPayout { - curator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - unlock_at: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("unlock_at"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ChildBountyStatus::PendingPayout { - curator: { - let val = *vals - .get(&Some("curator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "curator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("curator"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - unlock_at: { - let val = *vals - .get(&Some("unlock_at")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "unlock_at".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("unlock_at"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Added", - "CuratorProposed", - "Active", - "PendingPayout", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for ChildBountyStatus<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Added => { - ::subxt::ext::scale_encode::Variant { - name: "Added", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CuratorProposed { curator } => { - ::subxt::ext::scale_encode::Variant { - name: "CuratorProposed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("curator"), - curator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Active { curator } => { - ::subxt::ext::scale_encode::Variant { - name: "Active", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("curator"), - curator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PendingPayout { curator, beneficiary, unlock_at } => { - ::subxt::ext::scale_encode::Variant { - name: "PendingPayout", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("curator"), - curator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("unlock_at"), - unlock_at as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for ChildBountyStatus<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - ChildBountyStatus::Added => { - ::core::fmt::Formatter::write_str(f, "Added") - } - ChildBountyStatus::CuratorProposed { curator: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "CuratorProposed", - "curator", - &__self_0, - ) - } - ChildBountyStatus::Active { curator: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Active", - "curator", - &__self_0, - ) - } - ChildBountyStatus::PendingPayout { - curator: __self_0, - beneficiary: __self_1, - unlock_at: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "PendingPayout", - "curator", - __self_0, - "beneficiary", - __self_1, - "unlock_at", - &__self_2, - ) - } - } - } - } - } - pub mod pallet_collective { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - set_members { - new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, - prime: ::core::option::Option<::subxt::utils::AccountId32>, - old_count: ::core::primitive::u32, - }, - #[codec(index = 1)] - execute { - proposal: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, - #[codec(index = 2)] - 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)] - vote { - proposal: ::subxt::utils::H256, - #[codec(compact)] - index: ::core::primitive::u32, - approve: ::core::primitive::bool, - }, - #[codec(index = 5)] - disapprove_proposal { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 6)] - close { - proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - index: ::core::primitive::u32, - proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_members { - new_members: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_members::new_members`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - prime: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_members::prime`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - old_count: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_members::old_count`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::execute { - proposal: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::execute::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - length_bound: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::execute::length_bound`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::propose { - threshold: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::propose::threshold`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - proposal: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::propose::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - length_bound: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::propose::length_bound`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::vote { - proposal: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::vote::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::vote::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - approve: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::vote::approve`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::disapprove_proposal { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::disapprove_proposal::proposal_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::close { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::close::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::close::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - proposal_weight_bound: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::close::proposal_weight_bound`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - length_bound: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::close::length_bound`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::set_members { - ref new_members, - ref prime, - ref old_count, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(new_members), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(prime), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(old_count), - ) - } - Call::execute { ref proposal, ref length_bound } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(length_bound), - ), - ) - } - Call::propose { - ref threshold, - ref proposal, - ref length_bound, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(threshold), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(length_bound), - ), - ) - } - Call::vote { ref proposal, ref index, ref approve } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(approve), - ) - } - Call::disapprove_proposal { ref proposal_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - } - Call::close { - ref proposal_hash, - ref index, - ref proposal_weight_bound, - ref length_bound, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - proposal_weight_bound, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(length_bound), - ), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::set_members { - ref new_members, - ref prime, - ref old_count, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new_members, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - prime, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - old_count, - __codec_dest_edqy, - ); - } - Call::execute { ref proposal, ref length_bound } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(length_bound), - __codec_dest_edqy, - ); - } - } - Call::propose { - ref threshold, - ref proposal, - ref length_bound, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(threshold), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - proposal, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(length_bound), - __codec_dest_edqy, - ); - } - } - Call::vote { ref proposal, ref index, ref approve } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - approve, - __codec_dest_edqy, - ); - } - Call::disapprove_proposal { ref proposal_hash } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - } - Call::close { - ref proposal_hash, - ref index, - ref proposal_weight_bound, - ref length_bound, - } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - proposal_weight_bound, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(length_bound), - __codec_dest_edqy, - ); - } - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "set_members" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::set_members { - new_members: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_members"))? - }, - prime: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prime"))? - }, - old_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("old_count"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_members { - new_members: { - let val = *vals - .get(&Some("new_members")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_members".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_members"))? - }, - prime: { - let val = *vals - .get(&Some("prime")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prime".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prime"))? - }, - old_count: { - let val = *vals - .get(&Some("old_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "old_count".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("old_count"))? - }, - }) - }; - } - if value.name() == "execute" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::execute { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - length_bound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::execute { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - length_bound: { - let val = *vals - .get(&Some("length_bound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "length_bound".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - }; - } - if value.name() == "propose" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::propose { - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - length_bound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::propose { - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - length_bound: { - let val = *vals - .get(&Some("length_bound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "length_bound".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - }; - } - if value.name() == "vote" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::vote { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - approve: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("approve"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::vote { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - approve: { - let val = *vals - .get(&Some("approve")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "approve".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("approve"))? - }, - }) - }; - } - if value.name() == "disapprove_proposal" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::disapprove_proposal { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::disapprove_proposal { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - }; - } - if value.name() == "close" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Call::close { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - proposal_weight_bound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_weight_bound"))? - }, - length_bound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::close { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - proposal_weight_bound: { - let val = *vals - .get(&Some("proposal_weight_bound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_weight_bound".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_weight_bound"))? - }, - length_bound: { - let val = *vals - .get(&Some("length_bound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "length_bound".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "set_members", - "execute", - "propose", - "vote", - "disapprove_proposal", - "close", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::set_members { new_members, prime, old_count } => { - ::subxt::ext::scale_encode::Variant { - name: "set_members", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new_members"), - new_members as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prime"), - prime as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("old_count"), - old_count as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::execute { proposal, length_bound } => { - ::subxt::ext::scale_encode::Variant { - name: "execute", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::propose { threshold, proposal, length_bound } => { - ::subxt::ext::scale_encode::Variant { - name: "propose", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::vote { proposal, index, approve } => { - ::subxt::ext::scale_encode::Variant { - name: "vote", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("approve"), - approve as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::disapprove_proposal { proposal_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "disapprove_proposal", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::close { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - } => { - ::subxt::ext::scale_encode::Variant { - name: "close", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_weight_bound"), - proposal_weight_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::set_members { - new_members: __self_0, - prime: __self_1, - old_count: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "set_members", - "new_members", - __self_0, - "prime", - __self_1, - "old_count", - &__self_2, - ) - } - Call::execute { - proposal: __self_0, - length_bound: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "execute", - "proposal", - __self_0, - "length_bound", - &__self_1, - ) - } - Call::propose { - threshold: __self_0, - proposal: __self_1, - length_bound: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "propose", - "threshold", - __self_0, - "proposal", - __self_1, - "length_bound", - &__self_2, - ) - } - Call::vote { - proposal: __self_0, - index: __self_1, - approve: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "vote", - "proposal", - __self_0, - "index", - __self_1, - "approve", - &__self_2, - ) - } - Call::disapprove_proposal { proposal_hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "disapprove_proposal", - "proposal_hash", - &__self_0, - ) - } - Call::close { - proposal_hash: __self_0, - index: __self_1, - proposal_weight_bound: __self_2, - length_bound: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "close", - "proposal_hash", - __self_0, - "index", - __self_1, - "proposal_weight_bound", - __self_2, - "length_bound", - &__self_3, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call2 { - #[codec(index = 0)] - set_members { - new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, - prime: ::core::option::Option<::subxt::utils::AccountId32>, - old_count: ::core::primitive::u32, - }, - #[codec(index = 1)] - execute { - proposal: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, - #[codec(index = 2)] - 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)] - vote { - proposal: ::subxt::utils::H256, - #[codec(compact)] - index: ::core::primitive::u32, - approve: ::core::primitive::bool, - }, - #[codec(index = 5)] - disapprove_proposal { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 6)] - close { - proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - index: ::core::primitive::u32, - proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call2 { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call2`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call2::set_members { - new_members: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call2::set_members::new_members`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - prime: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call2::set_members::prime`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - old_count: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call2::set_members::old_count`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call2::execute { - proposal: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call2::execute::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - length_bound: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call2::execute::length_bound`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call2::propose { - threshold: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call2::propose::threshold`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - proposal: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call2::propose::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - length_bound: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call2::propose::length_bound`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call2::vote { - proposal: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call2::vote::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call2::vote::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - approve: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call2::vote::approve`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call2::disapprove_proposal { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call2::disapprove_proposal::proposal_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call2::close { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call2::close::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call2::close::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - proposal_weight_bound: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call2::close::proposal_weight_bound`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - length_bound: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call2::close::length_bound`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call2`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call2 { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call2::set_members { - ref new_members, - ref prime, - ref old_count, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(new_members), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(prime), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(old_count), - ) - } - Call2::execute { ref proposal, ref length_bound } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(length_bound), - ), - ) - } - Call2::propose { - ref threshold, - ref proposal, - ref length_bound, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(threshold), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(length_bound), - ), - ) - } - Call2::vote { ref proposal, ref index, ref approve } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(approve), - ) - } - Call2::disapprove_proposal { ref proposal_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - } - Call2::close { - ref proposal_hash, - ref index, - ref proposal_weight_bound, - ref length_bound, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - proposal_weight_bound, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(length_bound), - ), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call2::set_members { - ref new_members, - ref prime, - ref old_count, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new_members, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - prime, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - old_count, - __codec_dest_edqy, - ); - } - Call2::execute { ref proposal, ref length_bound } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(length_bound), - __codec_dest_edqy, - ); - } - } - Call2::propose { - ref threshold, - ref proposal, - ref length_bound, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(threshold), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - proposal, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(length_bound), - __codec_dest_edqy, - ); - } - } - Call2::vote { ref proposal, ref index, ref approve } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - approve, - __codec_dest_edqy, - ); - } - Call2::disapprove_proposal { ref proposal_hash } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - } - Call2::close { - ref proposal_hash, - ref index, - ref proposal_weight_bound, - ref length_bound, - } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - proposal_weight_bound, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(length_bound), - __codec_dest_edqy, - ); - } - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call2 {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call2 { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call2; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "set_members" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call2::set_members { - new_members: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_members"))? - }, - prime: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prime"))? - }, - old_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("old_count"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call2::set_members { - new_members: { - let val = *vals - .get(&Some("new_members")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_members".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_members"))? - }, - prime: { - let val = *vals - .get(&Some("prime")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prime".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prime"))? - }, - old_count: { - let val = *vals - .get(&Some("old_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "old_count".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("old_count"))? - }, - }) - }; - } - if value.name() == "execute" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call2::execute { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - length_bound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call2::execute { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - length_bound: { - let val = *vals - .get(&Some("length_bound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "length_bound".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - }; - } - if value.name() == "propose" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call2::propose { - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - length_bound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call2::propose { - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - length_bound: { - let val = *vals - .get(&Some("length_bound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "length_bound".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - }; - } - if value.name() == "vote" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call2::vote { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - approve: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("approve"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call2::vote { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - approve: { - let val = *vals - .get(&Some("approve")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "approve".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("approve"))? - }, - }) - }; - } - if value.name() == "disapprove_proposal" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call2::disapprove_proposal { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call2::disapprove_proposal { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - }; - } - if value.name() == "close" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Call2::close { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - proposal_weight_bound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_weight_bound"))? - }, - length_bound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call2::close { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - proposal_weight_bound: { - let val = *vals - .get(&Some("proposal_weight_bound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_weight_bound".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_weight_bound"))? - }, - length_bound: { - let val = *vals - .get(&Some("length_bound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "length_bound".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("length_bound"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "set_members", - "execute", - "propose", - "vote", - "disapprove_proposal", - "close", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call2 { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::set_members { new_members, prime, old_count } => { - ::subxt::ext::scale_encode::Variant { - name: "set_members", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new_members"), - new_members as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prime"), - prime as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("old_count"), - old_count as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::execute { proposal, length_bound } => { - ::subxt::ext::scale_encode::Variant { - name: "execute", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::propose { threshold, proposal, length_bound } => { - ::subxt::ext::scale_encode::Variant { - name: "propose", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::vote { proposal, index, approve } => { - ::subxt::ext::scale_encode::Variant { - name: "vote", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("approve"), - approve as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::disapprove_proposal { proposal_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "disapprove_proposal", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::close { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - } => { - ::subxt::ext::scale_encode::Variant { - name: "close", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_weight_bound"), - proposal_weight_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("length_bound"), - length_bound - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call2::set_members { - new_members: __self_0, - prime: __self_1, - old_count: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "set_members", - "new_members", - __self_0, - "prime", - __self_1, - "old_count", - &__self_2, - ) - } - Call2::execute { - proposal: __self_0, - length_bound: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "execute", - "proposal", - __self_0, - "length_bound", - &__self_1, - ) - } - Call2::propose { - threshold: __self_0, - proposal: __self_1, - length_bound: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "propose", - "threshold", - __self_0, - "proposal", - __self_1, - "length_bound", - &__self_2, - ) - } - Call2::vote { - proposal: __self_0, - index: __self_1, - approve: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "vote", - "proposal", - __self_0, - "index", - __self_1, - "approve", - &__self_2, - ) - } - Call2::disapprove_proposal { proposal_hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "disapprove_proposal", - "proposal_hash", - &__self_0, - ) - } - Call2::close { - proposal_hash: __self_0, - index: __self_1, - proposal_weight_bound: __self_2, - length_bound: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "close", - "proposal_hash", - __self_0, - "index", - __self_1, - "proposal_weight_bound", - __self_2, - "length_bound", - &__self_3, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - NotMember, - #[codec(index = 1)] - DuplicateProposal, - #[codec(index = 2)] - ProposalMissing, - #[codec(index = 3)] - WrongIndex, - #[codec(index = 4)] - DuplicateVote, - #[codec(index = 5)] - AlreadyInitialized, - #[codec(index = 6)] - TooEarly, - #[codec(index = 7)] - TooManyProposals, - #[codec(index = 8)] - WrongProposalWeight, - #[codec(index = 9)] - WrongProposalLength, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotMember) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::DuplicateProposal) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ProposalMissing) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::WrongIndex) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::DuplicateVote) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyInitialized) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooEarly) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyProposals) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::WrongProposalWeight) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::WrongProposalLength) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::NotMember => 0_usize, - Error::DuplicateProposal => 0_usize, - Error::ProposalMissing => 0_usize, - Error::WrongIndex => 0_usize, - Error::DuplicateVote => 0_usize, - Error::AlreadyInitialized => 0_usize, - Error::TooEarly => 0_usize, - Error::TooManyProposals => 0_usize, - Error::WrongProposalWeight => 0_usize, - Error::WrongProposalLength => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::NotMember => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::DuplicateProposal => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::ProposalMissing => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::WrongIndex => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::DuplicateVote => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::AlreadyInitialized => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::TooEarly => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::TooManyProposals => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::WrongProposalWeight => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::WrongProposalLength => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NotMember" { - return Ok(Error::NotMember); - } - if value.name() == "DuplicateProposal" { - return Ok(Error::DuplicateProposal); - } - if value.name() == "ProposalMissing" { - return Ok(Error::ProposalMissing); - } - if value.name() == "WrongIndex" { - return Ok(Error::WrongIndex); - } - if value.name() == "DuplicateVote" { - return Ok(Error::DuplicateVote); - } - if value.name() == "AlreadyInitialized" { - return Ok(Error::AlreadyInitialized); - } - if value.name() == "TooEarly" { - return Ok(Error::TooEarly); - } - if value.name() == "TooManyProposals" { - return Ok(Error::TooManyProposals); - } - if value.name() == "WrongProposalWeight" { - return Ok(Error::WrongProposalWeight); - } - if value.name() == "WrongProposalLength" { - return Ok(Error::WrongProposalLength); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "NotMember", - "DuplicateProposal", - "ProposalMissing", - "WrongIndex", - "DuplicateVote", - "AlreadyInitialized", - "TooEarly", - "TooManyProposals", - "WrongProposalWeight", - "WrongProposalLength", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NotMember => { - ::subxt::ext::scale_encode::Variant { - name: "NotMember", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DuplicateProposal => { - ::subxt::ext::scale_encode::Variant { - name: "DuplicateProposal", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ProposalMissing => { - ::subxt::ext::scale_encode::Variant { - name: "ProposalMissing", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WrongIndex => { - ::subxt::ext::scale_encode::Variant { - name: "WrongIndex", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DuplicateVote => { - ::subxt::ext::scale_encode::Variant { - name: "DuplicateVote", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyInitialized => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyInitialized", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooEarly => { - ::subxt::ext::scale_encode::Variant { - name: "TooEarly", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyProposals => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyProposals", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WrongProposalWeight => { - ::subxt::ext::scale_encode::Variant { - name: "WrongProposalWeight", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WrongProposalLength => { - ::subxt::ext::scale_encode::Variant { - name: "WrongProposalLength", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::NotMember => "NotMember", - Error::DuplicateProposal => "DuplicateProposal", - Error::ProposalMissing => "ProposalMissing", - Error::WrongIndex => "WrongIndex", - Error::DuplicateVote => "DuplicateVote", - Error::AlreadyInitialized => "AlreadyInitialized", - Error::TooEarly => "TooEarly", - Error::TooManyProposals => "TooManyProposals", - Error::WrongProposalWeight => "WrongProposalWeight", - Error::WrongProposalLength => "WrongProposalLength", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error2 { - #[codec(index = 0)] - NotMember, - #[codec(index = 1)] - DuplicateProposal, - #[codec(index = 2)] - ProposalMissing, - #[codec(index = 3)] - WrongIndex, - #[codec(index = 4)] - DuplicateVote, - #[codec(index = 5)] - AlreadyInitialized, - #[codec(index = 6)] - TooEarly, - #[codec(index = 7)] - TooManyProposals, - #[codec(index = 8)] - WrongProposalWeight, - #[codec(index = 9)] - WrongProposalLength, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error2 { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error2`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error2::NotMember) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error2::DuplicateProposal) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error2::ProposalMissing) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error2::WrongIndex) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error2::DuplicateVote) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error2::AlreadyInitialized) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error2::TooEarly) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error2::TooManyProposals) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error2::WrongProposalWeight) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error2::WrongProposalLength) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error2`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error2 { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error2::NotMember => 0_usize, - Error2::DuplicateProposal => 0_usize, - Error2::ProposalMissing => 0_usize, - Error2::WrongIndex => 0_usize, - Error2::DuplicateVote => 0_usize, - Error2::AlreadyInitialized => 0_usize, - Error2::TooEarly => 0_usize, - Error2::TooManyProposals => 0_usize, - Error2::WrongProposalWeight => 0_usize, - Error2::WrongProposalLength => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error2::NotMember => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error2::DuplicateProposal => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error2::ProposalMissing => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error2::WrongIndex => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error2::DuplicateVote => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error2::AlreadyInitialized => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error2::TooEarly => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error2::TooManyProposals => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error2::WrongProposalWeight => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error2::WrongProposalLength => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error2 {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error2 { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error2; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NotMember" { - return Ok(Error2::NotMember); - } - if value.name() == "DuplicateProposal" { - return Ok(Error2::DuplicateProposal); - } - if value.name() == "ProposalMissing" { - return Ok(Error2::ProposalMissing); - } - if value.name() == "WrongIndex" { - return Ok(Error2::WrongIndex); - } - if value.name() == "DuplicateVote" { - return Ok(Error2::DuplicateVote); - } - if value.name() == "AlreadyInitialized" { - return Ok(Error2::AlreadyInitialized); - } - if value.name() == "TooEarly" { - return Ok(Error2::TooEarly); - } - if value.name() == "TooManyProposals" { - return Ok(Error2::TooManyProposals); - } - if value.name() == "WrongProposalWeight" { - return Ok(Error2::WrongProposalWeight); - } - if value.name() == "WrongProposalLength" { - return Ok(Error2::WrongProposalLength); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "NotMember", - "DuplicateProposal", - "ProposalMissing", - "WrongIndex", - "DuplicateVote", - "AlreadyInitialized", - "TooEarly", - "TooManyProposals", - "WrongProposalWeight", - "WrongProposalLength", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error2 { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NotMember => { - ::subxt::ext::scale_encode::Variant { - name: "NotMember", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DuplicateProposal => { - ::subxt::ext::scale_encode::Variant { - name: "DuplicateProposal", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ProposalMissing => { - ::subxt::ext::scale_encode::Variant { - name: "ProposalMissing", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WrongIndex => { - ::subxt::ext::scale_encode::Variant { - name: "WrongIndex", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DuplicateVote => { - ::subxt::ext::scale_encode::Variant { - name: "DuplicateVote", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyInitialized => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyInitialized", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooEarly => { - ::subxt::ext::scale_encode::Variant { - name: "TooEarly", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyProposals => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyProposals", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WrongProposalWeight => { - ::subxt::ext::scale_encode::Variant { - name: "WrongProposalWeight", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WrongProposalLength => { - ::subxt::ext::scale_encode::Variant { - name: "WrongProposalLength", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error2::NotMember => "NotMember", - Error2::DuplicateProposal => "DuplicateProposal", - Error2::ProposalMissing => "ProposalMissing", - Error2::WrongIndex => "WrongIndex", - Error2::DuplicateVote => "DuplicateVote", - Error2::AlreadyInitialized => "AlreadyInitialized", - Error2::TooEarly => "TooEarly", - Error2::TooManyProposals => "TooManyProposals", - Error2::WrongProposalWeight => "WrongProposalWeight", - Error2::WrongProposalLength => "WrongProposalLength", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - Proposed { - account: ::subxt::utils::AccountId32, - proposal_index: ::core::primitive::u32, - proposal_hash: ::subxt::utils::H256, - threshold: ::core::primitive::u32, - }, - #[codec(index = 1)] - Voted { - account: ::subxt::utils::AccountId32, - proposal_hash: ::subxt::utils::H256, - voted: ::core::primitive::bool, - yes: ::core::primitive::u32, - no: ::core::primitive::u32, - }, - #[codec(index = 2)] - Approved { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 3)] - Disapproved { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 4)] - Executed { - proposal_hash: ::subxt::utils::H256, - result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - }, - #[codec(index = 5)] - MemberExecuted { - proposal_hash: ::subxt::utils::H256, - result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - }, - #[codec(index = 6)] - Closed { - proposal_hash: ::subxt::utils::H256, - yes: ::core::primitive::u32, - no: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Proposed { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Proposed::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::Proposed::proposal_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Proposed::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - threshold: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Proposed::threshold`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Voted { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Voted::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Voted::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - voted: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Voted::voted`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - yes: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Voted::yes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - no: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Voted::no`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Approved { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Approved::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Disapproved { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::Disapproved::proposal_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Executed { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Executed::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Executed::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::MemberExecuted { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::MemberExecuted::proposal_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::MemberExecuted::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Closed { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Closed::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - yes: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Closed::yes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - no: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Closed::no`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::Proposed { - ref account, - ref proposal_index, - ref proposal_hash, - ref threshold, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(threshold), - ) - } - Event::Voted { - ref account, - ref proposal_hash, - ref voted, - ref yes, - ref no, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(voted), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(yes)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(no)) - } - Event::Approved { ref proposal_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - } - Event::Disapproved { ref proposal_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - } - Event::Executed { ref proposal_hash, ref result } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(result), - ) - } - Event::MemberExecuted { ref proposal_hash, ref result } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(result), - ) - } - Event::Closed { ref proposal_hash, ref yes, ref no } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(yes)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(no)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::Proposed { - ref account, - ref proposal_index, - ref proposal_hash, - ref threshold, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proposal_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - threshold, - __codec_dest_edqy, - ); - } - Event::Voted { - ref account, - ref proposal_hash, - ref voted, - ref yes, - ref no, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - voted, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - yes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - no, - __codec_dest_edqy, - ); - } - Event::Approved { ref proposal_hash } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - } - Event::Disapproved { ref proposal_hash } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - } - Event::Executed { ref proposal_hash, ref result } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - result, - __codec_dest_edqy, - ); - } - Event::MemberExecuted { ref proposal_hash, ref result } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - result, - __codec_dest_edqy, - ); - } - Event::Closed { ref proposal_hash, ref yes, ref no } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - yes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - no, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Proposed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Event::Proposed { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - proposal_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Proposed { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - proposal_index: { - let val = *vals - .get(&Some("proposal_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - }) - }; - } - if value.name() == "Voted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Event::Voted { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - voted: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("voted"))? - }, - yes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("yes"))? - }, - no: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("no"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Voted { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - voted: { - let val = *vals - .get(&Some("voted")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "voted".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("voted"))? - }, - yes: { - let val = *vals - .get(&Some("yes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "yes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("yes"))? - }, - no: { - let val = *vals - .get(&Some("no")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "no".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("no"))? - }, - }) - }; - } - if value.name() == "Approved" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Approved { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Approved { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - }; - } - if value.name() == "Disapproved" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Disapproved { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Disapproved { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - }; - } - if value.name() == "Executed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Executed { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Executed { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - }; - } - if value.name() == "MemberExecuted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::MemberExecuted { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::MemberExecuted { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - }; - } - if value.name() == "Closed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::Closed { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - yes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("yes"))? - }, - no: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("no"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Closed { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - yes: { - let val = *vals - .get(&Some("yes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "yes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("yes"))? - }, - no: { - let val = *vals - .get(&Some("no")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "no".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("no"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Proposed", - "Voted", - "Approved", - "Disapproved", - "Executed", - "MemberExecuted", - "Closed", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Proposed { - account, - proposal_index, - proposal_hash, - threshold, - } => { - ::subxt::ext::scale_encode::Variant { - name: "Proposed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Voted { account, proposal_hash, voted, yes, no } => { - ::subxt::ext::scale_encode::Variant { - name: "Voted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("voted"), - voted as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("yes"), - yes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("no"), - no as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Approved { proposal_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "Approved", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Disapproved { proposal_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "Disapproved", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Executed { proposal_hash, result } => { - ::subxt::ext::scale_encode::Variant { - name: "Executed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MemberExecuted { proposal_hash, result } => { - ::subxt::ext::scale_encode::Variant { - name: "MemberExecuted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Closed { proposal_hash, yes, no } => { - ::subxt::ext::scale_encode::Variant { - name: "Closed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("yes"), - yes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("no"), - no as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::Proposed { - account: __self_0, - proposal_index: __self_1, - proposal_hash: __self_2, - threshold: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Proposed", - "account", - __self_0, - "proposal_index", - __self_1, - "proposal_hash", - __self_2, - "threshold", - &__self_3, - ) - } - Event::Voted { - account: __self_0, - proposal_hash: __self_1, - voted: __self_2, - yes: __self_3, - no: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "Voted", - "account", - __self_0, - "proposal_hash", - __self_1, - "voted", - __self_2, - "yes", - __self_3, - "no", - &__self_4, - ) - } - Event::Approved { proposal_hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Approved", - "proposal_hash", - &__self_0, - ) - } - Event::Disapproved { proposal_hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Disapproved", - "proposal_hash", - &__self_0, - ) - } - Event::Executed { - proposal_hash: __self_0, - result: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Executed", - "proposal_hash", - __self_0, - "result", - &__self_1, - ) - } - Event::MemberExecuted { - proposal_hash: __self_0, - result: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MemberExecuted", - "proposal_hash", - __self_0, - "result", - &__self_1, - ) - } - Event::Closed { - proposal_hash: __self_0, - yes: __self_1, - no: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Closed", - "proposal_hash", - __self_0, - "yes", - __self_1, - "no", - &__self_2, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event2 { - #[codec(index = 0)] - Proposed { - account: ::subxt::utils::AccountId32, - proposal_index: ::core::primitive::u32, - proposal_hash: ::subxt::utils::H256, - threshold: ::core::primitive::u32, - }, - #[codec(index = 1)] - Voted { - account: ::subxt::utils::AccountId32, - proposal_hash: ::subxt::utils::H256, - voted: ::core::primitive::bool, - yes: ::core::primitive::u32, - no: ::core::primitive::u32, - }, - #[codec(index = 2)] - Approved { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 3)] - Disapproved { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 4)] - Executed { - proposal_hash: ::subxt::utils::H256, - result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - }, - #[codec(index = 5)] - MemberExecuted { - proposal_hash: ::subxt::utils::H256, - result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - }, - #[codec(index = 6)] - Closed { - proposal_hash: ::subxt::utils::H256, - yes: ::core::primitive::u32, - no: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event2 { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event2`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event2::Proposed { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event2::Proposed::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event2::Proposed::proposal_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event2::Proposed::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - threshold: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event2::Proposed::threshold`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event2::Voted { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event2::Voted::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event2::Voted::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - voted: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event2::Voted::voted`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - yes: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event2::Voted::yes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - no: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event2::Voted::no`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event2::Approved { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event2::Approved::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event2::Disapproved { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event2::Disapproved::proposal_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event2::Executed { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event2::Executed::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event2::Executed::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event2::MemberExecuted { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event2::MemberExecuted::proposal_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event2::MemberExecuted::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event2::Closed { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event2::Closed::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - yes: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event2::Closed::yes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - no: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event2::Closed::no`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event2`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event2 { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event2::Proposed { - ref account, - ref proposal_index, - ref proposal_hash, - ref threshold, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(threshold), - ) - } - Event2::Voted { - ref account, - ref proposal_hash, - ref voted, - ref yes, - ref no, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(voted), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(yes)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(no)) - } - Event2::Approved { ref proposal_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - } - Event2::Disapproved { ref proposal_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - } - Event2::Executed { ref proposal_hash, ref result } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(result), - ) - } - Event2::MemberExecuted { ref proposal_hash, ref result } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(result), - ) - } - Event2::Closed { ref proposal_hash, ref yes, ref no } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(yes)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(no)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event2::Proposed { - ref account, - ref proposal_index, - ref proposal_hash, - ref threshold, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proposal_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - threshold, - __codec_dest_edqy, - ); - } - Event2::Voted { - ref account, - ref proposal_hash, - ref voted, - ref yes, - ref no, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - voted, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - yes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - no, - __codec_dest_edqy, - ); - } - Event2::Approved { ref proposal_hash } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - } - Event2::Disapproved { ref proposal_hash } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - } - Event2::Executed { ref proposal_hash, ref result } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - result, - __codec_dest_edqy, - ); - } - Event2::MemberExecuted { - ref proposal_hash, - ref result, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - result, - __codec_dest_edqy, - ); - } - Event2::Closed { ref proposal_hash, ref yes, ref no } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - yes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - no, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event2 {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event2 { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event2; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Proposed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Event2::Proposed { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - proposal_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event2::Proposed { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - proposal_index: { - let val = *vals - .get(&Some("proposal_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - }) - }; - } - if value.name() == "Voted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Event2::Voted { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - voted: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("voted"))? - }, - yes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("yes"))? - }, - no: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("no"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event2::Voted { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - voted: { - let val = *vals - .get(&Some("voted")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "voted".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("voted"))? - }, - yes: { - let val = *vals - .get(&Some("yes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "yes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("yes"))? - }, - no: { - let val = *vals - .get(&Some("no")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "no".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("no"))? - }, - }) - }; - } - if value.name() == "Approved" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event2::Approved { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event2::Approved { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - }; - } - if value.name() == "Disapproved" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event2::Disapproved { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event2::Disapproved { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - }; - } - if value.name() == "Executed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event2::Executed { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event2::Executed { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - }; - } - if value.name() == "MemberExecuted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event2::MemberExecuted { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event2::MemberExecuted { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - }; - } - if value.name() == "Closed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event2::Closed { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - yes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("yes"))? - }, - no: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("no"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event2::Closed { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - yes: { - let val = *vals - .get(&Some("yes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "yes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("yes"))? - }, - no: { - let val = *vals - .get(&Some("no")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "no".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("no"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Proposed", - "Voted", - "Approved", - "Disapproved", - "Executed", - "MemberExecuted", - "Closed", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event2 { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Proposed { - account, - proposal_index, - proposal_hash, - threshold, - } => { - ::subxt::ext::scale_encode::Variant { - name: "Proposed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Voted { account, proposal_hash, voted, yes, no } => { - ::subxt::ext::scale_encode::Variant { - name: "Voted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("voted"), - voted as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("yes"), - yes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("no"), - no as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Approved { proposal_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "Approved", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Disapproved { proposal_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "Disapproved", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Executed { proposal_hash, result } => { - ::subxt::ext::scale_encode::Variant { - name: "Executed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MemberExecuted { proposal_hash, result } => { - ::subxt::ext::scale_encode::Variant { - name: "MemberExecuted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Closed { proposal_hash, yes, no } => { - ::subxt::ext::scale_encode::Variant { - name: "Closed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("yes"), - yes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("no"), - no as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event2::Proposed { - account: __self_0, - proposal_index: __self_1, - proposal_hash: __self_2, - threshold: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Proposed", - "account", - __self_0, - "proposal_index", - __self_1, - "proposal_hash", - __self_2, - "threshold", - &__self_3, - ) - } - Event2::Voted { - account: __self_0, - proposal_hash: __self_1, - voted: __self_2, - yes: __self_3, - no: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "Voted", - "account", - __self_0, - "proposal_hash", - __self_1, - "voted", - __self_2, - "yes", - __self_3, - "no", - &__self_4, - ) - } - Event2::Approved { proposal_hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Approved", - "proposal_hash", - &__self_0, - ) - } - Event2::Disapproved { proposal_hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Disapproved", - "proposal_hash", - &__self_0, - ) - } - Event2::Executed { - proposal_hash: __self_0, - result: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Executed", - "proposal_hash", - __self_0, - "result", - &__self_1, - ) - } - Event2::MemberExecuted { - proposal_hash: __self_0, - result: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MemberExecuted", - "proposal_hash", - __self_0, - "result", - &__self_1, - ) - } - Event2::Closed { - proposal_hash: __self_0, - yes: __self_1, - no: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Closed", - "proposal_hash", - __self_0, - "yes", - __self_1, - "no", - &__self_2, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum RawOrigin<_0> { - #[codec(index = 0)] - Members(::core::primitive::u32, ::core::primitive::u32), - #[codec(index = 1)] - Member(_0), - #[codec(index = 2)] - _Phantom, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for RawOrigin<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `RawOrigin`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RawOrigin::< - _0, - >::Members( - { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RawOrigin::Members.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RawOrigin::Members.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RawOrigin::< - _0, - >::Member({ - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RawOrigin::Member.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(RawOrigin::<_0>::_Phantom) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `RawOrigin`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for RawOrigin<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - RawOrigin::Members(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - RawOrigin::Member(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RawOrigin::_Phantom => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - RawOrigin::Members(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - RawOrigin::Member(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RawOrigin::_Phantom => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for RawOrigin<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor for RawOrigin<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RawOrigin<_0>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Members" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - RawOrigin::Members( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "Member" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RawOrigin::Member({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "_Phantom" { - return Ok(RawOrigin::_Phantom); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Members", "Member", "_Phantom"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for RawOrigin<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Members(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "Members", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Member(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Member", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::_Phantom => { - ::subxt::ext::scale_encode::Variant { - name: "_Phantom", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for RawOrigin<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - RawOrigin::Members(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "Members", - __self_0, - &__self_1, - ) - } - RawOrigin::Member(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Member", - &__self_0, - ) - } - RawOrigin::_Phantom => { - ::core::fmt::Formatter::write_str(f, "_Phantom") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Votes<_0, _1> { - pub index: ::core::primitive::u32, - pub threshold: ::core::primitive::u32, - pub ayes: ::std::vec::Vec<_0>, - pub nays: ::std::vec::Vec<_0>, - pub end: _1, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for Votes<_0, _1> - where - ::std::vec::Vec<_0>: ::subxt::ext::codec::Decode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Decode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Decode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Votes::<_0, _1> { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Votes::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - threshold: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Votes::threshold`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ayes: { - let __codec_res_edqy = <::std::vec::Vec< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Votes::ayes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - nays: { - let __codec_res_edqy = <::std::vec::Vec< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Votes::nays`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - end: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Votes::end`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for Votes<_0, _1> - where - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.threshold), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.ayes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.nays), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.end), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.threshold, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.ayes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.nays, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.end, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike for Votes<_0, _1> - where - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for Votes<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Votes<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Votes { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - ayes: { - let val = *vals - .get(&Some("ayes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ayes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ayes"))? - }, - nays: { - let val = *vals - .get(&Some("nays")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nays".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nays"))? - }, - end: { - let val = *vals - .get(&Some("end")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "end".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(Votes { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - ayes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ayes"))? - }, - nays: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nays"))? - }, - end: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for Votes<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType for Votes<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Votes { index, threshold, ayes, nays, end } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ayes"), - ayes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nays"), - nays as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("end"), - end as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields for Votes<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Votes { index, threshold, ayes, nays, end } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ayes"), - ayes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nays"), - nays as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("end"), - end as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for Votes<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "Votes", - "index", - &self.index, - "threshold", - &self.threshold, - "ayes", - &self.ayes, - "nays", - &self.nays, - "end", - &&self.end, - ) - } - } - } - pub mod pallet_conviction_voting { - use super::runtime_types; - pub mod conviction { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Conviction { - #[codec(index = 0)] - None, - #[codec(index = 1)] - Locked1x, - #[codec(index = 2)] - Locked2x, - #[codec(index = 3)] - Locked3x, - #[codec(index = 4)] - Locked4x, - #[codec(index = 5)] - Locked5x, - #[codec(index = 6)] - Locked6x, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Conviction { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Conviction`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Conviction::None) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Conviction::Locked1x) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Conviction::Locked2x) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Conviction::Locked3x) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Conviction::Locked4x) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Conviction::Locked5x) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Conviction::Locked6x) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Conviction`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Conviction { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Conviction::None => 0_usize, - Conviction::Locked1x => 0_usize, - Conviction::Locked2x => 0_usize, - Conviction::Locked3x => 0_usize, - Conviction::Locked4x => 0_usize, - Conviction::Locked5x => 0_usize, - Conviction::Locked6x => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Conviction::None => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Conviction::Locked1x => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Conviction::Locked2x => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Conviction::Locked3x => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Conviction::Locked4x => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Conviction::Locked5x => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Conviction::Locked6x => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Conviction {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Conviction { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Conviction; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "None" { - return Ok(Conviction::None); - } - if value.name() == "Locked1x" { - return Ok(Conviction::Locked1x); - } - if value.name() == "Locked2x" { - return Ok(Conviction::Locked2x); - } - if value.name() == "Locked3x" { - return Ok(Conviction::Locked3x); - } - if value.name() == "Locked4x" { - return Ok(Conviction::Locked4x); - } - if value.name() == "Locked5x" { - return Ok(Conviction::Locked5x); - } - if value.name() == "Locked6x" { - return Ok(Conviction::Locked6x); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "None", - "Locked1x", - "Locked2x", - "Locked3x", - "Locked4x", - "Locked5x", - "Locked6x", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Conviction { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::None => { - ::subxt::ext::scale_encode::Variant { - name: "None", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Locked1x => { - ::subxt::ext::scale_encode::Variant { - name: "Locked1x", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Locked2x => { - ::subxt::ext::scale_encode::Variant { - name: "Locked2x", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Locked3x => { - ::subxt::ext::scale_encode::Variant { - name: "Locked3x", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Locked4x => { - ::subxt::ext::scale_encode::Variant { - name: "Locked4x", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Locked5x => { - ::subxt::ext::scale_encode::Variant { - name: "Locked5x", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Locked6x => { - ::subxt::ext::scale_encode::Variant { - name: "Locked6x", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Conviction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Conviction::None => "None", - Conviction::Locked1x => "Locked1x", - Conviction::Locked2x => "Locked2x", - Conviction::Locked3x => "Locked3x", - Conviction::Locked4x => "Locked4x", - Conviction::Locked5x => "Locked5x", - Conviction::Locked6x => "Locked6x", - }, - ) - } - } - } - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - vote { - #[codec(compact)] - poll_index: ::core::primitive::u32, - vote: runtime_types::pallet_conviction_voting::vote::AccountVote< - ::core::primitive::u128, - >, - }, - #[codec(index = 1)] - delegate { - class: ::core::primitive::u16, - to: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - conviction: runtime_types::pallet_conviction_voting::conviction::Conviction, - balance: ::core::primitive::u128, - }, - #[codec(index = 2)] - undelegate { class: ::core::primitive::u16 }, - #[codec(index = 3)] - unlock { - class: ::core::primitive::u16, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 4)] - remove_vote { - class: ::core::option::Option<::core::primitive::u16>, - index: ::core::primitive::u32, - }, - #[codec(index = 5)] - remove_other_vote { - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - class: ::core::primitive::u16, - index: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::vote { - poll_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::vote::poll_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - vote: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::vote::vote`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::delegate { - class: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::delegate::class`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - to: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::delegate::to`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - conviction: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::delegate::conviction`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - balance: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::delegate::balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::undelegate { - class: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::undelegate::class`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::unlock { - class: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::unlock::class`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::unlock::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::remove_vote { - class: { - let __codec_res_edqy = <::core::option::Option< - ::core::primitive::u16, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::remove_vote::class`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::remove_vote::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::remove_other_vote { - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::remove_other_vote::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - class: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::remove_other_vote::class`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::remove_other_vote::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::vote { ref poll_index, ref vote } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(poll_index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(vote), - ) - } - Call::delegate { - ref class, - ref to, - ref conviction, - ref balance, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(class), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(to)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(conviction), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(balance), - ) - } - Call::undelegate { ref class } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(class), - ) - } - Call::unlock { ref class, ref target } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(class), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(target), - ) - } - Call::remove_vote { ref class, ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(class), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Call::remove_other_vote { - ref target, - ref class, - ref index, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(target), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(class), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::vote { ref poll_index, ref vote } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(poll_index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - vote, - __codec_dest_edqy, - ); - } - Call::delegate { - ref class, - ref to, - ref conviction, - ref balance, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - class, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - to, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - conviction, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - balance, - __codec_dest_edqy, - ); - } - Call::undelegate { ref class } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - class, - __codec_dest_edqy, - ); - } - Call::unlock { ref class, ref target } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - class, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - target, - __codec_dest_edqy, - ); - } - Call::remove_vote { ref class, ref index } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - class, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Call::remove_other_vote { - ref target, - ref class, - ref index, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - target, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - class, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "vote" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::vote { - poll_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("poll_index"))? - }, - vote: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("vote"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::vote { - poll_index: { - let val = *vals - .get(&Some("poll_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "poll_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("poll_index"))? - }, - vote: { - let val = *vals - .get(&Some("vote")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "vote".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("vote"))? - }, - }) - }; - } - if value.name() == "delegate" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Call::delegate { - class: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - to: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - conviction: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("conviction"))? - }, - balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::delegate { - class: { - let val = *vals - .get(&Some("class")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "class".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - to: { - let val = *vals - .get(&Some("to")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "to".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - conviction: { - let val = *vals - .get(&Some("conviction")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "conviction".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("conviction"))? - }, - balance: { - let val = *vals - .get(&Some("balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "balance".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - }; - } - if value.name() == "undelegate" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::undelegate { - class: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::undelegate { - class: { - let val = *vals - .get(&Some("class")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "class".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - }) - }; - } - if value.name() == "unlock" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::unlock { - class: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::unlock { - class: { - let val = *vals - .get(&Some("class")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "class".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - }; - } - if value.name() == "remove_vote" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::remove_vote { - class: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::remove_vote { - class: { - let val = *vals - .get(&Some("class")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "class".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "remove_other_vote" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::remove_other_vote { - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - class: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::remove_other_vote { - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - class: { - let val = *vals - .get(&Some("class")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "class".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("class"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "vote", - "delegate", - "undelegate", - "unlock", - "remove_vote", - "remove_other_vote", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::vote { poll_index, vote } => { - ::subxt::ext::scale_encode::Variant { - name: "vote", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("poll_index"), - poll_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("vote"), - vote as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::delegate { class, to, conviction, balance } => { - ::subxt::ext::scale_encode::Variant { - name: "delegate", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("class"), - class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("conviction"), - conviction as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::undelegate { class } => { - ::subxt::ext::scale_encode::Variant { - name: "undelegate", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("class"), - class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::unlock { class, target } => { - ::subxt::ext::scale_encode::Variant { - name: "unlock", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("class"), - class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::remove_vote { class, index } => { - ::subxt::ext::scale_encode::Variant { - name: "remove_vote", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("class"), - class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::remove_other_vote { target, class, index } => { - ::subxt::ext::scale_encode::Variant { - name: "remove_other_vote", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("class"), - class as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::vote { poll_index: __self_0, vote: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "vote", - "poll_index", - __self_0, - "vote", - &__self_1, - ) - } - Call::delegate { - class: __self_0, - to: __self_1, - conviction: __self_2, - balance: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "delegate", - "class", - __self_0, - "to", - __self_1, - "conviction", - __self_2, - "balance", - &__self_3, - ) - } - Call::undelegate { class: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "undelegate", - "class", - &__self_0, - ) - } - Call::unlock { class: __self_0, target: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "unlock", - "class", - __self_0, - "target", - &__self_1, - ) - } - Call::remove_vote { class: __self_0, index: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "remove_vote", - "class", - __self_0, - "index", - &__self_1, - ) - } - Call::remove_other_vote { - target: __self_0, - class: __self_1, - index: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "remove_other_vote", - "target", - __self_0, - "class", - __self_1, - "index", - &__self_2, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - NotOngoing, - #[codec(index = 1)] - NotVoter, - #[codec(index = 2)] - NoPermission, - #[codec(index = 3)] - NoPermissionYet, - #[codec(index = 4)] - AlreadyDelegating, - #[codec(index = 5)] - AlreadyVoting, - #[codec(index = 6)] - InsufficientFunds, - #[codec(index = 7)] - NotDelegating, - #[codec(index = 8)] - Nonsense, - #[codec(index = 9)] - MaxVotesReached, - #[codec(index = 10)] - ClassNeeded, - #[codec(index = 11)] - BadClass, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotOngoing) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotVoter) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoPermission) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoPermissionYet) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyDelegating) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyVoting) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InsufficientFunds) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotDelegating) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Nonsense) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MaxVotesReached) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ClassNeeded) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::BadClass) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::NotOngoing => 0_usize, - Error::NotVoter => 0_usize, - Error::NoPermission => 0_usize, - Error::NoPermissionYet => 0_usize, - Error::AlreadyDelegating => 0_usize, - Error::AlreadyVoting => 0_usize, - Error::InsufficientFunds => 0_usize, - Error::NotDelegating => 0_usize, - Error::Nonsense => 0_usize, - Error::MaxVotesReached => 0_usize, - Error::ClassNeeded => 0_usize, - Error::BadClass => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::NotOngoing => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::NotVoter => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::NoPermission => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::NoPermissionYet => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::AlreadyDelegating => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::AlreadyVoting => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::InsufficientFunds => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::NotDelegating => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::Nonsense => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::MaxVotesReached => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::ClassNeeded => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Error::BadClass => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NotOngoing" { - return Ok(Error::NotOngoing); - } - if value.name() == "NotVoter" { - return Ok(Error::NotVoter); - } - if value.name() == "NoPermission" { - return Ok(Error::NoPermission); - } - if value.name() == "NoPermissionYet" { - return Ok(Error::NoPermissionYet); - } - if value.name() == "AlreadyDelegating" { - return Ok(Error::AlreadyDelegating); - } - if value.name() == "AlreadyVoting" { - return Ok(Error::AlreadyVoting); - } - if value.name() == "InsufficientFunds" { - return Ok(Error::InsufficientFunds); - } - if value.name() == "NotDelegating" { - return Ok(Error::NotDelegating); - } - if value.name() == "Nonsense" { - return Ok(Error::Nonsense); - } - if value.name() == "MaxVotesReached" { - return Ok(Error::MaxVotesReached); - } - if value.name() == "ClassNeeded" { - return Ok(Error::ClassNeeded); - } - if value.name() == "BadClass" { - return Ok(Error::BadClass); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "NotOngoing", - "NotVoter", - "NoPermission", - "NoPermissionYet", - "AlreadyDelegating", - "AlreadyVoting", - "InsufficientFunds", - "NotDelegating", - "Nonsense", - "MaxVotesReached", - "ClassNeeded", - "BadClass", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NotOngoing => { - ::subxt::ext::scale_encode::Variant { - name: "NotOngoing", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotVoter => { - ::subxt::ext::scale_encode::Variant { - name: "NotVoter", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoPermission => { - ::subxt::ext::scale_encode::Variant { - name: "NoPermission", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoPermissionYet => { - ::subxt::ext::scale_encode::Variant { - name: "NoPermissionYet", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyDelegating => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyDelegating", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyVoting => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyVoting", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InsufficientFunds => { - ::subxt::ext::scale_encode::Variant { - name: "InsufficientFunds", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotDelegating => { - ::subxt::ext::scale_encode::Variant { - name: "NotDelegating", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Nonsense => { - ::subxt::ext::scale_encode::Variant { - name: "Nonsense", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MaxVotesReached => { - ::subxt::ext::scale_encode::Variant { - name: "MaxVotesReached", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ClassNeeded => { - ::subxt::ext::scale_encode::Variant { - name: "ClassNeeded", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BadClass => { - ::subxt::ext::scale_encode::Variant { - name: "BadClass", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::NotOngoing => "NotOngoing", - Error::NotVoter => "NotVoter", - Error::NoPermission => "NoPermission", - Error::NoPermissionYet => "NoPermissionYet", - Error::AlreadyDelegating => "AlreadyDelegating", - Error::AlreadyVoting => "AlreadyVoting", - Error::InsufficientFunds => "InsufficientFunds", - Error::NotDelegating => "NotDelegating", - Error::Nonsense => "Nonsense", - Error::MaxVotesReached => "MaxVotesReached", - Error::ClassNeeded => "ClassNeeded", - Error::BadClass => "BadClass", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - Delegated( - ::subxt::utils::AccountId32, - ::subxt::utils::AccountId32, - ), - #[codec(index = 1)] - Undelegated(::subxt::utils::AccountId32), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::Delegated( - { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Delegated.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Delegated.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::Undelegated({ - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Undelegated.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::Delegated(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::Undelegated(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::Delegated(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::Undelegated(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Delegated" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::Delegated( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "Undelegated" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Event::Undelegated({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Delegated", "Undelegated"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Delegated(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "Delegated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Undelegated(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Undelegated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::Delegated(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "Delegated", - __self_0, - &__self_1, - ) - } - Event::Undelegated(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Undelegated", - &__self_0, - ) - } - } - } - } - } - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Delegations<_0> { - pub votes: _0, - pub capital: _0, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for Delegations<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Delegations::<_0> { - votes: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegations::votes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - capital: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegations::capital`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for Delegations<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.capital), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.votes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.capital, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for Delegations<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for Delegations<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Delegations<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Delegations { - votes: { - let val = *vals - .get(&Some("votes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes"))? - }, - capital: { - let val = *vals - .get(&Some("capital")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "capital".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("capital"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Delegations { - votes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes"))? - }, - capital: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("capital"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for Delegations<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for Delegations<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Delegations { votes, capital } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("votes"), - votes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("capital"), - capital as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for Delegations<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Delegations { votes, capital } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("votes"), - votes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("capital"), - capital as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for Delegations<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Delegations", - "votes", - &self.votes, - "capital", - &&self.capital, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Tally<_0> { - pub ayes: _0, - pub nays: _0, - pub support: _0, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for Tally<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Tally::<_0> { - ayes: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Tally::ayes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - nays: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Tally::nays`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - support: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Tally::support`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for Tally<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.ayes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.nays), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.support), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.ayes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.nays, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.support, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for Tally<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor for Tally<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Tally<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Tally { - ayes: { - let val = *vals - .get(&Some("ayes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ayes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ayes"))? - }, - nays: { - let val = *vals - .get(&Some("nays")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nays".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nays"))? - }, - support: { - let val = *vals - .get(&Some("support")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "support".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("support"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Tally { - ayes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ayes"))? - }, - nays: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nays"))? - }, - support: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("support"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields for Tally<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for Tally<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Tally { ayes, nays, support } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ayes"), - ayes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nays"), - nays as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("support"), - support as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields for Tally<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Tally { ayes, nays, support } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ayes"), - ayes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nays"), - nays as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("support"), - support as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for Tally<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Tally", - "ayes", - &self.ayes, - "nays", - &self.nays, - "support", - &&self.support, - ) - } - } - } - pub mod vote { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum AccountVote<_0> { - #[codec(index = 0)] - Standard { - vote: runtime_types::pallet_conviction_voting::vote::Vote, - balance: _0, - }, - #[codec(index = 1)] - Split { aye: _0, nay: _0 }, - #[codec(index = 2)] - SplitAbstain { aye: _0, nay: _0, abstain: _0 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for AccountVote<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `AccountVote`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(AccountVote::<_0>::Standard { - vote: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountVote::Standard::vote`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - balance: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountVote::Standard::balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(AccountVote::<_0>::Split { - aye: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountVote::Split::aye`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - nay: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountVote::Split::nay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(AccountVote::<_0>::SplitAbstain { - aye: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountVote::SplitAbstain::aye`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - nay: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountVote::SplitAbstain::nay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - abstain: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `AccountVote::SplitAbstain::abstain`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `AccountVote`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for AccountVote<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - AccountVote::Standard { ref vote, ref balance } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(vote), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(balance), - ) - } - AccountVote::Split { ref aye, ref nay } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aye)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(nay)) - } - AccountVote::SplitAbstain { - ref aye, - ref nay, - ref abstain, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aye)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(nay)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(abstain), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - AccountVote::Standard { ref vote, ref balance } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - vote, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - balance, - __codec_dest_edqy, - ); - } - AccountVote::Split { ref aye, ref nay } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aye, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - nay, - __codec_dest_edqy, - ); - } - AccountVote::SplitAbstain { - ref aye, - ref nay, - ref abstain, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aye, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - nay, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - abstain, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for AccountVote<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for AccountVote<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AccountVote<_0>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Standard" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(AccountVote::Standard { - vote: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("vote"))? - }, - balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AccountVote::Standard { - vote: { - let val = *vals - .get(&Some("vote")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "vote".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("vote"))? - }, - balance: { - let val = *vals - .get(&Some("balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "balance".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - }; - } - if value.name() == "Split" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(AccountVote::Split { - aye: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("aye"))? - }, - nay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nay"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AccountVote::Split { - aye: { - let val = *vals - .get(&Some("aye")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "aye".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("aye"))? - }, - nay: { - let val = *vals - .get(&Some("nay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nay"))? - }, - }) - }; - } - if value.name() == "SplitAbstain" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(AccountVote::SplitAbstain { - aye: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("aye"))? - }, - nay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nay"))? - }, - abstain: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("abstain"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AccountVote::SplitAbstain { - aye: { - let val = *vals - .get(&Some("aye")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "aye".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("aye"))? - }, - nay: { - let val = *vals - .get(&Some("nay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nay"))? - }, - abstain: { - let val = *vals - .get(&Some("abstain")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "abstain".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("abstain"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Standard", - "Split", - "SplitAbstain", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for AccountVote<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Standard { vote, balance } => { - ::subxt::ext::scale_encode::Variant { - name: "Standard", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("vote"), - vote as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Split { aye, nay } => { - ::subxt::ext::scale_encode::Variant { - name: "Split", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("aye"), - aye as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nay"), - nay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SplitAbstain { aye, nay, abstain } => { - ::subxt::ext::scale_encode::Variant { - name: "SplitAbstain", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("aye"), - aye as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nay"), - nay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("abstain"), - abstain as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for AccountVote<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - AccountVote::Standard { - vote: __self_0, - balance: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Standard", - "vote", - __self_0, - "balance", - &__self_1, - ) - } - AccountVote::Split { aye: __self_0, nay: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Split", - "aye", - __self_0, - "nay", - &__self_1, - ) - } - AccountVote::SplitAbstain { - aye: __self_0, - nay: __self_1, - abstain: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SplitAbstain", - "aye", - __self_0, - "nay", - __self_1, - "abstain", - &__self_2, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Casting<_0, _1, _2> { - pub votes: runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - _1, - runtime_types::pallet_conviction_voting::vote::AccountVote< - _0, - >, - ), - >, - pub delegations: runtime_types::pallet_conviction_voting::types::Delegations< - _0, - >, - pub prior: runtime_types::pallet_conviction_voting::vote::PriorLock< - _1, - _0, - >, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_2>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Decode - for Casting<_0, _1, _2> - where - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - _1, - runtime_types::pallet_conviction_voting::vote::AccountVote< - _0, - >, - ), - >: ::subxt::ext::codec::Decode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - _1, - runtime_types::pallet_conviction_voting::vote::AccountVote< - _0, - >, - ), - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_conviction_voting::types::Delegations< - _0, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_conviction_voting::types::Delegations< - _0, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_conviction_voting::vote::PriorLock< - _1, - _0, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_conviction_voting::vote::PriorLock< - _1, - _0, - >: ::subxt::ext::codec::Decode, - ::core::marker::PhantomData<_2>: Default, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Casting::<_0, _1, _2> { - votes: { - let __codec_res_edqy = , - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Casting::votes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delegations: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Casting::delegations`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - prior: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Casting::prior`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - __subxt_unused_type_params: ::core::default::Default::default(), - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Encode - for Casting<_0, _1, _2> - where - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - _1, - runtime_types::pallet_conviction_voting::vote::AccountVote< - _0, - >, - ), - >: ::subxt::ext::codec::Encode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - _1, - runtime_types::pallet_conviction_voting::vote::AccountVote< - _0, - >, - ), - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::types::Delegations< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::types::Delegations< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::vote::PriorLock< - _1, - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::vote::PriorLock< - _1, - _0, - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delegations), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.prior), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.votes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.delegations, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.prior, - __codec_dest_edqy, - ); - let _ = &self.__subxt_unused_type_params; - } - } - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::EncodeLike - for Casting<_0, _1, _2> - where - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - _1, - runtime_types::pallet_conviction_voting::vote::AccountVote< - _0, - >, - ), - >: ::subxt::ext::codec::Encode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - _1, - runtime_types::pallet_conviction_voting::vote::AccountVote< - _0, - >, - ), - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::types::Delegations< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::types::Delegations< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::vote::PriorLock< - _1, - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::vote::PriorLock< - _1, - _0, - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2>( - ::core::marker::PhantomData<(_0, _1, _2)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1, _2> ::subxt::ext::scale_decode::IntoVisitor - for Casting<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Casting<_0, _1, _2>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Casting { - votes: { - let val = *vals - .get(&Some("votes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes"))? - }, - delegations: { - let val = *vals - .get(&Some("delegations")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegations".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegations"))? - }, - prior: { - let val = *vals - .get(&Some("prior")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prior".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prior"))? - }, - __subxt_unused_type_params: ::core::default::Default::default(), - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Casting { - votes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes"))? - }, - delegations: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegations"))? - }, - prior: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prior"))? - }, - __subxt_unused_type_params: ::core::default::Default::default(), - }) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::DecodeAsFields - for Casting<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsType - for Casting<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Casting { - votes, - delegations, - prior, - __subxt_unused_type_params, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("votes"), - votes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delegations"), - delegations as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prior"), - prior as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsFields - for Casting<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Casting { - votes, - delegations, - prior, - __subxt_unused_type_params, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("votes"), - votes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delegations"), - delegations as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prior"), - prior as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - > ::core::fmt::Debug for Casting<_0, _1, _2> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Casting", - "votes", - &self.votes, - "delegations", - &self.delegations, - "prior", - &self.prior, - "__subxt_unused_type_params", - &&self.__subxt_unused_type_params, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Delegating<_0, _1, _2> { - pub balance: _0, - pub target: _1, - pub conviction: runtime_types::pallet_conviction_voting::conviction::Conviction, - pub delegations: runtime_types::pallet_conviction_voting::types::Delegations< - _0, - >, - pub prior: runtime_types::pallet_conviction_voting::vote::PriorLock< - _2, - _0, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Decode - for Delegating<_0, _1, _2> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - runtime_types::pallet_conviction_voting::types::Delegations< - _0, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_conviction_voting::types::Delegations< - _0, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_conviction_voting::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_conviction_voting::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Delegating::<_0, _1, _2> { - balance: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegating::balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - target: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegating::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - conviction: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegating::conviction`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delegations: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegating::delegations`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - prior: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegating::prior`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Encode - for Delegating<_0, _1, _2> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::types::Delegations< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::types::Delegations< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.balance), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.target), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.conviction), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delegations), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.prior), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.balance, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.target, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.conviction, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.delegations, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.prior, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::EncodeLike - for Delegating<_0, _1, _2> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::types::Delegations< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::types::Delegations< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2>( - ::core::marker::PhantomData<(_0, _1, _2)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1, _2> ::subxt::ext::scale_decode::IntoVisitor - for Delegating<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Delegating<_0, _1, _2>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Delegating { - balance: { - let val = *vals - .get(&Some("balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "balance".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - conviction: { - let val = *vals - .get(&Some("conviction")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "conviction".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("conviction"))? - }, - delegations: { - let val = *vals - .get(&Some("delegations")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegations".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegations"))? - }, - prior: { - let val = *vals - .get(&Some("prior")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prior".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prior"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(Delegating { - balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - conviction: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("conviction"))? - }, - delegations: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegations"))? - }, - prior: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prior"))? - }, - }) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::DecodeAsFields - for Delegating<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsType - for Delegating<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Delegating { - balance, - target, - conviction, - delegations, - prior, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("conviction"), - conviction as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delegations"), - delegations as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prior"), - prior as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsFields - for Delegating<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Delegating { - balance, - target, - conviction, - delegations, - prior, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("conviction"), - conviction as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delegations"), - delegations as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prior"), - prior as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - > ::core::fmt::Debug for Delegating<_0, _1, _2> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "Delegating", - "balance", - &self.balance, - "target", - &self.target, - "conviction", - &self.conviction, - "delegations", - &self.delegations, - "prior", - &&self.prior, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PriorLock<_0, _1>(pub _0, pub _1); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for PriorLock<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - PriorLock::< - _0, - _1, - >( - { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PriorLock.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PriorLock.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for PriorLock<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for PriorLock<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>( - ::core::marker::PhantomData<(_0, _1)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for PriorLock<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PriorLock<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - PriorLock( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for PriorLock<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for PriorLock<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PriorLock(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for PriorLock<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PriorLock(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - > ::core::fmt::Debug for PriorLock<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "PriorLock", - &self.0, - &&self.1, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote(pub ::core::primitive::u8); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Vote { - type As = ::core::primitive::u8; - fn encode_as(&self) -> &::core::primitive::u8 { - &self.0 - } - fn decode_from( - x: ::core::primitive::u8, - ) -> ::core::result::Result< - Vote, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Vote(x)) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Vote { - fn from(x: ::subxt::ext::codec::Compact) -> Vote { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Vote { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Vote({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Vote.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Vote { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Vote {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Vote { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Vote; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Vote({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Vote { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Vote { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vote(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Vote { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vote(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Vote { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Vote", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Voting<_0, _1, _2, _3> { - #[codec(index = 0)] - Casting( - runtime_types::pallet_conviction_voting::vote::Casting< - _0, - _2, - _2, - >, - ), - #[codec(index = 1)] - Delegating( - runtime_types::pallet_conviction_voting::vote::Delegating< - _0, - _1, - _2, - >, - ), - __Ignore(::core::marker::PhantomData<_3>), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2, _3> ::subxt::ext::codec::Decode - for Voting<_0, _1, _2, _3> - where - runtime_types::pallet_conviction_voting::vote::Casting< - _0, - _2, - _2, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_conviction_voting::vote::Casting< - _0, - _2, - _2, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_conviction_voting::vote::Delegating< - _0, - _1, - _2, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_conviction_voting::vote::Delegating< - _0, - _1, - _2, - >: ::subxt::ext::codec::Decode, - ::core::marker::PhantomData<_3>: ::subxt::ext::codec::Decode, - ::core::marker::PhantomData<_3>: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Voting`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Voting::< - _0, - _1, - _2, - _3, - >::Casting({ - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voting::Casting.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Voting::< - _0, - _1, - _2, - _3, - >::Delegating({ - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voting::Delegating.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2usize as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Voting::< - _0, - _1, - _2, - _3, - >::__Ignore({ - let __codec_res_edqy = <::core::marker::PhantomData< - _3, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voting::__Ignore.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Voting`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2, _3> ::subxt::ext::codec::Encode - for Voting<_0, _1, _2, _3> - where - runtime_types::pallet_conviction_voting::vote::Casting< - _0, - _2, - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::vote::Casting< - _0, - _2, - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::vote::Delegating< - _0, - _1, - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::vote::Delegating< - _0, - _1, - _2, - >: ::subxt::ext::codec::Encode, - ::core::marker::PhantomData<_3>: ::subxt::ext::codec::Encode, - ::core::marker::PhantomData<_3>: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Voting::Casting(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Voting::Delegating(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Voting::__Ignore(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Voting::Casting(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Voting::Delegating(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Voting::__Ignore(ref aa) => { - __codec_dest_edqy - .push_byte(2usize as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0, _1, _2, _3> ::subxt::ext::codec::EncodeLike - for Voting<_0, _1, _2, _3> - where - runtime_types::pallet_conviction_voting::vote::Casting< - _0, - _2, - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::vote::Casting< - _0, - _2, - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::vote::Delegating< - _0, - _1, - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_conviction_voting::vote::Delegating< - _0, - _1, - _2, - >: ::subxt::ext::codec::Encode, - ::core::marker::PhantomData<_3>: ::subxt::ext::codec::Encode, - ::core::marker::PhantomData<_3>: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2, _3>( - ::core::marker::PhantomData<(_0, _1, _2, _3)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1, _2, _3> ::subxt::ext::scale_decode::IntoVisitor - for Voting<_0, _1, _2, _3> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _3: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_3 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2, _3>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1, _2, _3> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2, _3> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _3: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_3 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Voting<_0, _1, _2, _3>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Casting" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Voting::Casting({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Delegating" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Voting::Delegating({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "__Ignore" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Voting::__Ignore({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Casting", - "Delegating", - "__Ignore", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0, _1, _2, _3> ::subxt::ext::scale_encode::EncodeAsType - for Voting<_0, _1, _2, _3> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - _3: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Casting(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Casting", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Delegating(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Delegating", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::__Ignore(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "__Ignore", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - _3: ::core::fmt::Debug, - > ::core::fmt::Debug for Voting<_0, _1, _2, _3> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Voting::Casting(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Casting", - &__self_0, - ) - } - Voting::Delegating(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Delegating", - &__self_0, - ) - } - Voting::__Ignore(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "__Ignore", - &__self_0, - ) - } - } - } - } - } - } - pub mod pallet_democracy { - use super::runtime_types; - pub mod conviction { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Conviction { - #[codec(index = 0)] - None, - #[codec(index = 1)] - Locked1x, - #[codec(index = 2)] - Locked2x, - #[codec(index = 3)] - Locked3x, - #[codec(index = 4)] - Locked4x, - #[codec(index = 5)] - Locked5x, - #[codec(index = 6)] - Locked6x, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Conviction { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Conviction`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Conviction::None) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Conviction::Locked1x) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Conviction::Locked2x) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Conviction::Locked3x) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Conviction::Locked4x) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Conviction::Locked5x) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Conviction::Locked6x) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Conviction`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Conviction { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Conviction::None => 0_usize, - Conviction::Locked1x => 0_usize, - Conviction::Locked2x => 0_usize, - Conviction::Locked3x => 0_usize, - Conviction::Locked4x => 0_usize, - Conviction::Locked5x => 0_usize, - Conviction::Locked6x => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Conviction::None => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Conviction::Locked1x => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Conviction::Locked2x => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Conviction::Locked3x => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Conviction::Locked4x => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Conviction::Locked5x => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Conviction::Locked6x => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Conviction {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Conviction { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Conviction; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "None" { - return Ok(Conviction::None); - } - if value.name() == "Locked1x" { - return Ok(Conviction::Locked1x); - } - if value.name() == "Locked2x" { - return Ok(Conviction::Locked2x); - } - if value.name() == "Locked3x" { - return Ok(Conviction::Locked3x); - } - if value.name() == "Locked4x" { - return Ok(Conviction::Locked4x); - } - if value.name() == "Locked5x" { - return Ok(Conviction::Locked5x); - } - if value.name() == "Locked6x" { - return Ok(Conviction::Locked6x); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "None", - "Locked1x", - "Locked2x", - "Locked3x", - "Locked4x", - "Locked5x", - "Locked6x", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Conviction { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::None => { - ::subxt::ext::scale_encode::Variant { - name: "None", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Locked1x => { - ::subxt::ext::scale_encode::Variant { - name: "Locked1x", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Locked2x => { - ::subxt::ext::scale_encode::Variant { - name: "Locked2x", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Locked3x => { - ::subxt::ext::scale_encode::Variant { - name: "Locked3x", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Locked4x => { - ::subxt::ext::scale_encode::Variant { - name: "Locked4x", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Locked5x => { - ::subxt::ext::scale_encode::Variant { - name: "Locked5x", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Locked6x => { - ::subxt::ext::scale_encode::Variant { - name: "Locked6x", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Conviction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Conviction::None => "None", - Conviction::Locked1x => "Locked1x", - Conviction::Locked2x => "Locked2x", - Conviction::Locked3x => "Locked3x", - Conviction::Locked4x => "Locked4x", - Conviction::Locked5x => "Locked5x", - Conviction::Locked6x => "Locked6x", - }, - ) - } - } - } - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - propose { - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 1)] - second { #[codec(compact)] proposal: ::core::primitive::u32 }, - #[codec(index = 2)] - vote { - #[codec(compact)] - ref_index: ::core::primitive::u32, - vote: runtime_types::pallet_democracy::vote::AccountVote< - ::core::primitive::u128, - >, - }, - #[codec(index = 3)] - emergency_cancel { ref_index: ::core::primitive::u32 }, - #[codec(index = 4)] - external_propose { - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - #[codec(index = 5)] - external_propose_majority { - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - #[codec(index = 6)] - external_propose_default { - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - #[codec(index = 7)] - fast_track { - proposal_hash: ::subxt::utils::H256, - voting_period: ::core::primitive::u32, - delay: ::core::primitive::u32, - }, - #[codec(index = 8)] - veto_external { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 9)] - cancel_referendum { - #[codec(compact)] - ref_index: ::core::primitive::u32, - }, - #[codec(index = 10)] - delegate { - to: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - conviction: runtime_types::pallet_democracy::conviction::Conviction, - balance: ::core::primitive::u128, - }, - #[codec(index = 11)] - undelegate, - #[codec(index = 12)] - clear_public_proposals, - #[codec(index = 13)] - unlock { - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 14)] - remove_vote { index: ::core::primitive::u32 }, - #[codec(index = 15)] - remove_other_vote { - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - index: ::core::primitive::u32, - }, - #[codec(index = 16)] - blacklist { - proposal_hash: ::subxt::utils::H256, - maybe_ref_index: ::core::option::Option< - ::core::primitive::u32, - >, - }, - #[codec(index = 17)] - cancel_proposal { - #[codec(compact)] - prop_index: ::core::primitive::u32, - }, - #[codec(index = 18)] - set_metadata { - owner: runtime_types::pallet_democracy::types::MetadataOwner, - maybe_hash: ::core::option::Option<::subxt::utils::H256>, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::propose { - proposal: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::propose::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::propose::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::second { - proposal: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::second::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::vote { - ref_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::vote::ref_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - vote: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::vote::vote`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::emergency_cancel { - ref_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::emergency_cancel::ref_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::external_propose { - proposal: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::external_propose::proposal`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::external_propose_majority { - proposal: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::external_propose_majority::proposal`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::external_propose_default { - proposal: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::external_propose_default::proposal`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::fast_track { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::fast_track::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - voting_period: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::fast_track::voting_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delay: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::fast_track::delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::veto_external { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::veto_external::proposal_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::cancel_referendum { - ref_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::cancel_referendum::ref_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::delegate { - to: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::delegate::to`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - conviction: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::delegate::conviction`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - balance: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::delegate::balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::undelegate) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::clear_public_proposals) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::unlock { - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::unlock::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::remove_vote { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::remove_vote::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::remove_other_vote { - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::remove_other_vote::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::remove_other_vote::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::blacklist { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::blacklist::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_ref_index: { - let __codec_res_edqy = <::core::option::Option< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::blacklist::maybe_ref_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::cancel_proposal { - prop_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::cancel_proposal::prop_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_metadata { - owner: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_metadata::owner`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_hash: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::H256, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_metadata::maybe_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::propose { ref proposal, ref value } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - ), - ) - } - Call::second { ref proposal } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(proposal), - ), - ) - } - Call::vote { ref ref_index, ref vote } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(ref_index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(vote), - ) - } - Call::emergency_cancel { ref ref_index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(ref_index), - ) - } - Call::external_propose { ref proposal } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal), - ) - } - Call::external_propose_majority { ref proposal } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal), - ) - } - Call::external_propose_default { ref proposal } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal), - ) - } - Call::fast_track { - ref proposal_hash, - ref voting_period, - ref delay, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(voting_period), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delay), - ) - } - Call::veto_external { ref proposal_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - } - Call::cancel_referendum { ref ref_index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(ref_index), - ), - ) - } - Call::delegate { ref to, ref conviction, ref balance } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(to)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(conviction), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(balance), - ) - } - Call::undelegate => 0_usize, - Call::clear_public_proposals => 0_usize, - Call::unlock { ref target } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(target), - ) - } - Call::remove_vote { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Call::remove_other_vote { ref target, ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(target), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Call::blacklist { - ref proposal_hash, - ref maybe_ref_index, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maybe_ref_index), - ) - } - Call::cancel_proposal { ref prop_index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(prop_index), - ), - ) - } - Call::set_metadata { ref owner, ref maybe_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(owner), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maybe_hash), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::propose { ref proposal, ref value } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - __codec_dest_edqy, - ); - } - } - Call::second { ref proposal } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(proposal), - __codec_dest_edqy, - ); - } - } - Call::vote { ref ref_index, ref vote } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(ref_index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - vote, - __codec_dest_edqy, - ); - } - Call::emergency_cancel { ref ref_index } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - ref_index, - __codec_dest_edqy, - ); - } - Call::external_propose { ref proposal } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal, - __codec_dest_edqy, - ); - } - Call::external_propose_majority { ref proposal } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal, - __codec_dest_edqy, - ); - } - Call::external_propose_default { ref proposal } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal, - __codec_dest_edqy, - ); - } - Call::fast_track { - ref proposal_hash, - ref voting_period, - ref delay, - } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - voting_period, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - delay, - __codec_dest_edqy, - ); - } - Call::veto_external { ref proposal_hash } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - } - Call::cancel_referendum { ref ref_index } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(ref_index), - __codec_dest_edqy, - ); - } - } - Call::delegate { ref to, ref conviction, ref balance } => { - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - to, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - conviction, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - balance, - __codec_dest_edqy, - ); - } - Call::undelegate => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - Call::clear_public_proposals => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - Call::unlock { ref target } => { - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - target, - __codec_dest_edqy, - ); - } - Call::remove_vote { ref index } => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Call::remove_other_vote { ref target, ref index } => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - target, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Call::blacklist { - ref proposal_hash, - ref maybe_ref_index, - } => { - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - maybe_ref_index, - __codec_dest_edqy, - ); - } - Call::cancel_proposal { ref prop_index } => { - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(prop_index), - __codec_dest_edqy, - ); - } - } - Call::set_metadata { ref owner, ref maybe_hash } => { - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - owner, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - maybe_hash, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "propose" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::propose { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::propose { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - }; - } - if value.name() == "second" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::second { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::second { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - }; - } - if value.name() == "vote" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::vote { - ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - vote: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("vote"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::vote { - ref_index: { - let val = *vals - .get(&Some("ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ref_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - vote: { - let val = *vals - .get(&Some("vote")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "vote".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("vote"))? - }, - }) - }; - } - if value.name() == "emergency_cancel" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::emergency_cancel { - ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::emergency_cancel { - ref_index: { - let val = *vals - .get(&Some("ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ref_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - }; - } - if value.name() == "external_propose" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::external_propose { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::external_propose { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - }; - } - if value.name() == "external_propose_majority" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::external_propose_majority { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::external_propose_majority { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - }; - } - if value.name() == "external_propose_default" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::external_propose_default { - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::external_propose_default { - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - }; - } - if value.name() == "fast_track" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::fast_track { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - voting_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("voting_period"))? - }, - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::fast_track { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - voting_period: { - let val = *vals - .get(&Some("voting_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "voting_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("voting_period"))? - }, - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - }; - } - if value.name() == "veto_external" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::veto_external { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::veto_external { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - }; - } - if value.name() == "cancel_referendum" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::cancel_referendum { - ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::cancel_referendum { - ref_index: { - let val = *vals - .get(&Some("ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ref_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - }; - } - if value.name() == "delegate" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::delegate { - to: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - conviction: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("conviction"))? - }, - balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::delegate { - to: { - let val = *vals - .get(&Some("to")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "to".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - conviction: { - let val = *vals - .get(&Some("conviction")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "conviction".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("conviction"))? - }, - balance: { - let val = *vals - .get(&Some("balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "balance".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - }; - } - if value.name() == "undelegate" { - return Ok(Call::undelegate); - } - if value.name() == "clear_public_proposals" { - return Ok(Call::clear_public_proposals); - } - if value.name() == "unlock" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::unlock { - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::unlock { - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - }; - } - if value.name() == "remove_vote" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::remove_vote { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::remove_vote { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "remove_other_vote" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::remove_other_vote { - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::remove_other_vote { - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "blacklist" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::blacklist { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - maybe_ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_ref_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::blacklist { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - maybe_ref_index: { - let val = *vals - .get(&Some("maybe_ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_ref_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_ref_index"))? - }, - }) - }; - } - if value.name() == "cancel_proposal" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::cancel_proposal { - prop_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prop_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::cancel_proposal { - prop_index: { - let val = *vals - .get(&Some("prop_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prop_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prop_index"))? - }, - }) - }; - } - if value.name() == "set_metadata" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::set_metadata { - owner: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - maybe_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("maybe_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_metadata { - owner: { - let val = *vals - .get(&Some("owner")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "owner".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - maybe_hash: { - let val = *vals - .get(&Some("maybe_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("maybe_hash"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "propose", - "second", - "vote", - "emergency_cancel", - "external_propose", - "external_propose_majority", - "external_propose_default", - "fast_track", - "veto_external", - "cancel_referendum", - "delegate", - "undelegate", - "clear_public_proposals", - "unlock", - "remove_vote", - "remove_other_vote", - "blacklist", - "cancel_proposal", - "set_metadata", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::propose { proposal, value } => { - ::subxt::ext::scale_encode::Variant { - name: "propose", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::second { proposal } => { - ::subxt::ext::scale_encode::Variant { - name: "second", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::vote { ref_index, vote } => { - ::subxt::ext::scale_encode::Variant { - name: "vote", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("vote"), - vote as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::emergency_cancel { ref_index } => { - ::subxt::ext::scale_encode::Variant { - name: "emergency_cancel", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::external_propose { proposal } => { - ::subxt::ext::scale_encode::Variant { - name: "external_propose", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::external_propose_majority { proposal } => { - ::subxt::ext::scale_encode::Variant { - name: "external_propose_majority", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::external_propose_default { proposal } => { - ::subxt::ext::scale_encode::Variant { - name: "external_propose_default", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::fast_track { proposal_hash, voting_period, delay } => { - ::subxt::ext::scale_encode::Variant { - name: "fast_track", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("voting_period"), - voting_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::veto_external { proposal_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "veto_external", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::cancel_referendum { ref_index } => { - ::subxt::ext::scale_encode::Variant { - name: "cancel_referendum", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::delegate { to, conviction, balance } => { - ::subxt::ext::scale_encode::Variant { - name: "delegate", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("conviction"), - conviction as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::undelegate => { - ::subxt::ext::scale_encode::Variant { - name: "undelegate", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::clear_public_proposals => { - ::subxt::ext::scale_encode::Variant { - name: "clear_public_proposals", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::unlock { target } => { - ::subxt::ext::scale_encode::Variant { - name: "unlock", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::remove_vote { index } => { - ::subxt::ext::scale_encode::Variant { - name: "remove_vote", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::remove_other_vote { target, index } => { - ::subxt::ext::scale_encode::Variant { - name: "remove_other_vote", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::blacklist { proposal_hash, maybe_ref_index } => { - ::subxt::ext::scale_encode::Variant { - name: "blacklist", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_ref_index"), - maybe_ref_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::cancel_proposal { prop_index } => { - ::subxt::ext::scale_encode::Variant { - name: "cancel_proposal", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("prop_index"), - prop_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_metadata { owner, maybe_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "set_metadata", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("owner"), - owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_hash"), - maybe_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::propose { proposal: __self_0, value: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "propose", - "proposal", - __self_0, - "value", - &__self_1, - ) - } - Call::second { proposal: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "second", - "proposal", - &__self_0, - ) - } - Call::vote { ref_index: __self_0, vote: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "vote", - "ref_index", - __self_0, - "vote", - &__self_1, - ) - } - Call::emergency_cancel { ref_index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "emergency_cancel", - "ref_index", - &__self_0, - ) - } - Call::external_propose { proposal: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "external_propose", - "proposal", - &__self_0, - ) - } - Call::external_propose_majority { proposal: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "external_propose_majority", - "proposal", - &__self_0, - ) - } - Call::external_propose_default { proposal: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "external_propose_default", - "proposal", - &__self_0, - ) - } - Call::fast_track { - proposal_hash: __self_0, - voting_period: __self_1, - delay: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "fast_track", - "proposal_hash", - __self_0, - "voting_period", - __self_1, - "delay", - &__self_2, - ) - } - Call::veto_external { proposal_hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "veto_external", - "proposal_hash", - &__self_0, - ) - } - Call::cancel_referendum { ref_index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "cancel_referendum", - "ref_index", - &__self_0, - ) - } - Call::delegate { - to: __self_0, - conviction: __self_1, - balance: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "delegate", - "to", - __self_0, - "conviction", - __self_1, - "balance", - &__self_2, - ) - } - Call::undelegate => { - ::core::fmt::Formatter::write_str(f, "undelegate") - } - Call::clear_public_proposals => { - ::core::fmt::Formatter::write_str( - f, - "clear_public_proposals", - ) - } - Call::unlock { target: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "unlock", - "target", - &__self_0, - ) - } - Call::remove_vote { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "remove_vote", - "index", - &__self_0, - ) - } - Call::remove_other_vote { - target: __self_0, - index: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "remove_other_vote", - "target", - __self_0, - "index", - &__self_1, - ) - } - Call::blacklist { - proposal_hash: __self_0, - maybe_ref_index: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "blacklist", - "proposal_hash", - __self_0, - "maybe_ref_index", - &__self_1, - ) - } - Call::cancel_proposal { prop_index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "cancel_proposal", - "prop_index", - &__self_0, - ) - } - Call::set_metadata { - owner: __self_0, - maybe_hash: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "set_metadata", - "owner", - __self_0, - "maybe_hash", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - ValueLow, - #[codec(index = 1)] - ProposalMissing, - #[codec(index = 2)] - AlreadyCanceled, - #[codec(index = 3)] - DuplicateProposal, - #[codec(index = 4)] - ProposalBlacklisted, - #[codec(index = 5)] - NotSimpleMajority, - #[codec(index = 6)] - InvalidHash, - #[codec(index = 7)] - NoProposal, - #[codec(index = 8)] - AlreadyVetoed, - #[codec(index = 9)] - ReferendumInvalid, - #[codec(index = 10)] - NoneWaiting, - #[codec(index = 11)] - NotVoter, - #[codec(index = 12)] - NoPermission, - #[codec(index = 13)] - AlreadyDelegating, - #[codec(index = 14)] - InsufficientFunds, - #[codec(index = 15)] - NotDelegating, - #[codec(index = 16)] - VotesExist, - #[codec(index = 17)] - InstantNotAllowed, - #[codec(index = 18)] - Nonsense, - #[codec(index = 19)] - WrongUpperBound, - #[codec(index = 20)] - MaxVotesReached, - #[codec(index = 21)] - TooMany, - #[codec(index = 22)] - VotingPeriodLow, - #[codec(index = 23)] - PreimageNotExist, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ValueLow) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ProposalMissing) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyCanceled) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::DuplicateProposal) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ProposalBlacklisted) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotSimpleMajority) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidHash) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoProposal) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyVetoed) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ReferendumInvalid) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoneWaiting) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotVoter) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoPermission) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyDelegating) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InsufficientFunds) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotDelegating) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::VotesExist) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InstantNotAllowed) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Nonsense) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::WrongUpperBound) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MaxVotesReached) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooMany) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 22u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::VotingPeriodLow) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 23u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::PreimageNotExist) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::ValueLow => 0_usize, - Error::ProposalMissing => 0_usize, - Error::AlreadyCanceled => 0_usize, - Error::DuplicateProposal => 0_usize, - Error::ProposalBlacklisted => 0_usize, - Error::NotSimpleMajority => 0_usize, - Error::InvalidHash => 0_usize, - Error::NoProposal => 0_usize, - Error::AlreadyVetoed => 0_usize, - Error::ReferendumInvalid => 0_usize, - Error::NoneWaiting => 0_usize, - Error::NotVoter => 0_usize, - Error::NoPermission => 0_usize, - Error::AlreadyDelegating => 0_usize, - Error::InsufficientFunds => 0_usize, - Error::NotDelegating => 0_usize, - Error::VotesExist => 0_usize, - Error::InstantNotAllowed => 0_usize, - Error::Nonsense => 0_usize, - Error::WrongUpperBound => 0_usize, - Error::MaxVotesReached => 0_usize, - Error::TooMany => 0_usize, - Error::VotingPeriodLow => 0_usize, - Error::PreimageNotExist => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::ValueLow => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::ProposalMissing => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::AlreadyCanceled => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::DuplicateProposal => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::ProposalBlacklisted => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::NotSimpleMajority => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::InvalidHash => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::NoProposal => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::AlreadyVetoed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::ReferendumInvalid => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::NoneWaiting => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Error::NotVoter => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - Error::NoPermission => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - Error::AlreadyDelegating => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - } - Error::InsufficientFunds => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - } - Error::NotDelegating => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - } - Error::VotesExist => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - } - Error::InstantNotAllowed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - } - Error::Nonsense => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - } - Error::WrongUpperBound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - } - Error::MaxVotesReached => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - } - Error::TooMany => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - } - Error::VotingPeriodLow => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(22u8 as ::core::primitive::u8); - } - Error::PreimageNotExist => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(23u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "ValueLow" { - return Ok(Error::ValueLow); - } - if value.name() == "ProposalMissing" { - return Ok(Error::ProposalMissing); - } - if value.name() == "AlreadyCanceled" { - return Ok(Error::AlreadyCanceled); - } - if value.name() == "DuplicateProposal" { - return Ok(Error::DuplicateProposal); - } - if value.name() == "ProposalBlacklisted" { - return Ok(Error::ProposalBlacklisted); - } - if value.name() == "NotSimpleMajority" { - return Ok(Error::NotSimpleMajority); - } - if value.name() == "InvalidHash" { - return Ok(Error::InvalidHash); - } - if value.name() == "NoProposal" { - return Ok(Error::NoProposal); - } - if value.name() == "AlreadyVetoed" { - return Ok(Error::AlreadyVetoed); - } - if value.name() == "ReferendumInvalid" { - return Ok(Error::ReferendumInvalid); - } - if value.name() == "NoneWaiting" { - return Ok(Error::NoneWaiting); - } - if value.name() == "NotVoter" { - return Ok(Error::NotVoter); - } - if value.name() == "NoPermission" { - return Ok(Error::NoPermission); - } - if value.name() == "AlreadyDelegating" { - return Ok(Error::AlreadyDelegating); - } - if value.name() == "InsufficientFunds" { - return Ok(Error::InsufficientFunds); - } - if value.name() == "NotDelegating" { - return Ok(Error::NotDelegating); - } - if value.name() == "VotesExist" { - return Ok(Error::VotesExist); - } - if value.name() == "InstantNotAllowed" { - return Ok(Error::InstantNotAllowed); - } - if value.name() == "Nonsense" { - return Ok(Error::Nonsense); - } - if value.name() == "WrongUpperBound" { - return Ok(Error::WrongUpperBound); - } - if value.name() == "MaxVotesReached" { - return Ok(Error::MaxVotesReached); - } - if value.name() == "TooMany" { - return Ok(Error::TooMany); - } - if value.name() == "VotingPeriodLow" { - return Ok(Error::VotingPeriodLow); - } - if value.name() == "PreimageNotExist" { - return Ok(Error::PreimageNotExist); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "ValueLow", - "ProposalMissing", - "AlreadyCanceled", - "DuplicateProposal", - "ProposalBlacklisted", - "NotSimpleMajority", - "InvalidHash", - "NoProposal", - "AlreadyVetoed", - "ReferendumInvalid", - "NoneWaiting", - "NotVoter", - "NoPermission", - "AlreadyDelegating", - "InsufficientFunds", - "NotDelegating", - "VotesExist", - "InstantNotAllowed", - "Nonsense", - "WrongUpperBound", - "MaxVotesReached", - "TooMany", - "VotingPeriodLow", - "PreimageNotExist", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::ValueLow => { - ::subxt::ext::scale_encode::Variant { - name: "ValueLow", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ProposalMissing => { - ::subxt::ext::scale_encode::Variant { - name: "ProposalMissing", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyCanceled => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyCanceled", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DuplicateProposal => { - ::subxt::ext::scale_encode::Variant { - name: "DuplicateProposal", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ProposalBlacklisted => { - ::subxt::ext::scale_encode::Variant { - name: "ProposalBlacklisted", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotSimpleMajority => { - ::subxt::ext::scale_encode::Variant { - name: "NotSimpleMajority", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidHash => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidHash", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoProposal => { - ::subxt::ext::scale_encode::Variant { - name: "NoProposal", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyVetoed => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyVetoed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReferendumInvalid => { - ::subxt::ext::scale_encode::Variant { - name: "ReferendumInvalid", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoneWaiting => { - ::subxt::ext::scale_encode::Variant { - name: "NoneWaiting", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotVoter => { - ::subxt::ext::scale_encode::Variant { - name: "NotVoter", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoPermission => { - ::subxt::ext::scale_encode::Variant { - name: "NoPermission", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyDelegating => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyDelegating", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InsufficientFunds => { - ::subxt::ext::scale_encode::Variant { - name: "InsufficientFunds", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotDelegating => { - ::subxt::ext::scale_encode::Variant { - name: "NotDelegating", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::VotesExist => { - ::subxt::ext::scale_encode::Variant { - name: "VotesExist", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InstantNotAllowed => { - ::subxt::ext::scale_encode::Variant { - name: "InstantNotAllowed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Nonsense => { - ::subxt::ext::scale_encode::Variant { - name: "Nonsense", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WrongUpperBound => { - ::subxt::ext::scale_encode::Variant { - name: "WrongUpperBound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MaxVotesReached => { - ::subxt::ext::scale_encode::Variant { - name: "MaxVotesReached", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooMany => { - ::subxt::ext::scale_encode::Variant { - name: "TooMany", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::VotingPeriodLow => { - ::subxt::ext::scale_encode::Variant { - name: "VotingPeriodLow", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PreimageNotExist => { - ::subxt::ext::scale_encode::Variant { - name: "PreimageNotExist", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::ValueLow => "ValueLow", - Error::ProposalMissing => "ProposalMissing", - Error::AlreadyCanceled => "AlreadyCanceled", - Error::DuplicateProposal => "DuplicateProposal", - Error::ProposalBlacklisted => "ProposalBlacklisted", - Error::NotSimpleMajority => "NotSimpleMajority", - Error::InvalidHash => "InvalidHash", - Error::NoProposal => "NoProposal", - Error::AlreadyVetoed => "AlreadyVetoed", - Error::ReferendumInvalid => "ReferendumInvalid", - Error::NoneWaiting => "NoneWaiting", - Error::NotVoter => "NotVoter", - Error::NoPermission => "NoPermission", - Error::AlreadyDelegating => "AlreadyDelegating", - Error::InsufficientFunds => "InsufficientFunds", - Error::NotDelegating => "NotDelegating", - Error::VotesExist => "VotesExist", - Error::InstantNotAllowed => "InstantNotAllowed", - Error::Nonsense => "Nonsense", - Error::WrongUpperBound => "WrongUpperBound", - Error::MaxVotesReached => "MaxVotesReached", - Error::TooMany => "TooMany", - Error::VotingPeriodLow => "VotingPeriodLow", - Error::PreimageNotExist => "PreimageNotExist", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - Proposed { - proposal_index: ::core::primitive::u32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 1)] - Tabled { - proposal_index: ::core::primitive::u32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 2)] - ExternalTabled, - #[codec(index = 3)] - Started { - ref_index: ::core::primitive::u32, - threshold: runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - }, - #[codec(index = 4)] - Passed { ref_index: ::core::primitive::u32 }, - #[codec(index = 5)] - NotPassed { ref_index: ::core::primitive::u32 }, - #[codec(index = 6)] - Cancelled { ref_index: ::core::primitive::u32 }, - #[codec(index = 7)] - Delegated { - who: ::subxt::utils::AccountId32, - target: ::subxt::utils::AccountId32, - }, - #[codec(index = 8)] - Undelegated { account: ::subxt::utils::AccountId32 }, - #[codec(index = 9)] - Vetoed { - who: ::subxt::utils::AccountId32, - proposal_hash: ::subxt::utils::H256, - until: ::core::primitive::u32, - }, - #[codec(index = 10)] - Blacklisted { proposal_hash: ::subxt::utils::H256 }, - #[codec(index = 11)] - Voted { - voter: ::subxt::utils::AccountId32, - ref_index: ::core::primitive::u32, - vote: runtime_types::pallet_democracy::vote::AccountVote< - ::core::primitive::u128, - >, - }, - #[codec(index = 12)] - Seconded { - seconder: ::subxt::utils::AccountId32, - prop_index: ::core::primitive::u32, - }, - #[codec(index = 13)] - ProposalCanceled { prop_index: ::core::primitive::u32 }, - #[codec(index = 14)] - MetadataSet { - owner: runtime_types::pallet_democracy::types::MetadataOwner, - hash: ::subxt::utils::H256, - }, - #[codec(index = 15)] - MetadataCleared { - owner: runtime_types::pallet_democracy::types::MetadataOwner, - hash: ::subxt::utils::H256, - }, - #[codec(index = 16)] - MetadataTransferred { - prev_owner: runtime_types::pallet_democracy::types::MetadataOwner, - owner: runtime_types::pallet_democracy::types::MetadataOwner, - hash: ::subxt::utils::H256, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Proposed { - proposal_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::Proposed::proposal_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Proposed::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Tabled { - proposal_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Tabled::proposal_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Tabled::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ExternalTabled) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Started { - ref_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Started::ref_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - threshold: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Started::threshold`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Passed { - ref_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Passed::ref_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::NotPassed { - ref_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NotPassed::ref_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Cancelled { - ref_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Cancelled::ref_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Delegated { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Delegated::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - target: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Delegated::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Undelegated { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Undelegated::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Vetoed { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Vetoed::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Vetoed::proposal_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - until: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Vetoed::until`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Blacklisted { - proposal_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::Blacklisted::proposal_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Voted { - voter: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Voted::voter`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ref_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Voted::ref_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - vote: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Voted::vote`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Seconded { - seconder: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Seconded::seconder`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - prop_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Seconded::prop_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ProposalCanceled { - prop_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::ProposalCanceled::prop_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::MetadataSet { - owner: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::MetadataSet::owner`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::MetadataSet::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::MetadataCleared { - owner: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::MetadataCleared::owner`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::MetadataCleared::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::MetadataTransferred { - prev_owner: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::MetadataTransferred::prev_owner`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - owner: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::MetadataTransferred::owner`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::MetadataTransferred::hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::Proposed { ref proposal_index, ref deposit } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(deposit), - ) - } - Event::Tabled { ref proposal_index, ref deposit } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(deposit), - ) - } - Event::ExternalTabled => 0_usize, - Event::Started { ref ref_index, ref threshold } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(ref_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(threshold), - ) - } - Event::Passed { ref ref_index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(ref_index), - ) - } - Event::NotPassed { ref ref_index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(ref_index), - ) - } - Event::Cancelled { ref ref_index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(ref_index), - ) - } - Event::Delegated { ref who, ref target } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(target), - ) - } - Event::Undelegated { ref account } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(account), - ) - } - Event::Vetoed { ref who, ref proposal_hash, ref until } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(until), - ) - } - Event::Blacklisted { ref proposal_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_hash), - ) - } - Event::Voted { ref voter, ref ref_index, ref vote } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(voter), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(ref_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(vote), - ) - } - Event::Seconded { ref seconder, ref prop_index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(seconder), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(prop_index), - ) - } - Event::ProposalCanceled { ref prop_index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(prop_index), - ) - } - Event::MetadataSet { ref owner, ref hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(owner), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - } - Event::MetadataCleared { ref owner, ref hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(owner), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - } - Event::MetadataTransferred { - ref prev_owner, - ref owner, - ref hash, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(prev_owner), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(owner), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::Proposed { ref proposal_index, ref deposit } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - deposit, - __codec_dest_edqy, - ); - } - Event::Tabled { ref proposal_index, ref deposit } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - deposit, - __codec_dest_edqy, - ); - } - Event::ExternalTabled => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Event::Started { ref ref_index, ref threshold } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - ref_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - threshold, - __codec_dest_edqy, - ); - } - Event::Passed { ref ref_index } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - ref_index, - __codec_dest_edqy, - ); - } - Event::NotPassed { ref ref_index } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - ref_index, - __codec_dest_edqy, - ); - } - Event::Cancelled { ref ref_index } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - ref_index, - __codec_dest_edqy, - ); - } - Event::Delegated { ref who, ref target } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - target, - __codec_dest_edqy, - ); - } - Event::Undelegated { ref account } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - account, - __codec_dest_edqy, - ); - } - Event::Vetoed { ref who, ref proposal_hash, ref until } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - until, - __codec_dest_edqy, - ); - } - Event::Blacklisted { ref proposal_hash } => { - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_hash, - __codec_dest_edqy, - ); - } - Event::Voted { ref voter, ref ref_index, ref vote } => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - voter, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ref_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - vote, - __codec_dest_edqy, - ); - } - Event::Seconded { ref seconder, ref prop_index } => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - seconder, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - prop_index, - __codec_dest_edqy, - ); - } - Event::ProposalCanceled { ref prop_index } => { - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - prop_index, - __codec_dest_edqy, - ); - } - Event::MetadataSet { ref owner, ref hash } => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - owner, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - } - Event::MetadataCleared { ref owner, ref hash } => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - owner, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - } - Event::MetadataTransferred { - ref prev_owner, - ref owner, - ref hash, - } => { - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - prev_owner, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - owner, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Proposed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Proposed { - proposal_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Proposed { - proposal_index: { - let val = *vals - .get(&Some("proposal_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - }; - } - if value.name() == "Tabled" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Tabled { - proposal_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Tabled { - proposal_index: { - let val = *vals - .get(&Some("proposal_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - }; - } - if value.name() == "ExternalTabled" { - return Ok(Event::ExternalTabled); - } - if value.name() == "Started" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Started { - ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Started { - ref_index: { - let val = *vals - .get(&Some("ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ref_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - }) - }; - } - if value.name() == "Passed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Passed { - ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Passed { - ref_index: { - let val = *vals - .get(&Some("ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ref_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - }; - } - if value.name() == "NotPassed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::NotPassed { - ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::NotPassed { - ref_index: { - let val = *vals - .get(&Some("ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ref_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - }; - } - if value.name() == "Cancelled" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Cancelled { - ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Cancelled { - ref_index: { - let val = *vals - .get(&Some("ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ref_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - }) - }; - } - if value.name() == "Delegated" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Delegated { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Delegated { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - }; - } - if value.name() == "Undelegated" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Undelegated { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Undelegated { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - }; - } - if value.name() == "Vetoed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::Vetoed { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - until: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("until"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Vetoed { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - until: { - let val = *vals - .get(&Some("until")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "until".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("until"))? - }, - }) - }; - } - if value.name() == "Blacklisted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Blacklisted { - proposal_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Blacklisted { - proposal_hash: { - let val = *vals - .get(&Some("proposal_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_hash"))? - }, - }) - }; - } - if value.name() == "Voted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::Voted { - voter: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("voter"))? - }, - ref_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - vote: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("vote"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Voted { - voter: { - let val = *vals - .get(&Some("voter")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "voter".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("voter"))? - }, - ref_index: { - let val = *vals - .get(&Some("ref_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ref_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ref_index"))? - }, - vote: { - let val = *vals - .get(&Some("vote")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "vote".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("vote"))? - }, - }) - }; - } - if value.name() == "Seconded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Seconded { - seconder: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("seconder"))? - }, - prop_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prop_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Seconded { - seconder: { - let val = *vals - .get(&Some("seconder")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "seconder".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("seconder"))? - }, - prop_index: { - let val = *vals - .get(&Some("prop_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prop_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prop_index"))? - }, - }) - }; - } - if value.name() == "ProposalCanceled" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::ProposalCanceled { - prop_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prop_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::ProposalCanceled { - prop_index: { - let val = *vals - .get(&Some("prop_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prop_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prop_index"))? - }, - }) - }; - } - if value.name() == "MetadataSet" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::MetadataSet { - owner: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::MetadataSet { - owner: { - let val = *vals - .get(&Some("owner")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "owner".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - }; - } - if value.name() == "MetadataCleared" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::MetadataCleared { - owner: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::MetadataCleared { - owner: { - let val = *vals - .get(&Some("owner")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "owner".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - }; - } - if value.name() == "MetadataTransferred" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::MetadataTransferred { - prev_owner: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prev_owner"))? - }, - owner: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::MetadataTransferred { - prev_owner: { - let val = *vals - .get(&Some("prev_owner")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prev_owner".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prev_owner"))? - }, - owner: { - let val = *vals - .get(&Some("owner")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "owner".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Proposed", - "Tabled", - "ExternalTabled", - "Started", - "Passed", - "NotPassed", - "Cancelled", - "Delegated", - "Undelegated", - "Vetoed", - "Blacklisted", - "Voted", - "Seconded", - "ProposalCanceled", - "MetadataSet", - "MetadataCleared", - "MetadataTransferred", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Proposed { proposal_index, deposit } => { - ::subxt::ext::scale_encode::Variant { - name: "Proposed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Tabled { proposal_index, deposit } => { - ::subxt::ext::scale_encode::Variant { - name: "Tabled", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExternalTabled => { - ::subxt::ext::scale_encode::Variant { - name: "ExternalTabled", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Started { ref_index, threshold } => { - ::subxt::ext::scale_encode::Variant { - name: "Started", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Passed { ref_index } => { - ::subxt::ext::scale_encode::Variant { - name: "Passed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotPassed { ref_index } => { - ::subxt::ext::scale_encode::Variant { - name: "NotPassed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Cancelled { ref_index } => { - ::subxt::ext::scale_encode::Variant { - name: "Cancelled", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Delegated { who, target } => { - ::subxt::ext::scale_encode::Variant { - name: "Delegated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Undelegated { account } => { - ::subxt::ext::scale_encode::Variant { - name: "Undelegated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Vetoed { who, proposal_hash, until } => { - ::subxt::ext::scale_encode::Variant { - name: "Vetoed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("until"), - until as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Blacklisted { proposal_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "Blacklisted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_hash"), - proposal_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Voted { voter, ref_index, vote } => { - ::subxt::ext::scale_encode::Variant { - name: "Voted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("voter"), - voter as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ref_index"), - ref_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("vote"), - vote as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Seconded { seconder, prop_index } => { - ::subxt::ext::scale_encode::Variant { - name: "Seconded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("seconder"), - seconder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prop_index"), - prop_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ProposalCanceled { prop_index } => { - ::subxt::ext::scale_encode::Variant { - name: "ProposalCanceled", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("prop_index"), - prop_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MetadataSet { owner, hash } => { - ::subxt::ext::scale_encode::Variant { - name: "MetadataSet", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("owner"), - owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MetadataCleared { owner, hash } => { - ::subxt::ext::scale_encode::Variant { - name: "MetadataCleared", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("owner"), - owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MetadataTransferred { prev_owner, owner, hash } => { - ::subxt::ext::scale_encode::Variant { - name: "MetadataTransferred", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("prev_owner"), - prev_owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("owner"), - owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::Proposed { - proposal_index: __self_0, - deposit: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Proposed", - "proposal_index", - __self_0, - "deposit", - &__self_1, - ) - } - Event::Tabled { - proposal_index: __self_0, - deposit: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Tabled", - "proposal_index", - __self_0, - "deposit", - &__self_1, - ) - } - Event::ExternalTabled => { - ::core::fmt::Formatter::write_str(f, "ExternalTabled") - } - Event::Started { - ref_index: __self_0, - threshold: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Started", - "ref_index", - __self_0, - "threshold", - &__self_1, - ) - } - Event::Passed { ref_index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Passed", - "ref_index", - &__self_0, - ) - } - Event::NotPassed { ref_index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "NotPassed", - "ref_index", - &__self_0, - ) - } - Event::Cancelled { ref_index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Cancelled", - "ref_index", - &__self_0, - ) - } - Event::Delegated { who: __self_0, target: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Delegated", - "who", - __self_0, - "target", - &__self_1, - ) - } - Event::Undelegated { account: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Undelegated", - "account", - &__self_0, - ) - } - Event::Vetoed { - who: __self_0, - proposal_hash: __self_1, - until: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Vetoed", - "who", - __self_0, - "proposal_hash", - __self_1, - "until", - &__self_2, - ) - } - Event::Blacklisted { proposal_hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Blacklisted", - "proposal_hash", - &__self_0, - ) - } - Event::Voted { - voter: __self_0, - ref_index: __self_1, - vote: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Voted", - "voter", - __self_0, - "ref_index", - __self_1, - "vote", - &__self_2, - ) - } - Event::Seconded { - seconder: __self_0, - prop_index: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Seconded", - "seconder", - __self_0, - "prop_index", - &__self_1, - ) - } - Event::ProposalCanceled { prop_index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ProposalCanceled", - "prop_index", - &__self_0, - ) - } - Event::MetadataSet { owner: __self_0, hash: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MetadataSet", - "owner", - __self_0, - "hash", - &__self_1, - ) - } - Event::MetadataCleared { - owner: __self_0, - hash: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MetadataCleared", - "owner", - __self_0, - "hash", - &__self_1, - ) - } - Event::MetadataTransferred { - prev_owner: __self_0, - owner: __self_1, - hash: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "MetadataTransferred", - "prev_owner", - __self_0, - "owner", - __self_1, - "hash", - &__self_2, - ) - } - } - } - } - } - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Delegations<_0> { - pub votes: _0, - pub capital: _0, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for Delegations<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Delegations::<_0> { - votes: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegations::votes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - capital: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Delegations::capital`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for Delegations<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.capital), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.votes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.capital, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for Delegations<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for Delegations<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Delegations<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Delegations { - votes: { - let val = *vals - .get(&Some("votes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes"))? - }, - capital: { - let val = *vals - .get(&Some("capital")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "capital".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("capital"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Delegations { - votes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes"))? - }, - capital: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("capital"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for Delegations<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for Delegations<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Delegations { votes, capital } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("votes"), - votes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("capital"), - capital as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for Delegations<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Delegations { votes, capital } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("votes"), - votes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("capital"), - capital as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for Delegations<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Delegations", - "votes", - &self.votes, - "capital", - &&self.capital, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum MetadataOwner { - #[codec(index = 0)] - External, - #[codec(index = 1)] - Proposal(::core::primitive::u32), - #[codec(index = 2)] - Referendum(::core::primitive::u32), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MetadataOwner { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `MetadataOwner`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(MetadataOwner::External) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - MetadataOwner::Proposal({ - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MetadataOwner::Proposal.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - MetadataOwner::Referendum({ - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MetadataOwner::Referendum.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `MetadataOwner`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MetadataOwner { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - MetadataOwner::External => 0_usize, - MetadataOwner::Proposal(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - MetadataOwner::Referendum(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - MetadataOwner::External => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - MetadataOwner::Proposal(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - MetadataOwner::Referendum(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MetadataOwner {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MetadataOwner { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MetadataOwner; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "External" { - return Ok(MetadataOwner::External); - } - if value.name() == "Proposal" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - MetadataOwner::Proposal({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Referendum" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - MetadataOwner::Referendum({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "External", - "Proposal", - "Referendum", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MetadataOwner { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::External => { - ::subxt::ext::scale_encode::Variant { - name: "External", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Proposal(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Proposal", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Referendum(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Referendum", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MetadataOwner { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - MetadataOwner::External => { - ::core::fmt::Formatter::write_str(f, "External") - } - MetadataOwner::Proposal(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Proposal", - &__self_0, - ) - } - MetadataOwner::Referendum(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Referendum", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ReferendumInfo<_0, _1, _2> { - #[codec(index = 0)] - Ongoing( - runtime_types::pallet_democracy::types::ReferendumStatus< - _0, - _1, - _2, - >, - ), - #[codec(index = 1)] - Finished { approved: ::core::primitive::bool, end: _0 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Decode - for ReferendumInfo<_0, _1, _2> - where - runtime_types::pallet_democracy::types::ReferendumStatus< - _0, - _1, - _2, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_democracy::types::ReferendumStatus< - _0, - _1, - _2, - >: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `ReferendumInfo`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ReferendumInfo::< - _0, - _1, - _2, - >::Ongoing({ - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumInfo::Ongoing.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ReferendumInfo::< - _0, - _1, - _2, - >::Finished { - approved: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ReferendumInfo::Finished::approved`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - end: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumInfo::Finished::end`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `ReferendumInfo`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Encode - for ReferendumInfo<_0, _1, _2> - where - runtime_types::pallet_democracy::types::ReferendumStatus< - _0, - _1, - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::types::ReferendumStatus< - _0, - _1, - _2, - >: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - ReferendumInfo::Ongoing(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - ReferendumInfo::Finished { ref approved, ref end } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(approved), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(end)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - ReferendumInfo::Ongoing(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - ReferendumInfo::Finished { ref approved, ref end } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - approved, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - end, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::EncodeLike - for ReferendumInfo<_0, _1, _2> - where - runtime_types::pallet_democracy::types::ReferendumStatus< - _0, - _1, - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::types::ReferendumStatus< - _0, - _1, - _2, - >: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2>( - ::core::marker::PhantomData<(_0, _1, _2)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1, _2> ::subxt::ext::scale_decode::IntoVisitor - for ReferendumInfo<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReferendumInfo<_0, _1, _2>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Ongoing" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - ReferendumInfo::Ongoing({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Finished" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(ReferendumInfo::Finished { - approved: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("approved"))? - }, - end: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ReferendumInfo::Finished { - approved: { - let val = *vals - .get(&Some("approved")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "approved".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("approved"))? - }, - end: { - let val = *vals - .get(&Some("end")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "end".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Ongoing", "Finished"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsType - for ReferendumInfo<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Ongoing(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Ongoing", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Finished { approved, end } => { - ::subxt::ext::scale_encode::Variant { - name: "Finished", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("approved"), - approved as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("end"), - end as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - > ::core::fmt::Debug for ReferendumInfo<_0, _1, _2> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - ReferendumInfo::Ongoing(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Ongoing", - &__self_0, - ) - } - ReferendumInfo::Finished { - approved: __self_0, - end: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Finished", - "approved", - __self_0, - "end", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct 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>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Decode - for ReferendumStatus<_0, _1, _2> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - runtime_types::pallet_democracy::types::Tally< - _2, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_democracy::types::Tally< - _2, - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ReferendumStatus::<_0, _1, _2> { - end: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumStatus::end`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumStatus::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - threshold: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumStatus::threshold`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delay: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumStatus::delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tally: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumStatus::tally`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Encode - for ReferendumStatus<_0, _1, _2> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::types::Tally< - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::types::Tally< - _2, - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.end), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.threshold), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delay), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.tally), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.end, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proposal, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.threshold, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.delay, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.tally, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::EncodeLike - for ReferendumStatus<_0, _1, _2> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::types::Tally< - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::types::Tally< - _2, - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2>( - ::core::marker::PhantomData<(_0, _1, _2)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1, _2> ::subxt::ext::scale_decode::IntoVisitor - for ReferendumStatus<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReferendumStatus<_0, _1, _2>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ReferendumStatus { - end: { - let val = *vals - .get(&Some("end")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "end".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - tally: { - let val = *vals - .get(&Some("tally")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tally".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(ReferendumStatus { - end: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - tally: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::DecodeAsFields - for ReferendumStatus<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsType - for ReferendumStatus<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReferendumStatus { - end, - proposal, - threshold, - delay, - tally, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("end"), - end as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsFields - for ReferendumStatus<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReferendumStatus { - end, - proposal, - threshold, - delay, - tally, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("end"), - end as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - > ::core::fmt::Debug for ReferendumStatus<_0, _1, _2> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "ReferendumStatus", - "end", - &self.end, - "proposal", - &self.proposal, - "threshold", - &self.threshold, - "delay", - &self.delay, - "tally", - &&self.tally, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Tally<_0> { - pub ayes: _0, - pub nays: _0, - pub turnout: _0, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for Tally<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Tally::<_0> { - ayes: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Tally::ayes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - nays: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Tally::nays`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - turnout: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Tally::turnout`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for Tally<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.ayes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.nays), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.turnout), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.ayes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.nays, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.turnout, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for Tally<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor for Tally<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Tally<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Tally { - ayes: { - let val = *vals - .get(&Some("ayes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ayes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ayes"))? - }, - nays: { - let val = *vals - .get(&Some("nays")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nays".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nays"))? - }, - turnout: { - let val = *vals - .get(&Some("turnout")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "turnout".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("turnout"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Tally { - ayes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ayes"))? - }, - nays: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nays"))? - }, - turnout: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("turnout"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields for Tally<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for Tally<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Tally { ayes, nays, turnout } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ayes"), - ayes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nays"), - nays as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("turnout"), - turnout as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields for Tally<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Tally { ayes, nays, turnout } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ayes"), - ayes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nays"), - nays as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("turnout"), - turnout as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for Tally<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Tally", - "ayes", - &self.ayes, - "nays", - &self.nays, - "turnout", - &&self.turnout, - ) - } - } - } - pub mod vote { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum AccountVote<_0> { - #[codec(index = 0)] - Standard { - vote: runtime_types::pallet_democracy::vote::Vote, - balance: _0, - }, - #[codec(index = 1)] - Split { aye: _0, nay: _0 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for AccountVote<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `AccountVote`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(AccountVote::<_0>::Standard { - vote: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountVote::Standard::vote`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - balance: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountVote::Standard::balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(AccountVote::<_0>::Split { - aye: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountVote::Split::aye`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - nay: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AccountVote::Split::nay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `AccountVote`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for AccountVote<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - AccountVote::Standard { ref vote, ref balance } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(vote), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(balance), - ) - } - AccountVote::Split { ref aye, ref nay } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aye)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(nay)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - AccountVote::Standard { ref vote, ref balance } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - vote, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - balance, - __codec_dest_edqy, - ); - } - AccountVote::Split { ref aye, ref nay } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aye, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - nay, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for AccountVote<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for AccountVote<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AccountVote<_0>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Standard" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(AccountVote::Standard { - vote: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("vote"))? - }, - balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AccountVote::Standard { - vote: { - let val = *vals - .get(&Some("vote")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "vote".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("vote"))? - }, - balance: { - let val = *vals - .get(&Some("balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "balance".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - }; - } - if value.name() == "Split" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(AccountVote::Split { - aye: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("aye"))? - }, - nay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nay"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AccountVote::Split { - aye: { - let val = *vals - .get(&Some("aye")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "aye".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("aye"))? - }, - nay: { - let val = *vals - .get(&Some("nay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nay"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Standard", "Split"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for AccountVote<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Standard { vote, balance } => { - ::subxt::ext::scale_encode::Variant { - name: "Standard", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("vote"), - vote as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Split { aye, nay } => { - ::subxt::ext::scale_encode::Variant { - name: "Split", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("aye"), - aye as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nay"), - nay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for AccountVote<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - AccountVote::Standard { - vote: __self_0, - balance: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Standard", - "vote", - __self_0, - "balance", - &__self_1, - ) - } - AccountVote::Split { aye: __self_0, nay: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Split", - "aye", - __self_0, - "nay", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PriorLock<_0, _1>(pub _0, pub _1); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for PriorLock<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - PriorLock::< - _0, - _1, - >( - { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PriorLock.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PriorLock.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for PriorLock<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for PriorLock<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>( - ::core::marker::PhantomData<(_0, _1)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for PriorLock<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PriorLock<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - PriorLock( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for PriorLock<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for PriorLock<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PriorLock(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for PriorLock<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PriorLock(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - > ::core::fmt::Debug for PriorLock<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "PriorLock", - &self.0, - &&self.1, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote(pub ::core::primitive::u8); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Vote { - type As = ::core::primitive::u8; - fn encode_as(&self) -> &::core::primitive::u8 { - &self.0 - } - fn decode_from( - x: ::core::primitive::u8, - ) -> ::core::result::Result< - Vote, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Vote(x)) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Vote { - fn from(x: ::subxt::ext::codec::Compact) -> Vote { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Vote { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Vote({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Vote.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Vote { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Vote {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Vote { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Vote; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Vote({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Vote { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Vote { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vote(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Vote { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Vote(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Vote { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Vote", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Voting<_0, _1, _2> { - #[codec(index = 0)] - Direct { - votes: runtime_types::bounded_collections::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, - >, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Decode - for Voting<_0, _1, _2> - where - runtime_types::bounded_collections::bounded_vec::BoundedVec< - (_2, runtime_types::pallet_democracy::vote::AccountVote<_0>), - >: ::subxt::ext::codec::Decode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - (_2, runtime_types::pallet_democracy::vote::AccountVote<_0>), - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_democracy::types::Delegations< - _0, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_democracy::types::Delegations< - _0, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_democracy::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_democracy::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - runtime_types::pallet_democracy::types::Delegations< - _0, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_democracy::types::Delegations< - _0, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_democracy::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_democracy::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Voting`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Voting::<_0, _1, _2>::Direct { - votes: { - let __codec_res_edqy = ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voting::Direct::votes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delegations: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voting::Direct::delegations`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - prior: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voting::Direct::prior`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Voting::< - _0, - _1, - _2, - >::Delegating { - balance: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voting::Delegating::balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - target: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voting::Delegating::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - conviction: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voting::Delegating::conviction`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delegations: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Voting::Delegating::delegations`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - prior: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voting::Delegating::prior`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Voting`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Encode - for Voting<_0, _1, _2> - where - runtime_types::bounded_collections::bounded_vec::BoundedVec< - (_2, runtime_types::pallet_democracy::vote::AccountVote<_0>), - >: ::subxt::ext::codec::Encode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - (_2, runtime_types::pallet_democracy::vote::AccountVote<_0>), - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::types::Delegations< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::types::Delegations< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::types::Delegations< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::types::Delegations< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Voting::Direct { ref votes, ref delegations, ref prior } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(votes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delegations), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(prior), - ) - } - Voting::Delegating { - ref balance, - ref target, - ref conviction, - ref delegations, - ref prior, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(balance), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(target), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(conviction), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delegations), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(prior), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Voting::Direct { - ref votes, - ref delegations, - ref prior, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - votes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - delegations, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - prior, - __codec_dest_edqy, - ); - } - Voting::Delegating { - ref balance, - ref target, - ref conviction, - ref delegations, - ref prior, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - balance, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - target, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - conviction, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - delegations, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - prior, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::EncodeLike - for Voting<_0, _1, _2> - where - runtime_types::bounded_collections::bounded_vec::BoundedVec< - (_2, runtime_types::pallet_democracy::vote::AccountVote<_0>), - >: ::subxt::ext::codec::Encode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - (_2, runtime_types::pallet_democracy::vote::AccountVote<_0>), - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::types::Delegations< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::types::Delegations< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::types::Delegations< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::types::Delegations< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_democracy::vote::PriorLock< - _2, - _0, - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2>( - ::core::marker::PhantomData<(_0, _1, _2)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1, _2> ::subxt::ext::scale_decode::IntoVisitor - for Voting<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Voting<_0, _1, _2>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Direct" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Voting::Direct { - votes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes"))? - }, - delegations: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegations"))? - }, - prior: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prior"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Voting::Direct { - votes: { - let val = *vals - .get(&Some("votes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes"))? - }, - delegations: { - let val = *vals - .get(&Some("delegations")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegations".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegations"))? - }, - prior: { - let val = *vals - .get(&Some("prior")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prior".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prior"))? - }, - }) - }; - } - if value.name() == "Delegating" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Voting::Delegating { - balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - conviction: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("conviction"))? - }, - delegations: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegations"))? - }, - prior: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prior"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Voting::Delegating { - balance: { - let val = *vals - .get(&Some("balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "balance".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - conviction: { - let val = *vals - .get(&Some("conviction")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "conviction".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("conviction"))? - }, - delegations: { - let val = *vals - .get(&Some("delegations")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegations".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegations"))? - }, - prior: { - let val = *vals - .get(&Some("prior")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prior".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prior"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Direct", "Delegating"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsType - for Voting<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Direct { votes, delegations, prior } => { - ::subxt::ext::scale_encode::Variant { - name: "Direct", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("votes"), - votes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delegations"), - delegations as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prior"), - prior as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Delegating { - balance, - target, - conviction, - delegations, - prior, - } => { - ::subxt::ext::scale_encode::Variant { - name: "Delegating", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("conviction"), - conviction as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delegations"), - delegations as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prior"), - prior as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - > ::core::fmt::Debug for Voting<_0, _1, _2> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Voting::Direct { - votes: __self_0, - delegations: __self_1, - prior: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Direct", - "votes", - __self_0, - "delegations", - __self_1, - "prior", - &__self_2, - ) - } - Voting::Delegating { - balance: __self_0, - target: __self_1, - conviction: __self_2, - delegations: __self_3, - prior: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "Delegating", - "balance", - __self_0, - "target", - __self_1, - "conviction", - __self_2, - "delegations", - __self_3, - "prior", - &__self_4, - ) - } - } - } - } - } - pub mod vote_threshold { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum VoteThreshold { - #[codec(index = 0)] - SuperMajorityApprove, - #[codec(index = 1)] - SuperMajorityAgainst, - #[codec(index = 2)] - SimpleMajority, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VoteThreshold { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `VoteThreshold`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - VoteThreshold::SuperMajorityApprove, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - VoteThreshold::SuperMajorityAgainst, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(VoteThreshold::SimpleMajority) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `VoteThreshold`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VoteThreshold { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - VoteThreshold::SuperMajorityApprove => 0_usize, - VoteThreshold::SuperMajorityAgainst => 0_usize, - VoteThreshold::SimpleMajority => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - VoteThreshold::SuperMajorityApprove => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - VoteThreshold::SuperMajorityAgainst => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - VoteThreshold::SimpleMajority => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VoteThreshold {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for VoteThreshold { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VoteThreshold; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "SuperMajorityApprove" { - return Ok(VoteThreshold::SuperMajorityApprove); - } - if value.name() == "SuperMajorityAgainst" { - return Ok(VoteThreshold::SuperMajorityAgainst); - } - if value.name() == "SimpleMajority" { - return Ok(VoteThreshold::SimpleMajority); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "SuperMajorityApprove", - "SuperMajorityAgainst", - "SimpleMajority", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for VoteThreshold { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::SuperMajorityApprove => { - ::subxt::ext::scale_encode::Variant { - name: "SuperMajorityApprove", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SuperMajorityAgainst => { - ::subxt::ext::scale_encode::Variant { - name: "SuperMajorityAgainst", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SimpleMajority => { - ::subxt::ext::scale_encode::Variant { - name: "SimpleMajority", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VoteThreshold { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - VoteThreshold::SuperMajorityApprove => { - "SuperMajorityApprove" - } - VoteThreshold::SuperMajorityAgainst => { - "SuperMajorityAgainst" - } - VoteThreshold::SimpleMajority => "SimpleMajority", - }, - ) - } - } - } - } - pub mod pallet_election_provider_multi_phase { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - 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)] - set_minimum_untrusted_score { - maybe_next_score: ::core::option::Option< - runtime_types::sp_npos_elections::ElectionScore, - >, - }, - #[codec(index = 2)] - set_emergency_election_result { - supports: ::std::vec::Vec< - ( - ::subxt::utils::AccountId32, - runtime_types::sp_npos_elections::Support< - ::subxt::utils::AccountId32, - >, - ), - >, - }, - #[codec(index = 3)] - submit { - raw_solution: ::std::boxed::Box< - runtime_types::pallet_election_provider_multi_phase::RawSolution< - runtime_types::polkadot_runtime::NposCompactSolution16, - >, - >, - }, - #[codec(index = 4)] - governance_fallback { - maybe_max_voters: ::core::option::Option< - ::core::primitive::u32, - >, - maybe_max_targets: ::core::option::Option< - ::core::primitive::u32, - >, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::submit_unsigned { - raw_solution: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::pallet_election_provider_multi_phase::RawSolution< - runtime_types::polkadot_runtime::NposCompactSolution16, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::submit_unsigned::raw_solution`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - witness: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::submit_unsigned::witness`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_minimum_untrusted_score { - maybe_next_score: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::sp_npos_elections::ElectionScore, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_minimum_untrusted_score::maybe_next_score`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_emergency_election_result { - supports: { - let __codec_res_edqy = <::std::vec::Vec< - ( - ::subxt::utils::AccountId32, - runtime_types::sp_npos_elections::Support< - ::subxt::utils::AccountId32, - >, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_emergency_election_result::supports`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::submit { - raw_solution: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::pallet_election_provider_multi_phase::RawSolution< - runtime_types::polkadot_runtime::NposCompactSolution16, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::submit::raw_solution`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::governance_fallback { - maybe_max_voters: { - let __codec_res_edqy = <::core::option::Option< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::governance_fallback::maybe_max_voters`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_max_targets: { - let __codec_res_edqy = <::core::option::Option< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::governance_fallback::maybe_max_targets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::submit_unsigned { ref raw_solution, ref witness } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(raw_solution), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(witness), - ) - } - Call::set_minimum_untrusted_score { - ref maybe_next_score, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maybe_next_score), - ) - } - Call::set_emergency_election_result { ref supports } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(supports), - ) - } - Call::submit { ref raw_solution } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(raw_solution), - ) - } - Call::governance_fallback { - ref maybe_max_voters, - ref maybe_max_targets, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maybe_max_voters), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maybe_max_targets), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::submit_unsigned { ref raw_solution, ref witness } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - raw_solution, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - witness, - __codec_dest_edqy, - ); - } - Call::set_minimum_untrusted_score { - ref maybe_next_score, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - maybe_next_score, - __codec_dest_edqy, - ); - } - Call::set_emergency_election_result { ref supports } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - supports, - __codec_dest_edqy, - ); - } - Call::submit { ref raw_solution } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - raw_solution, - __codec_dest_edqy, - ); - } - Call::governance_fallback { - ref maybe_max_voters, - ref maybe_max_targets, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - maybe_max_voters, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - maybe_max_targets, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "submit_unsigned" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::submit_unsigned { - raw_solution: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("raw_solution"))? - }, - witness: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("witness"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::submit_unsigned { - raw_solution: { - let val = *vals - .get(&Some("raw_solution")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "raw_solution".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("raw_solution"))? - }, - witness: { - let val = *vals - .get(&Some("witness")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "witness".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("witness"))? - }, - }) - }; - } - if value.name() == "set_minimum_untrusted_score" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_minimum_untrusted_score { - maybe_next_score: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_next_score"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_minimum_untrusted_score { - maybe_next_score: { - let val = *vals - .get(&Some("maybe_next_score")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_next_score".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_next_score"))? - }, - }) - }; - } - if value.name() == "set_emergency_election_result" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_emergency_election_result { - supports: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("supports"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_emergency_election_result { - supports: { - let val = *vals - .get(&Some("supports")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "supports".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("supports"))? - }, - }) - }; - } - if value.name() == "submit" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::submit { - raw_solution: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("raw_solution"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::submit { - raw_solution: { - let val = *vals - .get(&Some("raw_solution")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "raw_solution".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("raw_solution"))? - }, - }) - }; - } - if value.name() == "governance_fallback" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::governance_fallback { - maybe_max_voters: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_max_voters"))? - }, - maybe_max_targets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_max_targets"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::governance_fallback { - maybe_max_voters: { - let val = *vals - .get(&Some("maybe_max_voters")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_max_voters".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_max_voters"))? - }, - maybe_max_targets: { - let val = *vals - .get(&Some("maybe_max_targets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_max_targets".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_max_targets"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "submit_unsigned", - "set_minimum_untrusted_score", - "set_emergency_election_result", - "submit", - "governance_fallback", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::submit_unsigned { raw_solution, witness } => { - ::subxt::ext::scale_encode::Variant { - name: "submit_unsigned", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("raw_solution"), - raw_solution - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("witness"), - witness as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_minimum_untrusted_score { maybe_next_score } => { - ::subxt::ext::scale_encode::Variant { - name: "set_minimum_untrusted_score", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("maybe_next_score"), - maybe_next_score - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_emergency_election_result { supports } => { - ::subxt::ext::scale_encode::Variant { - name: "set_emergency_election_result", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("supports"), - supports as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::submit { raw_solution } => { - ::subxt::ext::scale_encode::Variant { - name: "submit", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("raw_solution"), - raw_solution - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::governance_fallback { - maybe_max_voters, - maybe_max_targets, - } => { - ::subxt::ext::scale_encode::Variant { - name: "governance_fallback", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("maybe_max_voters"), - maybe_max_voters - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_max_targets"), - maybe_max_targets - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::submit_unsigned { - raw_solution: __self_0, - witness: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "submit_unsigned", - "raw_solution", - __self_0, - "witness", - &__self_1, - ) - } - Call::set_minimum_untrusted_score { - maybe_next_score: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_minimum_untrusted_score", - "maybe_next_score", - &__self_0, - ) - } - Call::set_emergency_election_result { - supports: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_emergency_election_result", - "supports", - &__self_0, - ) - } - Call::submit { raw_solution: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "submit", - "raw_solution", - &__self_0, - ) - } - Call::governance_fallback { - maybe_max_voters: __self_0, - maybe_max_targets: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "governance_fallback", - "maybe_max_voters", - __self_0, - "maybe_max_targets", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - PreDispatchEarlySubmission, - #[codec(index = 1)] - PreDispatchWrongWinnerCount, - #[codec(index = 2)] - PreDispatchWeakSubmission, - #[codec(index = 3)] - SignedQueueFull, - #[codec(index = 4)] - SignedCannotPayDeposit, - #[codec(index = 5)] - SignedInvalidWitness, - #[codec(index = 6)] - SignedTooMuchWeight, - #[codec(index = 7)] - OcwCallWrongEra, - #[codec(index = 8)] - MissingSnapshotMetadata, - #[codec(index = 9)] - InvalidSubmissionIndex, - #[codec(index = 10)] - CallNotAllowed, - #[codec(index = 11)] - FallbackFailed, - #[codec(index = 12)] - BoundNotMet, - #[codec(index = 13)] - TooManyWinners, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::PreDispatchEarlySubmission, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::PreDispatchWrongWinnerCount, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::PreDispatchWeakSubmission) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::SignedQueueFull) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::SignedCannotPayDeposit) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::SignedInvalidWitness) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::SignedTooMuchWeight) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::OcwCallWrongEra) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MissingSnapshotMetadata) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidSubmissionIndex) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CallNotAllowed) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::FallbackFailed) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::BoundNotMet) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyWinners) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::PreDispatchEarlySubmission => 0_usize, - Error::PreDispatchWrongWinnerCount => 0_usize, - Error::PreDispatchWeakSubmission => 0_usize, - Error::SignedQueueFull => 0_usize, - Error::SignedCannotPayDeposit => 0_usize, - Error::SignedInvalidWitness => 0_usize, - Error::SignedTooMuchWeight => 0_usize, - Error::OcwCallWrongEra => 0_usize, - Error::MissingSnapshotMetadata => 0_usize, - Error::InvalidSubmissionIndex => 0_usize, - Error::CallNotAllowed => 0_usize, - Error::FallbackFailed => 0_usize, - Error::BoundNotMet => 0_usize, - Error::TooManyWinners => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::PreDispatchEarlySubmission => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::PreDispatchWrongWinnerCount => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::PreDispatchWeakSubmission => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::SignedQueueFull => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::SignedCannotPayDeposit => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::SignedInvalidWitness => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::SignedTooMuchWeight => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::OcwCallWrongEra => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::MissingSnapshotMetadata => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::InvalidSubmissionIndex => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::CallNotAllowed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Error::FallbackFailed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - Error::BoundNotMet => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - Error::TooManyWinners => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "PreDispatchEarlySubmission" { - return Ok(Error::PreDispatchEarlySubmission); - } - if value.name() == "PreDispatchWrongWinnerCount" { - return Ok(Error::PreDispatchWrongWinnerCount); - } - if value.name() == "PreDispatchWeakSubmission" { - return Ok(Error::PreDispatchWeakSubmission); - } - if value.name() == "SignedQueueFull" { - return Ok(Error::SignedQueueFull); - } - if value.name() == "SignedCannotPayDeposit" { - return Ok(Error::SignedCannotPayDeposit); - } - if value.name() == "SignedInvalidWitness" { - return Ok(Error::SignedInvalidWitness); - } - if value.name() == "SignedTooMuchWeight" { - return Ok(Error::SignedTooMuchWeight); - } - if value.name() == "OcwCallWrongEra" { - return Ok(Error::OcwCallWrongEra); - } - if value.name() == "MissingSnapshotMetadata" { - return Ok(Error::MissingSnapshotMetadata); - } - if value.name() == "InvalidSubmissionIndex" { - return Ok(Error::InvalidSubmissionIndex); - } - if value.name() == "CallNotAllowed" { - return Ok(Error::CallNotAllowed); - } - if value.name() == "FallbackFailed" { - return Ok(Error::FallbackFailed); - } - if value.name() == "BoundNotMet" { - return Ok(Error::BoundNotMet); - } - if value.name() == "TooManyWinners" { - return Ok(Error::TooManyWinners); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "PreDispatchEarlySubmission", - "PreDispatchWrongWinnerCount", - "PreDispatchWeakSubmission", - "SignedQueueFull", - "SignedCannotPayDeposit", - "SignedInvalidWitness", - "SignedTooMuchWeight", - "OcwCallWrongEra", - "MissingSnapshotMetadata", - "InvalidSubmissionIndex", - "CallNotAllowed", - "FallbackFailed", - "BoundNotMet", - "TooManyWinners", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::PreDispatchEarlySubmission => { - ::subxt::ext::scale_encode::Variant { - name: "PreDispatchEarlySubmission", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PreDispatchWrongWinnerCount => { - ::subxt::ext::scale_encode::Variant { - name: "PreDispatchWrongWinnerCount", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PreDispatchWeakSubmission => { - ::subxt::ext::scale_encode::Variant { - name: "PreDispatchWeakSubmission", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SignedQueueFull => { - ::subxt::ext::scale_encode::Variant { - name: "SignedQueueFull", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SignedCannotPayDeposit => { - ::subxt::ext::scale_encode::Variant { - name: "SignedCannotPayDeposit", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SignedInvalidWitness => { - ::subxt::ext::scale_encode::Variant { - name: "SignedInvalidWitness", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SignedTooMuchWeight => { - ::subxt::ext::scale_encode::Variant { - name: "SignedTooMuchWeight", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OcwCallWrongEra => { - ::subxt::ext::scale_encode::Variant { - name: "OcwCallWrongEra", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MissingSnapshotMetadata => { - ::subxt::ext::scale_encode::Variant { - name: "MissingSnapshotMetadata", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidSubmissionIndex => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidSubmissionIndex", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CallNotAllowed => { - ::subxt::ext::scale_encode::Variant { - name: "CallNotAllowed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FallbackFailed => { - ::subxt::ext::scale_encode::Variant { - name: "FallbackFailed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BoundNotMet => { - ::subxt::ext::scale_encode::Variant { - name: "BoundNotMet", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyWinners => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyWinners", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::PreDispatchEarlySubmission => { - "PreDispatchEarlySubmission" - } - Error::PreDispatchWrongWinnerCount => { - "PreDispatchWrongWinnerCount" - } - Error::PreDispatchWeakSubmission => { - "PreDispatchWeakSubmission" - } - Error::SignedQueueFull => "SignedQueueFull", - Error::SignedCannotPayDeposit => "SignedCannotPayDeposit", - Error::SignedInvalidWitness => "SignedInvalidWitness", - Error::SignedTooMuchWeight => "SignedTooMuchWeight", - Error::OcwCallWrongEra => "OcwCallWrongEra", - Error::MissingSnapshotMetadata => "MissingSnapshotMetadata", - Error::InvalidSubmissionIndex => "InvalidSubmissionIndex", - Error::CallNotAllowed => "CallNotAllowed", - Error::FallbackFailed => "FallbackFailed", - Error::BoundNotMet => "BoundNotMet", - Error::TooManyWinners => "TooManyWinners", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - 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)] - ElectionFinalized { - compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, - score: runtime_types::sp_npos_elections::ElectionScore, - }, - #[codec(index = 2)] - ElectionFailed, - #[codec(index = 3)] - Rewarded { - account: ::subxt::utils::AccountId32, - value: ::core::primitive::u128, - }, - #[codec(index = 4)] - Slashed { - account: ::subxt::utils::AccountId32, - value: ::core::primitive::u128, - }, - #[codec(index = 5)] - 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, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::SolutionStored { - compute: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::SolutionStored::compute`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - origin: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::SolutionStored::origin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - prev_ejected: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::SolutionStored::prev_ejected`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ElectionFinalized { - compute: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::ElectionFinalized::compute`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - score: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::ElectionFinalized::score`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ElectionFailed) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Rewarded { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Rewarded::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Rewarded::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Slashed { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Slashed::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Slashed::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::PhaseTransitioned { - from: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PhaseTransitioned::from`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - to: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PhaseTransitioned::to`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - round: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::PhaseTransitioned::round`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::SolutionStored { - ref compute, - ref origin, - ref prev_ejected, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(compute), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(prev_ejected), - ) - } - Event::ElectionFinalized { ref compute, ref score } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(compute), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(score), - ) - } - Event::ElectionFailed => 0_usize, - Event::Rewarded { ref account, ref value } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(value), - ) - } - Event::Slashed { ref account, ref value } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(value), - ) - } - Event::PhaseTransitioned { ref from, ref to, ref round } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(from), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(to)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(round), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::SolutionStored { - ref compute, - ref origin, - ref prev_ejected, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - compute, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - prev_ejected, - __codec_dest_edqy, - ); - } - Event::ElectionFinalized { ref compute, ref score } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - compute, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - score, - __codec_dest_edqy, - ); - } - Event::ElectionFailed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Event::Rewarded { ref account, ref value } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - value, - __codec_dest_edqy, - ); - } - Event::Slashed { ref account, ref value } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - value, - __codec_dest_edqy, - ); - } - Event::PhaseTransitioned { - ref from, - ref to, - ref round, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - from, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - to, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - round, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "SolutionStored" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::SolutionStored { - compute: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("compute"))? - }, - origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - prev_ejected: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("prev_ejected"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::SolutionStored { - compute: { - let val = *vals - .get(&Some("compute")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "compute".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("compute"))? - }, - origin: { - let val = *vals - .get(&Some("origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "origin".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - prev_ejected: { - let val = *vals - .get(&Some("prev_ejected")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prev_ejected".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("prev_ejected"))? - }, - }) - }; - } - if value.name() == "ElectionFinalized" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::ElectionFinalized { - compute: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("compute"))? - }, - score: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("score"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::ElectionFinalized { - compute: { - let val = *vals - .get(&Some("compute")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "compute".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("compute"))? - }, - score: { - let val = *vals - .get(&Some("score")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "score".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("score"))? - }, - }) - }; - } - if value.name() == "ElectionFailed" { - return Ok(Event::ElectionFailed); - } - if value.name() == "Rewarded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Rewarded { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Rewarded { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - }; - } - if value.name() == "Slashed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Slashed { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Slashed { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - }; - } - if value.name() == "PhaseTransitioned" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::PhaseTransitioned { - from: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - to: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - round: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("round"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::PhaseTransitioned { - from: { - let val = *vals - .get(&Some("from")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "from".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - to: { - let val = *vals - .get(&Some("to")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "to".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("to"))? - }, - round: { - let val = *vals - .get(&Some("round")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "round".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("round"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "SolutionStored", - "ElectionFinalized", - "ElectionFailed", - "Rewarded", - "Slashed", - "PhaseTransitioned", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::SolutionStored { compute, origin, prev_ejected } => { - ::subxt::ext::scale_encode::Variant { - name: "SolutionStored", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("compute"), - compute as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prev_ejected"), - prev_ejected - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ElectionFinalized { compute, score } => { - ::subxt::ext::scale_encode::Variant { - name: "ElectionFinalized", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("compute"), - compute as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("score"), - score as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ElectionFailed => { - ::subxt::ext::scale_encode::Variant { - name: "ElectionFailed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Rewarded { account, value } => { - ::subxt::ext::scale_encode::Variant { - name: "Rewarded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Slashed { account, value } => { - ::subxt::ext::scale_encode::Variant { - name: "Slashed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PhaseTransitioned { from, to, round } => { - ::subxt::ext::scale_encode::Variant { - name: "PhaseTransitioned", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("from"), - from as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("to"), - to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("round"), - round as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::SolutionStored { - compute: __self_0, - origin: __self_1, - prev_ejected: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SolutionStored", - "compute", - __self_0, - "origin", - __self_1, - "prev_ejected", - &__self_2, - ) - } - Event::ElectionFinalized { - compute: __self_0, - score: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ElectionFinalized", - "compute", - __self_0, - "score", - &__self_1, - ) - } - Event::ElectionFailed => { - ::core::fmt::Formatter::write_str(f, "ElectionFailed") - } - Event::Rewarded { account: __self_0, value: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Rewarded", - "account", - __self_0, - "value", - &__self_1, - ) - } - Event::Slashed { account: __self_0, value: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Slashed", - "account", - __self_0, - "value", - &__self_1, - ) - } - Event::PhaseTransitioned { - from: __self_0, - to: __self_1, - round: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "PhaseTransitioned", - "from", - __self_0, - "to", - __self_1, - "round", - &__self_2, - ) - } - } - } - } - } - pub mod signed { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SignedSubmission<_0, _1, _2> { - pub who: _0, - pub deposit: _1, - pub raw_solution: runtime_types::pallet_election_provider_multi_phase::RawSolution< - _2, - >, - pub call_fee: _1, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Decode - for SignedSubmission<_0, _1, _2> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - runtime_types::pallet_election_provider_multi_phase::RawSolution< - _2, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_election_provider_multi_phase::RawSolution< - _2, - >: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SignedSubmission::<_0, _1, _2> { - who: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SignedSubmission::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SignedSubmission::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - raw_solution: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SignedSubmission::raw_solution`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_fee: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SignedSubmission::call_fee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Encode - for SignedSubmission<_0, _1, _2> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - runtime_types::pallet_election_provider_multi_phase::RawSolution< - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_election_provider_multi_phase::RawSolution< - _2, - >: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deposit), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.raw_solution), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call_fee), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.raw_solution, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call_fee, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::EncodeLike - for SignedSubmission<_0, _1, _2> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - runtime_types::pallet_election_provider_multi_phase::RawSolution< - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_election_provider_multi_phase::RawSolution< - _2, - >: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2>( - ::core::marker::PhantomData<(_0, _1, _2)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1, _2> ::subxt::ext::scale_decode::IntoVisitor - for SignedSubmission<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SignedSubmission<_0, _1, _2>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SignedSubmission { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - raw_solution: { - let val = *vals - .get(&Some("raw_solution")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "raw_solution".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("raw_solution"))? - }, - call_fee: { - let val = *vals - .get(&Some("call_fee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_fee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_fee"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(SignedSubmission { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - raw_solution: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("raw_solution"))? - }, - call_fee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_fee"))? - }, - }) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::DecodeAsFields - for SignedSubmission<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsType - for SignedSubmission<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SignedSubmission { - who, - deposit, - raw_solution, - call_fee, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("raw_solution"), - raw_solution - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_fee"), - call_fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsFields - for SignedSubmission<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SignedSubmission { - who, - deposit, - raw_solution, - call_fee, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("raw_solution"), - raw_solution - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_fee"), - call_fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - > ::core::fmt::Debug for SignedSubmission<_0, _1, _2> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "SignedSubmission", - "who", - &self.who, - "deposit", - &self.deposit, - "raw_solution", - &self.raw_solution, - "call_fee", - &&self.call_fee, - ) - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ElectionCompute { - #[codec(index = 0)] - OnChain, - #[codec(index = 1)] - Signed, - #[codec(index = 2)] - Unsigned, - #[codec(index = 3)] - Fallback, - #[codec(index = 4)] - Emergency, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ElectionCompute { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `ElectionCompute`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ElectionCompute::OnChain) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ElectionCompute::Signed) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ElectionCompute::Unsigned) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ElectionCompute::Fallback) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ElectionCompute::Emergency) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `ElectionCompute`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ElectionCompute { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - ElectionCompute::OnChain => 0_usize, - ElectionCompute::Signed => 0_usize, - ElectionCompute::Unsigned => 0_usize, - ElectionCompute::Fallback => 0_usize, - ElectionCompute::Emergency => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - ElectionCompute::OnChain => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - ElectionCompute::Signed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - ElectionCompute::Unsigned => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - ElectionCompute::Fallback => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - ElectionCompute::Emergency => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ElectionCompute {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ElectionCompute { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ElectionCompute; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "OnChain" { - return Ok(ElectionCompute::OnChain); - } - if value.name() == "Signed" { - return Ok(ElectionCompute::Signed); - } - if value.name() == "Unsigned" { - return Ok(ElectionCompute::Unsigned); - } - if value.name() == "Fallback" { - return Ok(ElectionCompute::Fallback); - } - if value.name() == "Emergency" { - return Ok(ElectionCompute::Emergency); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "OnChain", - "Signed", - "Unsigned", - "Fallback", - "Emergency", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ElectionCompute { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::OnChain => { - ::subxt::ext::scale_encode::Variant { - name: "OnChain", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Signed => { - ::subxt::ext::scale_encode::Variant { - name: "Signed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unsigned => { - ::subxt::ext::scale_encode::Variant { - name: "Unsigned", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Fallback => { - ::subxt::ext::scale_encode::Variant { - name: "Fallback", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Emergency => { - ::subxt::ext::scale_encode::Variant { - name: "Emergency", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ElectionCompute { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - ElectionCompute::OnChain => "OnChain", - ElectionCompute::Signed => "Signed", - ElectionCompute::Unsigned => "Unsigned", - ElectionCompute::Fallback => "Fallback", - ElectionCompute::Emergency => "Emergency", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Phase<_0> { - #[codec(index = 0)] - Off, - #[codec(index = 1)] - Signed, - #[codec(index = 2)] - Unsigned((::core::primitive::bool, _0)), - #[codec(index = 3)] - Emergency, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for Phase<_0> - where - _0: ::subxt::ext::codec::Decode, - (::core::primitive::bool, _0): ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Phase`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Phase::<_0>::Off) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Phase::<_0>::Signed) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Phase::< - _0, - >::Unsigned({ - let __codec_res_edqy = <( - ::core::primitive::bool, - _0, - ) as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Phase::Unsigned.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Phase::<_0>::Emergency) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Phase`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for Phase<_0> - where - _0: ::subxt::ext::codec::Encode, - (::core::primitive::bool, _0): ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Phase::Off => 0_usize, - Phase::Signed => 0_usize, - Phase::Unsigned(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Phase::Emergency => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Phase::Off => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Phase::Signed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Phase::Unsigned(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Phase::Emergency => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for Phase<_0> - where - _0: ::subxt::ext::codec::Encode, - (::core::primitive::bool, _0): ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor for Phase<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Phase<_0>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Off" { - return Ok(Phase::Off); - } - if value.name() == "Signed" { - return Ok(Phase::Signed); - } - if value.name() == "Unsigned" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Phase::Unsigned({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Emergency" { - return Ok(Phase::Emergency); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Off", - "Signed", - "Unsigned", - "Emergency", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for Phase<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Off => { - ::subxt::ext::scale_encode::Variant { - name: "Off", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Signed => { - ::subxt::ext::scale_encode::Variant { - name: "Signed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unsigned(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Unsigned", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Emergency => { - ::subxt::ext::scale_encode::Variant { - name: "Emergency", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for Phase<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Phase::Off => ::core::fmt::Formatter::write_str(f, "Off"), - Phase::Signed => { - ::core::fmt::Formatter::write_str(f, "Signed") - } - Phase::Unsigned(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Unsigned", - &__self_0, - ) - } - Phase::Emergency => { - ::core::fmt::Formatter::write_str(f, "Emergency") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RawSolution<_0> { - pub solution: _0, - pub score: runtime_types::sp_npos_elections::ElectionScore, - pub round: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for RawSolution<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(RawSolution::<_0> { - solution: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RawSolution::solution`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - score: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RawSolution::score`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - round: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RawSolution::round`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for RawSolution<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.solution), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.score), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.round), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.solution, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.score, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.round, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for RawSolution<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor for RawSolution<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RawSolution<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RawSolution { - solution: { - let val = *vals - .get(&Some("solution")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "solution".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("solution"))? - }, - score: { - let val = *vals - .get(&Some("score")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "score".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("score"))? - }, - round: { - let val = *vals - .get(&Some("round")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "round".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("round"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(RawSolution { - solution: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("solution"))? - }, - score: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("score"))? - }, - round: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("round"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for RawSolution<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for RawSolution<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RawSolution { solution, score, round } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("solution"), - solution as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("score"), - score as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("round"), - round as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields for RawSolution<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RawSolution { solution, score, round } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("solution"), - solution as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("score"), - score as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("round"), - round as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for RawSolution<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "RawSolution", - "solution", - &self.solution, - "score", - &self.score, - "round", - &&self.round, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReadySolution { - pub supports: runtime_types::bounded_collections::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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ReadySolution { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ReadySolution { - supports: { - let __codec_res_edqy = , - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReadySolution::supports`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - score: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReadySolution::score`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - compute: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReadySolution::compute`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ReadySolution { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.supports), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.score), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.compute), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.supports, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.score, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.compute, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ReadySolution {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ReadySolution { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReadySolution; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ReadySolution { - supports: { - let val = *vals - .get(&Some("supports")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "supports".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("supports"))? - }, - score: { - let val = *vals - .get(&Some("score")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "score".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("score"))? - }, - compute: { - let val = *vals - .get(&Some("compute")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "compute".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("compute"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(ReadySolution { - supports: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("supports"))? - }, - score: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("score"))? - }, - compute: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("compute"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ReadySolution { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ReadySolution { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReadySolution { supports, score, compute } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("supports"), - supports as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("score"), - score as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("compute"), - compute as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ReadySolution { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReadySolution { supports, score, compute } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("supports"), - supports as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("score"), - score as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("compute"), - compute as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ReadySolution { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ReadySolution", - "supports", - &self.supports, - "score", - &self.score, - "compute", - &&self.compute, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RoundSnapshot<_0, _1> { - pub voters: ::std::vec::Vec<_1>, - pub targets: ::std::vec::Vec<_0>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for RoundSnapshot<_0, _1> - where - ::std::vec::Vec<_1>: ::subxt::ext::codec::Decode, - ::std::vec::Vec<_1>: ::subxt::ext::codec::Decode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Decode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(RoundSnapshot::<_0, _1> { - voters: { - let __codec_res_edqy = <::std::vec::Vec< - _1, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RoundSnapshot::voters`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - targets: { - let __codec_res_edqy = <::std::vec::Vec< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RoundSnapshot::targets`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for RoundSnapshot<_0, _1> - where - ::std::vec::Vec<_1>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_1>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.voters), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.targets), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.voters, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.targets, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for RoundSnapshot<_0, _1> - where - ::std::vec::Vec<_1>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_1>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for RoundSnapshot<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RoundSnapshot<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RoundSnapshot { - voters: { - let val = *vals - .get(&Some("voters")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "voters".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("voters"))? - }, - targets: { - let val = *vals - .get(&Some("targets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "targets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("targets"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(RoundSnapshot { - voters: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("voters"))? - }, - targets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("targets"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for RoundSnapshot<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for RoundSnapshot<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RoundSnapshot { voters, targets } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("voters"), - voters as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("targets"), - targets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for RoundSnapshot<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RoundSnapshot { voters, targets } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("voters"), - voters as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("targets"), - targets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for RoundSnapshot<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "RoundSnapshot", - "voters", - &self.voters, - "targets", - &&self.targets, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SolutionOrSnapshotSize { - #[codec(compact)] - pub voters: ::core::primitive::u32, - #[codec(compact)] - pub targets: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SolutionOrSnapshotSize { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(SolutionOrSnapshotSize { - voters: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SolutionOrSnapshotSize::voters`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - targets: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `SolutionOrSnapshotSize::targets`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SolutionOrSnapshotSize { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.voters), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.targets), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.voters), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.targets), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SolutionOrSnapshotSize {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SolutionOrSnapshotSize { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SolutionOrSnapshotSize; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SolutionOrSnapshotSize { - voters: { - let val = *vals - .get(&Some("voters")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "voters".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("voters"))? - }, - targets: { - let val = *vals - .get(&Some("targets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "targets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("targets"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SolutionOrSnapshotSize { - voters: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("voters"))? - }, - targets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("targets"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SolutionOrSnapshotSize { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SolutionOrSnapshotSize { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SolutionOrSnapshotSize { voters, targets } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("voters"), - voters as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("targets"), - targets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SolutionOrSnapshotSize { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SolutionOrSnapshotSize { voters, targets } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("voters"), - voters as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("targets"), - targets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SolutionOrSnapshotSize { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SolutionOrSnapshotSize", - "voters", - &self.voters, - "targets", - &&self.targets, - ) - } - } - } - pub mod pallet_elections_phragmen { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - vote { - votes: ::std::vec::Vec<::subxt::utils::AccountId32>, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 1)] - remove_voter, - #[codec(index = 2)] - submit_candidacy { - #[codec(compact)] - candidate_count: ::core::primitive::u32, - }, - #[codec(index = 3)] - renounce_candidacy { - renouncing: runtime_types::pallet_elections_phragmen::Renouncing, - }, - #[codec(index = 4)] - remove_member { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - slash_bond: ::core::primitive::bool, - rerun_election: ::core::primitive::bool, - }, - #[codec(index = 5)] - clean_defunct_voters { - num_voters: ::core::primitive::u32, - num_defunct: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::vote { - votes: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::vote::votes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::vote::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::remove_voter) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::submit_candidacy { - candidate_count: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::submit_candidacy::candidate_count`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::renounce_candidacy { - renouncing: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::renounce_candidacy::renouncing`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::remove_member { - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::remove_member::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - slash_bond: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::remove_member::slash_bond`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - rerun_election: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::remove_member::rerun_election`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::clean_defunct_voters { - num_voters: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::clean_defunct_voters::num_voters`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - num_defunct: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::clean_defunct_voters::num_defunct`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::vote { ref votes, ref value } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(votes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - ), - ) - } - Call::remove_voter => 0_usize, - Call::submit_candidacy { ref candidate_count } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(candidate_count), - ), - ) - } - Call::renounce_candidacy { ref renouncing } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(renouncing), - ) - } - Call::remove_member { - ref who, - ref slash_bond, - ref rerun_election, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(slash_bond), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(rerun_election), - ) - } - Call::clean_defunct_voters { - ref num_voters, - ref num_defunct, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(num_voters), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(num_defunct), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::vote { ref votes, ref value } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - votes, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - __codec_dest_edqy, - ); - } - } - Call::remove_voter => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Call::submit_candidacy { ref candidate_count } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(candidate_count), - __codec_dest_edqy, - ); - } - } - Call::renounce_candidacy { ref renouncing } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - renouncing, - __codec_dest_edqy, - ); - } - Call::remove_member { - ref who, - ref slash_bond, - ref rerun_election, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - slash_bond, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - rerun_election, - __codec_dest_edqy, - ); - } - Call::clean_defunct_voters { - ref num_voters, - ref num_defunct, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - num_voters, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - num_defunct, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "vote" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::vote { - votes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::vote { - votes: { - let val = *vals - .get(&Some("votes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - }; - } - if value.name() == "remove_voter" { - return Ok(Call::remove_voter); - } - if value.name() == "submit_candidacy" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::submit_candidacy { - candidate_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("candidate_count"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::submit_candidacy { - candidate_count: { - let val = *vals - .get(&Some("candidate_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "candidate_count".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("candidate_count"))? - }, - }) - }; - } - if value.name() == "renounce_candidacy" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::renounce_candidacy { - renouncing: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("renouncing"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::renounce_candidacy { - renouncing: { - let val = *vals - .get(&Some("renouncing")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "renouncing".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("renouncing"))? - }, - }) - }; - } - if value.name() == "remove_member" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::remove_member { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - slash_bond: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("slash_bond"))? - }, - rerun_election: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("rerun_election"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::remove_member { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - slash_bond: { - let val = *vals - .get(&Some("slash_bond")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "slash_bond".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("slash_bond"))? - }, - rerun_election: { - let val = *vals - .get(&Some("rerun_election")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "rerun_election".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("rerun_election"))? - }, - }) - }; - } - if value.name() == "clean_defunct_voters" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::clean_defunct_voters { - num_voters: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("num_voters"))? - }, - num_defunct: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("num_defunct"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::clean_defunct_voters { - num_voters: { - let val = *vals - .get(&Some("num_voters")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "num_voters".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("num_voters"))? - }, - num_defunct: { - let val = *vals - .get(&Some("num_defunct")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "num_defunct".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("num_defunct"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "vote", - "remove_voter", - "submit_candidacy", - "renounce_candidacy", - "remove_member", - "clean_defunct_voters", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::vote { votes, value } => { - ::subxt::ext::scale_encode::Variant { - name: "vote", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("votes"), - votes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::remove_voter => { - ::subxt::ext::scale_encode::Variant { - name: "remove_voter", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::submit_candidacy { candidate_count } => { - ::subxt::ext::scale_encode::Variant { - name: "submit_candidacy", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("candidate_count"), - candidate_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::renounce_candidacy { renouncing } => { - ::subxt::ext::scale_encode::Variant { - name: "renounce_candidacy", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("renouncing"), - renouncing as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::remove_member { who, slash_bond, rerun_election } => { - ::subxt::ext::scale_encode::Variant { - name: "remove_member", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slash_bond"), - slash_bond as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("rerun_election"), - rerun_election - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::clean_defunct_voters { num_voters, num_defunct } => { - ::subxt::ext::scale_encode::Variant { - name: "clean_defunct_voters", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("num_voters"), - num_voters as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("num_defunct"), - num_defunct as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::vote { votes: __self_0, value: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "vote", - "votes", - __self_0, - "value", - &__self_1, - ) - } - Call::remove_voter => { - ::core::fmt::Formatter::write_str(f, "remove_voter") - } - Call::submit_candidacy { candidate_count: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "submit_candidacy", - "candidate_count", - &__self_0, - ) - } - Call::renounce_candidacy { renouncing: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "renounce_candidacy", - "renouncing", - &__self_0, - ) - } - Call::remove_member { - who: __self_0, - slash_bond: __self_1, - rerun_election: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "remove_member", - "who", - __self_0, - "slash_bond", - __self_1, - "rerun_election", - &__self_2, - ) - } - Call::clean_defunct_voters { - num_voters: __self_0, - num_defunct: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "clean_defunct_voters", - "num_voters", - __self_0, - "num_defunct", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - UnableToVote, - #[codec(index = 1)] - NoVotes, - #[codec(index = 2)] - TooManyVotes, - #[codec(index = 3)] - MaximumVotesExceeded, - #[codec(index = 4)] - LowBalance, - #[codec(index = 5)] - UnableToPayBond, - #[codec(index = 6)] - MustBeVoter, - #[codec(index = 7)] - DuplicatedCandidate, - #[codec(index = 8)] - TooManyCandidates, - #[codec(index = 9)] - MemberSubmit, - #[codec(index = 10)] - RunnerUpSubmit, - #[codec(index = 11)] - InsufficientCandidateFunds, - #[codec(index = 12)] - NotMember, - #[codec(index = 13)] - InvalidWitnessData, - #[codec(index = 14)] - InvalidVoteCount, - #[codec(index = 15)] - InvalidRenouncing, - #[codec(index = 16)] - InvalidReplacement, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UnableToVote) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoVotes) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyVotes) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MaximumVotesExceeded) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::LowBalance) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UnableToPayBond) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MustBeVoter) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::DuplicatedCandidate) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyCandidates) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MemberSubmit) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::RunnerUpSubmit) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::InsufficientCandidateFunds, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotMember) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidWitnessData) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidVoteCount) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidRenouncing) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidReplacement) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::UnableToVote => 0_usize, - Error::NoVotes => 0_usize, - Error::TooManyVotes => 0_usize, - Error::MaximumVotesExceeded => 0_usize, - Error::LowBalance => 0_usize, - Error::UnableToPayBond => 0_usize, - Error::MustBeVoter => 0_usize, - Error::DuplicatedCandidate => 0_usize, - Error::TooManyCandidates => 0_usize, - Error::MemberSubmit => 0_usize, - Error::RunnerUpSubmit => 0_usize, - Error::InsufficientCandidateFunds => 0_usize, - Error::NotMember => 0_usize, - Error::InvalidWitnessData => 0_usize, - Error::InvalidVoteCount => 0_usize, - Error::InvalidRenouncing => 0_usize, - Error::InvalidReplacement => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::UnableToVote => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::NoVotes => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::TooManyVotes => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::MaximumVotesExceeded => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::LowBalance => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::UnableToPayBond => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::MustBeVoter => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::DuplicatedCandidate => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::TooManyCandidates => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::MemberSubmit => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::RunnerUpSubmit => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Error::InsufficientCandidateFunds => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - Error::NotMember => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - Error::InvalidWitnessData => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - } - Error::InvalidVoteCount => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - } - Error::InvalidRenouncing => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - } - Error::InvalidReplacement => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "UnableToVote" { - return Ok(Error::UnableToVote); - } - if value.name() == "NoVotes" { - return Ok(Error::NoVotes); - } - if value.name() == "TooManyVotes" { - return Ok(Error::TooManyVotes); - } - if value.name() == "MaximumVotesExceeded" { - return Ok(Error::MaximumVotesExceeded); - } - if value.name() == "LowBalance" { - return Ok(Error::LowBalance); - } - if value.name() == "UnableToPayBond" { - return Ok(Error::UnableToPayBond); - } - if value.name() == "MustBeVoter" { - return Ok(Error::MustBeVoter); - } - if value.name() == "DuplicatedCandidate" { - return Ok(Error::DuplicatedCandidate); - } - if value.name() == "TooManyCandidates" { - return Ok(Error::TooManyCandidates); - } - if value.name() == "MemberSubmit" { - return Ok(Error::MemberSubmit); - } - if value.name() == "RunnerUpSubmit" { - return Ok(Error::RunnerUpSubmit); - } - if value.name() == "InsufficientCandidateFunds" { - return Ok(Error::InsufficientCandidateFunds); - } - if value.name() == "NotMember" { - return Ok(Error::NotMember); - } - if value.name() == "InvalidWitnessData" { - return Ok(Error::InvalidWitnessData); - } - if value.name() == "InvalidVoteCount" { - return Ok(Error::InvalidVoteCount); - } - if value.name() == "InvalidRenouncing" { - return Ok(Error::InvalidRenouncing); - } - if value.name() == "InvalidReplacement" { - return Ok(Error::InvalidReplacement); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "UnableToVote", - "NoVotes", - "TooManyVotes", - "MaximumVotesExceeded", - "LowBalance", - "UnableToPayBond", - "MustBeVoter", - "DuplicatedCandidate", - "TooManyCandidates", - "MemberSubmit", - "RunnerUpSubmit", - "InsufficientCandidateFunds", - "NotMember", - "InvalidWitnessData", - "InvalidVoteCount", - "InvalidRenouncing", - "InvalidReplacement", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::UnableToVote => { - ::subxt::ext::scale_encode::Variant { - name: "UnableToVote", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoVotes => { - ::subxt::ext::scale_encode::Variant { - name: "NoVotes", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyVotes => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyVotes", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MaximumVotesExceeded => { - ::subxt::ext::scale_encode::Variant { - name: "MaximumVotesExceeded", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LowBalance => { - ::subxt::ext::scale_encode::Variant { - name: "LowBalance", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnableToPayBond => { - ::subxt::ext::scale_encode::Variant { - name: "UnableToPayBond", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MustBeVoter => { - ::subxt::ext::scale_encode::Variant { - name: "MustBeVoter", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DuplicatedCandidate => { - ::subxt::ext::scale_encode::Variant { - name: "DuplicatedCandidate", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyCandidates => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyCandidates", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MemberSubmit => { - ::subxt::ext::scale_encode::Variant { - name: "MemberSubmit", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::RunnerUpSubmit => { - ::subxt::ext::scale_encode::Variant { - name: "RunnerUpSubmit", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InsufficientCandidateFunds => { - ::subxt::ext::scale_encode::Variant { - name: "InsufficientCandidateFunds", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotMember => { - ::subxt::ext::scale_encode::Variant { - name: "NotMember", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidWitnessData => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidWitnessData", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidVoteCount => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidVoteCount", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidRenouncing => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidRenouncing", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidReplacement => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidReplacement", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::UnableToVote => "UnableToVote", - Error::NoVotes => "NoVotes", - Error::TooManyVotes => "TooManyVotes", - Error::MaximumVotesExceeded => "MaximumVotesExceeded", - Error::LowBalance => "LowBalance", - Error::UnableToPayBond => "UnableToPayBond", - Error::MustBeVoter => "MustBeVoter", - Error::DuplicatedCandidate => "DuplicatedCandidate", - Error::TooManyCandidates => "TooManyCandidates", - Error::MemberSubmit => "MemberSubmit", - Error::RunnerUpSubmit => "RunnerUpSubmit", - Error::InsufficientCandidateFunds => { - "InsufficientCandidateFunds" - } - Error::NotMember => "NotMember", - Error::InvalidWitnessData => "InvalidWitnessData", - Error::InvalidVoteCount => "InvalidVoteCount", - Error::InvalidRenouncing => "InvalidRenouncing", - Error::InvalidReplacement => "InvalidReplacement", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - NewTerm { - new_members: ::std::vec::Vec< - (::subxt::utils::AccountId32, ::core::primitive::u128), - >, - }, - #[codec(index = 1)] - EmptyTerm, - #[codec(index = 2)] - ElectionError, - #[codec(index = 3)] - MemberKicked { member: ::subxt::utils::AccountId32 }, - #[codec(index = 4)] - Renounced { candidate: ::subxt::utils::AccountId32 }, - #[codec(index = 5)] - CandidateSlashed { - candidate: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 6)] - SeatHolderSlashed { - seat_holder: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::NewTerm { - new_members: { - let __codec_res_edqy = <::std::vec::Vec< - (::subxt::utils::AccountId32, ::core::primitive::u128), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NewTerm::new_members`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::EmptyTerm) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ElectionError) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::MemberKicked { - member: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::MemberKicked::member`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Renounced { - candidate: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Renounced::candidate`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::CandidateSlashed { - candidate: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::CandidateSlashed::candidate`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::CandidateSlashed::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::SeatHolderSlashed { - seat_holder: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::SeatHolderSlashed::seat_holder`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::SeatHolderSlashed::amount`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::NewTerm { ref new_members } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(new_members), - ) - } - Event::EmptyTerm => 0_usize, - Event::ElectionError => 0_usize, - Event::MemberKicked { ref member } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(member), - ) - } - Event::Renounced { ref candidate } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(candidate), - ) - } - Event::CandidateSlashed { ref candidate, ref amount } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(candidate), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::SeatHolderSlashed { ref seat_holder, ref amount } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(seat_holder), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::NewTerm { ref new_members } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new_members, - __codec_dest_edqy, - ); - } - Event::EmptyTerm => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Event::ElectionError => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Event::MemberKicked { ref member } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - member, - __codec_dest_edqy, - ); - } - Event::Renounced { ref candidate } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - candidate, - __codec_dest_edqy, - ); - } - Event::CandidateSlashed { ref candidate, ref amount } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - candidate, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::SeatHolderSlashed { - ref seat_holder, - ref amount, - } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - seat_holder, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NewTerm" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::NewTerm { - new_members: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_members"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::NewTerm { - new_members: { - let val = *vals - .get(&Some("new_members")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_members".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_members"))? - }, - }) - }; - } - if value.name() == "EmptyTerm" { - return Ok(Event::EmptyTerm); - } - if value.name() == "ElectionError" { - return Ok(Event::ElectionError); - } - if value.name() == "MemberKicked" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::MemberKicked { - member: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::MemberKicked { - member: { - let val = *vals - .get(&Some("member")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - }) - }; - } - if value.name() == "Renounced" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Renounced { - candidate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("candidate"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Renounced { - candidate: { - let val = *vals - .get(&Some("candidate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "candidate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("candidate"))? - }, - }) - }; - } - if value.name() == "CandidateSlashed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::CandidateSlashed { - candidate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("candidate"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::CandidateSlashed { - candidate: { - let val = *vals - .get(&Some("candidate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "candidate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("candidate"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "SeatHolderSlashed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::SeatHolderSlashed { - seat_holder: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("seat_holder"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::SeatHolderSlashed { - seat_holder: { - let val = *vals - .get(&Some("seat_holder")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "seat_holder".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("seat_holder"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "NewTerm", - "EmptyTerm", - "ElectionError", - "MemberKicked", - "Renounced", - "CandidateSlashed", - "SeatHolderSlashed", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NewTerm { new_members } => { - ::subxt::ext::scale_encode::Variant { - name: "NewTerm", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new_members"), - new_members as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::EmptyTerm => { - ::subxt::ext::scale_encode::Variant { - name: "EmptyTerm", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ElectionError => { - ::subxt::ext::scale_encode::Variant { - name: "ElectionError", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MemberKicked { member } => { - ::subxt::ext::scale_encode::Variant { - name: "MemberKicked", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Renounced { candidate } => { - ::subxt::ext::scale_encode::Variant { - name: "Renounced", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("candidate"), - candidate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CandidateSlashed { candidate, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "CandidateSlashed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("candidate"), - candidate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SeatHolderSlashed { seat_holder, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "SeatHolderSlashed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("seat_holder"), - seat_holder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::NewTerm { new_members: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "NewTerm", - "new_members", - &__self_0, - ) - } - Event::EmptyTerm => { - ::core::fmt::Formatter::write_str(f, "EmptyTerm") - } - Event::ElectionError => { - ::core::fmt::Formatter::write_str(f, "ElectionError") - } - Event::MemberKicked { member: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "MemberKicked", - "member", - &__self_0, - ) - } - Event::Renounced { candidate: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Renounced", - "candidate", - &__self_0, - ) - } - Event::CandidateSlashed { - candidate: __self_0, - amount: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "CandidateSlashed", - "candidate", - __self_0, - "amount", - &__self_1, - ) - } - Event::SeatHolderSlashed { - seat_holder: __self_0, - amount: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SeatHolderSlashed", - "seat_holder", - __self_0, - "amount", - &__self_1, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Renouncing { - #[codec(index = 0)] - Member, - #[codec(index = 1)] - RunnerUp, - #[codec(index = 2)] - Candidate(#[codec(compact)] ::core::primitive::u32), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Renouncing { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Renouncing`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Renouncing::Member) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Renouncing::RunnerUp) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Renouncing::Candidate({ - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Renouncing::Candidate.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Renouncing`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Renouncing { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Renouncing::Member => 0_usize, - Renouncing::RunnerUp => 0_usize, - Renouncing::Candidate(ref aa) => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(aa), - ), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Renouncing::Member => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Renouncing::RunnerUp => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Renouncing::Candidate(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(aa), - __codec_dest_edqy, - ); - } - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Renouncing {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Renouncing { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Renouncing; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Member" { - return Ok(Renouncing::Member); - } - if value.name() == "RunnerUp" { - return Ok(Renouncing::RunnerUp); - } - if value.name() == "Candidate" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Renouncing::Candidate({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Member", - "RunnerUp", - "Candidate", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Renouncing { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Member => { - ::subxt::ext::scale_encode::Variant { - name: "Member", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::RunnerUp => { - ::subxt::ext::scale_encode::Variant { - name: "RunnerUp", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Candidate(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Candidate", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Renouncing { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Renouncing::Member => { - ::core::fmt::Formatter::write_str(f, "Member") - } - Renouncing::RunnerUp => { - ::core::fmt::Formatter::write_str(f, "RunnerUp") - } - Renouncing::Candidate(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Candidate", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SeatHolder<_0, _1> { - pub who: _0, - pub stake: _1, - pub deposit: _1, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for SeatHolder<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(SeatHolder::<_0, _1> { - who: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SeatHolder::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - stake: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SeatHolder::stake`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SeatHolder::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for SeatHolder<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.stake), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deposit), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.stake, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deposit, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike for SeatHolder<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for SeatHolder<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SeatHolder<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SeatHolder { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - stake: { - let val = *vals - .get(&Some("stake")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stake".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stake"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(SeatHolder { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - stake: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stake"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for SeatHolder<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for SeatHolder<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SeatHolder { who, stake, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("stake"), - stake as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for SeatHolder<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SeatHolder { who, stake, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("stake"), - stake as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for SeatHolder<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SeatHolder", - "who", - &self.who, - "stake", - &self.stake, - "deposit", - &&self.deposit, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Voter<_0, _1> { - pub votes: ::std::vec::Vec<_0>, - pub stake: _1, - pub deposit: _1, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for Voter<_0, _1> - where - ::std::vec::Vec<_0>: ::subxt::ext::codec::Decode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Voter::<_0, _1> { - votes: { - let __codec_res_edqy = <::std::vec::Vec< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voter::votes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - stake: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voter::stake`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Voter::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for Voter<_0, _1> - where - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.stake), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deposit), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.votes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.stake, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deposit, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike for Voter<_0, _1> - where - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for Voter<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Voter<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Voter { - votes: { - let val = *vals - .get(&Some("votes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes"))? - }, - stake: { - let val = *vals - .get(&Some("stake")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stake".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stake"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Voter { - votes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes"))? - }, - stake: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stake"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for Voter<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType for Voter<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Voter { votes, stake, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("votes"), - votes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("stake"), - stake as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields for Voter<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Voter { votes, stake, deposit } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("votes"), - votes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("stake"), - stake as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for Voter<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Voter", - "votes", - &self.votes, - "stake", - &self.stake, - "deposit", - &&self.deposit, - ) - } - } - } - pub mod pallet_fast_unstake { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - register_fast_unstake, - #[codec(index = 1)] - deregister, - #[codec(index = 2)] - control { eras_to_check: ::core::primitive::u32 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::register_fast_unstake) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::deregister) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::control { - eras_to_check: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::control::eras_to_check`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::register_fast_unstake => 0_usize, - Call::deregister => 0_usize, - Call::control { ref eras_to_check } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(eras_to_check), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::register_fast_unstake => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Call::deregister => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Call::control { ref eras_to_check } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - eras_to_check, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "register_fast_unstake" { - return Ok(Call::register_fast_unstake); - } - if value.name() == "deregister" { - return Ok(Call::deregister); - } - if value.name() == "control" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::control { - eras_to_check: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("eras_to_check"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::control { - eras_to_check: { - let val = *vals - .get(&Some("eras_to_check")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "eras_to_check".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("eras_to_check"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "register_fast_unstake", - "deregister", - "control", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::register_fast_unstake => { - ::subxt::ext::scale_encode::Variant { - name: "register_fast_unstake", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::deregister => { - ::subxt::ext::scale_encode::Variant { - name: "deregister", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::control { eras_to_check } => { - ::subxt::ext::scale_encode::Variant { - name: "control", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("eras_to_check"), - eras_to_check - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::register_fast_unstake => { - ::core::fmt::Formatter::write_str( - f, - "register_fast_unstake", - ) - } - Call::deregister => { - ::core::fmt::Formatter::write_str(f, "deregister") - } - Call::control { eras_to_check: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "control", - "eras_to_check", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - NotController, - #[codec(index = 1)] - AlreadyQueued, - #[codec(index = 2)] - NotFullyBonded, - #[codec(index = 3)] - NotQueued, - #[codec(index = 4)] - AlreadyHead, - #[codec(index = 5)] - CallNotAllowed, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotController) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyQueued) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotFullyBonded) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotQueued) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyHead) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CallNotAllowed) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::NotController => 0_usize, - Error::AlreadyQueued => 0_usize, - Error::NotFullyBonded => 0_usize, - Error::NotQueued => 0_usize, - Error::AlreadyHead => 0_usize, - Error::CallNotAllowed => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::NotController => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::AlreadyQueued => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::NotFullyBonded => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::NotQueued => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::AlreadyHead => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::CallNotAllowed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NotController" { - return Ok(Error::NotController); - } - if value.name() == "AlreadyQueued" { - return Ok(Error::AlreadyQueued); - } - if value.name() == "NotFullyBonded" { - return Ok(Error::NotFullyBonded); - } - if value.name() == "NotQueued" { - return Ok(Error::NotQueued); - } - if value.name() == "AlreadyHead" { - return Ok(Error::AlreadyHead); - } - if value.name() == "CallNotAllowed" { - return Ok(Error::CallNotAllowed); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "NotController", - "AlreadyQueued", - "NotFullyBonded", - "NotQueued", - "AlreadyHead", - "CallNotAllowed", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NotController => { - ::subxt::ext::scale_encode::Variant { - name: "NotController", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyQueued => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyQueued", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotFullyBonded => { - ::subxt::ext::scale_encode::Variant { - name: "NotFullyBonded", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotQueued => { - ::subxt::ext::scale_encode::Variant { - name: "NotQueued", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyHead => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyHead", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CallNotAllowed => { - ::subxt::ext::scale_encode::Variant { - name: "CallNotAllowed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::NotController => "NotController", - Error::AlreadyQueued => "AlreadyQueued", - Error::NotFullyBonded => "NotFullyBonded", - Error::NotQueued => "NotQueued", - Error::AlreadyHead => "AlreadyHead", - Error::CallNotAllowed => "CallNotAllowed", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - Unstaked { - stash: ::subxt::utils::AccountId32, - result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - }, - #[codec(index = 1)] - Slashed { - stash: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 2)] - InternalError, - #[codec(index = 3)] - BatchChecked { eras: ::std::vec::Vec<::core::primitive::u32> }, - #[codec(index = 4)] - BatchFinished { size: ::core::primitive::u32 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Unstaked { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Unstaked::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Unstaked::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Slashed { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Slashed::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Slashed::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::InternalError) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::BatchChecked { - eras: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BatchChecked::eras`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::BatchFinished { - size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BatchFinished::size`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::Unstaked { ref stash, ref result } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(result), - ) - } - Event::Slashed { ref stash, ref amount } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::InternalError => 0_usize, - Event::BatchChecked { ref eras } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(eras), - ) - } - Event::BatchFinished { ref size } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(size), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::Unstaked { ref stash, ref result } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - result, - __codec_dest_edqy, - ); - } - Event::Slashed { ref stash, ref amount } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::InternalError => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Event::BatchChecked { ref eras } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - eras, - __codec_dest_edqy, - ); - } - Event::BatchFinished { ref size } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - size, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Unstaked" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Unstaked { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Unstaked { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - }; - } - if value.name() == "Slashed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Slashed { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Slashed { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "InternalError" { - return Ok(Event::InternalError); - } - if value.name() == "BatchChecked" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::BatchChecked { - eras: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("eras"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::BatchChecked { - eras: { - let val = *vals - .get(&Some("eras")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "eras".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("eras"))? - }, - }) - }; - } - if value.name() == "BatchFinished" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::BatchFinished { - size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("size"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::BatchFinished { - size: { - let val = *vals - .get(&Some("size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "size".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("size"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Unstaked", - "Slashed", - "InternalError", - "BatchChecked", - "BatchFinished", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Unstaked { stash, result } => { - ::subxt::ext::scale_encode::Variant { - name: "Unstaked", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Slashed { stash, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Slashed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InternalError => { - ::subxt::ext::scale_encode::Variant { - name: "InternalError", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BatchChecked { eras } => { - ::subxt::ext::scale_encode::Variant { - name: "BatchChecked", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("eras"), - eras as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BatchFinished { size } => { - ::subxt::ext::scale_encode::Variant { - name: "BatchFinished", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("size"), - size as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::Unstaked { stash: __self_0, result: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Unstaked", - "stash", - __self_0, - "result", - &__self_1, - ) - } - Event::Slashed { stash: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Slashed", - "stash", - __self_0, - "amount", - &__self_1, - ) - } - Event::InternalError => { - ::core::fmt::Formatter::write_str(f, "InternalError") - } - Event::BatchChecked { eras: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "BatchChecked", - "eras", - &__self_0, - ) - } - Event::BatchFinished { size: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "BatchFinished", - "size", - &__self_0, - ) - } - } - } - } - } - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnstakeRequest { - pub stashes: runtime_types::bounded_collections::bounded_vec::BoundedVec< - (::subxt::utils::AccountId32, ::core::primitive::u128), - >, - pub checked: runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u32, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for UnstakeRequest { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(UnstakeRequest { - stashes: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnstakeRequest::stashes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - checked: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnstakeRequest::checked`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for UnstakeRequest { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.stashes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.checked), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.stashes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.checked, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for UnstakeRequest {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for UnstakeRequest { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UnstakeRequest; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(UnstakeRequest { - stashes: { - let val = *vals - .get(&Some("stashes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stashes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stashes"))? - }, - checked: { - let val = *vals - .get(&Some("checked")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "checked".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("checked"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(UnstakeRequest { - stashes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stashes"))? - }, - checked: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("checked"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for UnstakeRequest { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for UnstakeRequest { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnstakeRequest { stashes, checked } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stashes"), - stashes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("checked"), - checked as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for UnstakeRequest { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnstakeRequest { stashes, checked } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stashes"), - stashes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("checked"), - checked as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for UnstakeRequest { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "UnstakeRequest", - "stashes", - &self.stashes, - "checked", - &&self.checked, - ) - } - } - } - } - pub mod pallet_grandpa { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - report_equivocation { - equivocation_proof: ::std::boxed::Box< - runtime_types::sp_consensus_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - }, - #[codec(index = 1)] - report_equivocation_unsigned { - equivocation_proof: ::std::boxed::Box< - runtime_types::sp_consensus_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - }, - #[codec(index = 2)] - note_stalled { - delay: ::core::primitive::u32, - best_finalized_block_number: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::report_equivocation { - equivocation_proof: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::sp_consensus_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::report_equivocation::equivocation_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - key_owner_proof: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::report_equivocation::key_owner_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::report_equivocation_unsigned { - equivocation_proof: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::sp_consensus_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::report_equivocation_unsigned::equivocation_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - key_owner_proof: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::report_equivocation_unsigned::key_owner_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::note_stalled { - delay: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::note_stalled::delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - best_finalized_block_number: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::note_stalled::best_finalized_block_number`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::report_equivocation { - ref equivocation_proof, - ref key_owner_proof, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(equivocation_proof), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(key_owner_proof), - ) - } - Call::report_equivocation_unsigned { - ref equivocation_proof, - ref key_owner_proof, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(equivocation_proof), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(key_owner_proof), - ) - } - Call::note_stalled { - ref delay, - ref best_finalized_block_number, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delay), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - best_finalized_block_number, - ), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::report_equivocation { - ref equivocation_proof, - ref key_owner_proof, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - equivocation_proof, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - key_owner_proof, - __codec_dest_edqy, - ); - } - Call::report_equivocation_unsigned { - ref equivocation_proof, - ref key_owner_proof, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - equivocation_proof, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - key_owner_proof, - __codec_dest_edqy, - ); - } - Call::note_stalled { - ref delay, - ref best_finalized_block_number, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - delay, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - best_finalized_block_number, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "report_equivocation" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::report_equivocation { - equivocation_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation_proof"))? - }, - key_owner_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::report_equivocation { - equivocation_proof: { - let val = *vals - .get(&Some("equivocation_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "equivocation_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation_proof"))? - }, - key_owner_proof: { - let val = *vals - .get(&Some("key_owner_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "key_owner_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - }; - } - if value.name() == "report_equivocation_unsigned" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::report_equivocation_unsigned { - equivocation_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation_proof"))? - }, - key_owner_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::report_equivocation_unsigned { - equivocation_proof: { - let val = *vals - .get(&Some("equivocation_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "equivocation_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation_proof"))? - }, - key_owner_proof: { - let val = *vals - .get(&Some("key_owner_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "key_owner_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - }; - } - if value.name() == "note_stalled" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::note_stalled { - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - best_finalized_block_number: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("best_finalized_block_number"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::note_stalled { - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - best_finalized_block_number: { - let val = *vals - .get(&Some("best_finalized_block_number")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "best_finalized_block_number".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("best_finalized_block_number"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "report_equivocation", - "report_equivocation_unsigned", - "note_stalled", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::report_equivocation { - equivocation_proof, - key_owner_proof, - } => { - ::subxt::ext::scale_encode::Variant { - name: "report_equivocation", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("equivocation_proof"), - equivocation_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("key_owner_proof"), - key_owner_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::report_equivocation_unsigned { - equivocation_proof, - key_owner_proof, - } => { - ::subxt::ext::scale_encode::Variant { - name: "report_equivocation_unsigned", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("equivocation_proof"), - equivocation_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("key_owner_proof"), - key_owner_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::note_stalled { - delay, - best_finalized_block_number, - } => { - ::subxt::ext::scale_encode::Variant { - name: "note_stalled", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("best_finalized_block_number"), - best_finalized_block_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::report_equivocation { - equivocation_proof: __self_0, - key_owner_proof: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "report_equivocation", - "equivocation_proof", - __self_0, - "key_owner_proof", - &__self_1, - ) - } - Call::report_equivocation_unsigned { - equivocation_proof: __self_0, - key_owner_proof: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "report_equivocation_unsigned", - "equivocation_proof", - __self_0, - "key_owner_proof", - &__self_1, - ) - } - Call::note_stalled { - delay: __self_0, - best_finalized_block_number: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "note_stalled", - "delay", - __self_0, - "best_finalized_block_number", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - PauseFailed, - #[codec(index = 1)] - ResumeFailed, - #[codec(index = 2)] - ChangePending, - #[codec(index = 3)] - TooSoon, - #[codec(index = 4)] - InvalidKeyOwnershipProof, - #[codec(index = 5)] - InvalidEquivocationProof, - #[codec(index = 6)] - DuplicateOffenceReport, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::PauseFailed) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ResumeFailed) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ChangePending) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooSoon) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidKeyOwnershipProof) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidEquivocationProof) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::DuplicateOffenceReport) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::PauseFailed => 0_usize, - Error::ResumeFailed => 0_usize, - Error::ChangePending => 0_usize, - Error::TooSoon => 0_usize, - Error::InvalidKeyOwnershipProof => 0_usize, - Error::InvalidEquivocationProof => 0_usize, - Error::DuplicateOffenceReport => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::PauseFailed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::ResumeFailed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::ChangePending => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::TooSoon => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::InvalidKeyOwnershipProof => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::InvalidEquivocationProof => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::DuplicateOffenceReport => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "PauseFailed" { - return Ok(Error::PauseFailed); - } - if value.name() == "ResumeFailed" { - return Ok(Error::ResumeFailed); - } - if value.name() == "ChangePending" { - return Ok(Error::ChangePending); - } - if value.name() == "TooSoon" { - return Ok(Error::TooSoon); - } - if value.name() == "InvalidKeyOwnershipProof" { - return Ok(Error::InvalidKeyOwnershipProof); - } - if value.name() == "InvalidEquivocationProof" { - return Ok(Error::InvalidEquivocationProof); - } - if value.name() == "DuplicateOffenceReport" { - return Ok(Error::DuplicateOffenceReport); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "PauseFailed", - "ResumeFailed", - "ChangePending", - "TooSoon", - "InvalidKeyOwnershipProof", - "InvalidEquivocationProof", - "DuplicateOffenceReport", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::PauseFailed => { - ::subxt::ext::scale_encode::Variant { - name: "PauseFailed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ResumeFailed => { - ::subxt::ext::scale_encode::Variant { - name: "ResumeFailed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ChangePending => { - ::subxt::ext::scale_encode::Variant { - name: "ChangePending", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooSoon => { - ::subxt::ext::scale_encode::Variant { - name: "TooSoon", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidKeyOwnershipProof => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidKeyOwnershipProof", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidEquivocationProof => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidEquivocationProof", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DuplicateOffenceReport => { - ::subxt::ext::scale_encode::Variant { - name: "DuplicateOffenceReport", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::PauseFailed => "PauseFailed", - Error::ResumeFailed => "ResumeFailed", - Error::ChangePending => "ChangePending", - Error::TooSoon => "TooSoon", - Error::InvalidKeyOwnershipProof => { - "InvalidKeyOwnershipProof" - } - Error::InvalidEquivocationProof => { - "InvalidEquivocationProof" - } - Error::DuplicateOffenceReport => "DuplicateOffenceReport", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - NewAuthorities { - authority_set: ::std::vec::Vec< - ( - runtime_types::sp_consensus_grandpa::app::Public, - ::core::primitive::u64, - ), - >, - }, - #[codec(index = 1)] - Paused, - #[codec(index = 2)] - Resumed, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::NewAuthorities { - authority_set: { - let __codec_res_edqy = <::std::vec::Vec< - ( - runtime_types::sp_consensus_grandpa::app::Public, - ::core::primitive::u64, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::NewAuthorities::authority_set`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Paused) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Resumed) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::NewAuthorities { ref authority_set } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(authority_set), - ) - } - Event::Paused => 0_usize, - Event::Resumed => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::NewAuthorities { ref authority_set } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - authority_set, - __codec_dest_edqy, - ); - } - Event::Paused => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Event::Resumed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NewAuthorities" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::NewAuthorities { - authority_set: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_set"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::NewAuthorities { - authority_set: { - let val = *vals - .get(&Some("authority_set")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "authority_set".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_set"))? - }, - }) - }; - } - if value.name() == "Paused" { - return Ok(Event::Paused); - } - if value.name() == "Resumed" { - return Ok(Event::Resumed); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "NewAuthorities", - "Paused", - "Resumed", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NewAuthorities { authority_set } => { - ::subxt::ext::scale_encode::Variant { - name: "NewAuthorities", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("authority_set"), - authority_set - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Paused => { - ::subxt::ext::scale_encode::Variant { - name: "Paused", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Resumed => { - ::subxt::ext::scale_encode::Variant { - name: "Resumed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::NewAuthorities { authority_set: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "NewAuthorities", - "authority_set", - &__self_0, - ) - } - Event::Paused => { - ::core::fmt::Formatter::write_str(f, "Paused") - } - Event::Resumed => { - ::core::fmt::Formatter::write_str(f, "Resumed") - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct StoredPendingChange<_0> { - pub scheduled_at: _0, - pub delay: _0, - pub next_authorities: runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - ( - runtime_types::sp_consensus_grandpa::app::Public, - ::core::primitive::u64, - ), - >, - pub forced: ::core::option::Option<_0>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for StoredPendingChange<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(StoredPendingChange::<_0> { - scheduled_at: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `StoredPendingChange::scheduled_at`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delay: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `StoredPendingChange::delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - next_authorities: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `StoredPendingChange::next_authorities`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - forced: { - let __codec_res_edqy = <::core::option::Option< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `StoredPendingChange::forced`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for StoredPendingChange<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.scheduled_at), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delay), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.next_authorities, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.forced), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.scheduled_at, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.delay, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.next_authorities, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.forced, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for StoredPendingChange<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for StoredPendingChange<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = StoredPendingChange<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(StoredPendingChange { - scheduled_at: { - let val = *vals - .get(&Some("scheduled_at")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "scheduled_at".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("scheduled_at"))? - }, - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - next_authorities: { - let val = *vals - .get(&Some("next_authorities")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "next_authorities".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("next_authorities"))? - }, - forced: { - let val = *vals - .get(&Some("forced")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "forced".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("forced"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(StoredPendingChange { - scheduled_at: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("scheduled_at"))? - }, - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - next_authorities: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("next_authorities"))? - }, - forced: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("forced"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for StoredPendingChange<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for StoredPendingChange<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let StoredPendingChange { - scheduled_at, - delay, - next_authorities, - forced, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("scheduled_at"), - scheduled_at - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("next_authorities"), - next_authorities - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("forced"), - forced as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for StoredPendingChange<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let StoredPendingChange { - scheduled_at, - delay, - next_authorities, - forced, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("scheduled_at"), - scheduled_at - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("next_authorities"), - next_authorities - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("forced"), - forced as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for StoredPendingChange<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "StoredPendingChange", - "scheduled_at", - &self.scheduled_at, - "delay", - &self.delay, - "next_authorities", - &self.next_authorities, - "forced", - &&self.forced, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum StoredState<_0> { - #[codec(index = 0)] - Live, - #[codec(index = 1)] - PendingPause { scheduled_at: _0, delay: _0 }, - #[codec(index = 2)] - Paused, - #[codec(index = 3)] - PendingResume { scheduled_at: _0, delay: _0 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for StoredState<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `StoredState`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(StoredState::<_0>::Live) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(StoredState::<_0>::PendingPause { - scheduled_at: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `StoredState::PendingPause::scheduled_at`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delay: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `StoredState::PendingPause::delay`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(StoredState::<_0>::Paused) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(StoredState::< - _0, - >::PendingResume { - scheduled_at: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `StoredState::PendingResume::scheduled_at`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delay: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `StoredState::PendingResume::delay`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `StoredState`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for StoredState<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - StoredState::Live => 0_usize, - StoredState::PendingPause { - ref scheduled_at, - ref delay, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(scheduled_at), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delay), - ) - } - StoredState::Paused => 0_usize, - StoredState::PendingResume { - ref scheduled_at, - ref delay, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(scheduled_at), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delay), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - StoredState::Live => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - StoredState::PendingPause { - ref scheduled_at, - ref delay, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - scheduled_at, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - delay, - __codec_dest_edqy, - ); - } - StoredState::Paused => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - StoredState::PendingResume { - ref scheduled_at, - ref delay, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - scheduled_at, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - delay, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for StoredState<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor for StoredState<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = StoredState<_0>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Live" { - return Ok(StoredState::Live); - } - if value.name() == "PendingPause" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(StoredState::PendingPause { - scheduled_at: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("scheduled_at"))? - }, - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(StoredState::PendingPause { - scheduled_at: { - let val = *vals - .get(&Some("scheduled_at")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "scheduled_at".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("scheduled_at"))? - }, - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - }; - } - if value.name() == "Paused" { - return Ok(StoredState::Paused); - } - if value.name() == "PendingResume" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(StoredState::PendingResume { - scheduled_at: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("scheduled_at"))? - }, - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(StoredState::PendingResume { - scheduled_at: { - let val = *vals - .get(&Some("scheduled_at")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "scheduled_at".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("scheduled_at"))? - }, - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Live", - "PendingPause", - "Paused", - "PendingResume", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for StoredState<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Live => { - ::subxt::ext::scale_encode::Variant { - name: "Live", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PendingPause { scheduled_at, delay } => { - ::subxt::ext::scale_encode::Variant { - name: "PendingPause", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("scheduled_at"), - scheduled_at - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Paused => { - ::subxt::ext::scale_encode::Variant { - name: "Paused", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PendingResume { scheduled_at, delay } => { - ::subxt::ext::scale_encode::Variant { - name: "PendingResume", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("scheduled_at"), - scheduled_at - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for StoredState<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - StoredState::Live => { - ::core::fmt::Formatter::write_str(f, "Live") - } - StoredState::PendingPause { - scheduled_at: __self_0, - delay: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PendingPause", - "scheduled_at", - __self_0, - "delay", - &__self_1, - ) - } - StoredState::Paused => { - ::core::fmt::Formatter::write_str(f, "Paused") - } - StoredState::PendingResume { - scheduled_at: __self_0, - delay: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PendingResume", - "scheduled_at", - __self_0, - "delay", - &__self_1, - ) - } - } - } - } - } - pub mod pallet_identity { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - add_registrar { - account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 1)] - set_identity { - info: ::std::boxed::Box< - runtime_types::pallet_identity::types::IdentityInfo, - >, - }, - #[codec(index = 2)] - set_subs { - subs: ::std::vec::Vec< - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_identity::types::Data, - ), - >, - }, - #[codec(index = 3)] - clear_identity, - #[codec(index = 4)] - request_judgement { - #[codec(compact)] - reg_index: ::core::primitive::u32, - #[codec(compact)] - max_fee: ::core::primitive::u128, - }, - #[codec(index = 5)] - cancel_request { reg_index: ::core::primitive::u32 }, - #[codec(index = 6)] - set_fee { - #[codec(compact)] - index: ::core::primitive::u32, - #[codec(compact)] - fee: ::core::primitive::u128, - }, - #[codec(index = 7)] - set_account_id { - #[codec(compact)] - index: ::core::primitive::u32, - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 8)] - set_fields { - #[codec(compact)] - index: ::core::primitive::u32, - fields: runtime_types::pallet_identity::types::BitFlags< - runtime_types::pallet_identity::types::IdentityField, - >, - }, - #[codec(index = 9)] - 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)] - kill_identity { - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 11)] - add_sub { - sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - data: runtime_types::pallet_identity::types::Data, - }, - #[codec(index = 12)] - rename_sub { - sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - data: runtime_types::pallet_identity::types::Data, - }, - #[codec(index = 13)] - remove_sub { - sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 14)] - quit_sub, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::add_registrar { - account: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::add_registrar::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_identity { - info: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::pallet_identity::types::IdentityInfo, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_identity::info`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_subs { - subs: { - let __codec_res_edqy = <::std::vec::Vec< - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_identity::types::Data, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_subs::subs`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::clear_identity) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::request_judgement { - reg_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::request_judgement::reg_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - max_fee: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::request_judgement::max_fee`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::cancel_request { - reg_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::cancel_request::reg_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_fee { - index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_fee::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - fee: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_fee::fee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_account_id { - index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_account_id::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - new: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_account_id::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_fields { - index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_fields::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - fields: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_fields::fields`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::provide_judgement { - reg_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::provide_judgement::reg_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::provide_judgement::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - judgement: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::provide_judgement::judgement`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - identity: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::provide_judgement::identity`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::kill_identity { - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::kill_identity::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::add_sub { - sub: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::add_sub::sub`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - data: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::add_sub::data`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::rename_sub { - sub: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::rename_sub::sub`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - data: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::rename_sub::data`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::remove_sub { - sub: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::remove_sub::sub`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::quit_sub) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::add_registrar { ref account } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(account), - ) - } - Call::set_identity { ref info } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(info), - ) - } - Call::set_subs { ref subs } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(subs), - ) - } - Call::clear_identity => 0_usize, - Call::request_judgement { ref reg_index, ref max_fee } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(reg_index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(max_fee), - ), - ) - } - Call::cancel_request { ref reg_index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(reg_index), - ) - } - Call::set_fee { ref index, ref fee } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(fee), - ), - ) - } - Call::set_account_id { ref index, ref new } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - ), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_fields { ref index, ref fields } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(fields), - ) - } - Call::provide_judgement { - ref reg_index, - ref target, - ref judgement, - ref identity, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(reg_index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(target), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(judgement), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(identity), - ) - } - Call::kill_identity { ref target } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(target), - ) - } - Call::add_sub { ref sub, ref data } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(sub)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(data), - ) - } - Call::rename_sub { ref sub, ref data } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(sub)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(data), - ) - } - Call::remove_sub { ref sub } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(sub)) - } - Call::quit_sub => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::add_registrar { ref account } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - account, - __codec_dest_edqy, - ); - } - Call::set_identity { ref info } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - info, - __codec_dest_edqy, - ); - } - Call::set_subs { ref subs } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - subs, - __codec_dest_edqy, - ); - } - Call::clear_identity => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Call::request_judgement { ref reg_index, ref max_fee } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(reg_index), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(max_fee), - __codec_dest_edqy, - ); - } - } - Call::cancel_request { ref reg_index } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - reg_index, - __codec_dest_edqy, - ); - } - Call::set_fee { ref index, ref fee } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(fee), - __codec_dest_edqy, - ); - } - } - Call::set_account_id { ref index, ref new } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_fields { ref index, ref fields } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - fields, - __codec_dest_edqy, - ); - } - Call::provide_judgement { - ref reg_index, - ref target, - ref judgement, - ref identity, - } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(reg_index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - target, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - judgement, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - identity, - __codec_dest_edqy, - ); - } - Call::kill_identity { ref target } => { - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - target, - __codec_dest_edqy, - ); - } - Call::add_sub { ref sub, ref data } => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - sub, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - data, - __codec_dest_edqy, - ); - } - Call::rename_sub { ref sub, ref data } => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - sub, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - data, - __codec_dest_edqy, - ); - } - Call::remove_sub { ref sub } => { - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - sub, - __codec_dest_edqy, - ); - } - Call::quit_sub => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "add_registrar" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::add_registrar { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::add_registrar { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - }; - } - if value.name() == "set_identity" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_identity { - info: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("info"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_identity { - info: { - let val = *vals - .get(&Some("info")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "info".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("info"))? - }, - }) - }; - } - if value.name() == "set_subs" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_subs { - subs: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("subs"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_subs { - subs: { - let val = *vals - .get(&Some("subs")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "subs".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("subs"))? - }, - }) - }; - } - if value.name() == "clear_identity" { - return Ok(Call::clear_identity); - } - if value.name() == "request_judgement" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::request_judgement { - reg_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reg_index"))? - }, - max_fee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_fee"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::request_judgement { - reg_index: { - let val = *vals - .get(&Some("reg_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reg_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reg_index"))? - }, - max_fee: { - let val = *vals - .get(&Some("max_fee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_fee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_fee"))? - }, - }) - }; - } - if value.name() == "cancel_request" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::cancel_request { - reg_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reg_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::cancel_request { - reg_index: { - let val = *vals - .get(&Some("reg_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reg_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reg_index"))? - }, - }) - }; - } - if value.name() == "set_fee" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::set_fee { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - fee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_fee { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - fee: { - let val = *vals - .get(&Some("fee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - }) - }; - } - if value.name() == "set_account_id" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::set_account_id { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_account_id { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_fields" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::set_fields { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - fields: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fields"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_fields { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - fields: { - let val = *vals - .get(&Some("fields")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fields".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fields"))? - }, - }) - }; - } - if value.name() == "provide_judgement" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Call::provide_judgement { - reg_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reg_index"))? - }, - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - judgement: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("judgement"))? - }, - identity: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("identity"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::provide_judgement { - reg_index: { - let val = *vals - .get(&Some("reg_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reg_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reg_index"))? - }, - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - judgement: { - let val = *vals - .get(&Some("judgement")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "judgement".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("judgement"))? - }, - identity: { - let val = *vals - .get(&Some("identity")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "identity".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("identity"))? - }, - }) - }; - } - if value.name() == "kill_identity" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::kill_identity { - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::kill_identity { - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - }; - } - if value.name() == "add_sub" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::add_sub { - sub: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - data: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::add_sub { - sub: { - let val = *vals - .get(&Some("sub")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sub".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - data: { - let val = *vals - .get(&Some("data")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "data".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - }; - } - if value.name() == "rename_sub" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::rename_sub { - sub: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - data: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::rename_sub { - sub: { - let val = *vals - .get(&Some("sub")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sub".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - data: { - let val = *vals - .get(&Some("data")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "data".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - }; - } - if value.name() == "remove_sub" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::remove_sub { - sub: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::remove_sub { - sub: { - let val = *vals - .get(&Some("sub")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sub".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - }) - }; - } - if value.name() == "quit_sub" { - return Ok(Call::quit_sub); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "add_registrar", - "set_identity", - "set_subs", - "clear_identity", - "request_judgement", - "cancel_request", - "set_fee", - "set_account_id", - "set_fields", - "provide_judgement", - "kill_identity", - "add_sub", - "rename_sub", - "remove_sub", - "quit_sub", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::add_registrar { account } => { - ::subxt::ext::scale_encode::Variant { - name: "add_registrar", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_identity { info } => { - ::subxt::ext::scale_encode::Variant { - name: "set_identity", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("info"), - info as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_subs { subs } => { - ::subxt::ext::scale_encode::Variant { - name: "set_subs", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("subs"), - subs as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::clear_identity => { - ::subxt::ext::scale_encode::Variant { - name: "clear_identity", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::request_judgement { reg_index, max_fee } => { - ::subxt::ext::scale_encode::Variant { - name: "request_judgement", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reg_index"), - reg_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_fee"), - max_fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::cancel_request { reg_index } => { - ::subxt::ext::scale_encode::Variant { - name: "cancel_request", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reg_index"), - reg_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_fee { index, fee } => { - ::subxt::ext::scale_encode::Variant { - name: "set_fee", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee"), - fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_account_id { index, new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_account_id", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_fields { index, fields } => { - ::subxt::ext::scale_encode::Variant { - name: "set_fields", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fields"), - fields as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::provide_judgement { - reg_index, - target, - judgement, - identity, - } => { - ::subxt::ext::scale_encode::Variant { - name: "provide_judgement", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reg_index"), - reg_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("judgement"), - judgement as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("identity"), - identity as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::kill_identity { target } => { - ::subxt::ext::scale_encode::Variant { - name: "kill_identity", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::add_sub { sub, data } => { - ::subxt::ext::scale_encode::Variant { - name: "add_sub", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("data"), - data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::rename_sub { sub, data } => { - ::subxt::ext::scale_encode::Variant { - name: "rename_sub", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("data"), - data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::remove_sub { sub } => { - ::subxt::ext::scale_encode::Variant { - name: "remove_sub", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::quit_sub => { - ::subxt::ext::scale_encode::Variant { - name: "quit_sub", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::add_registrar { account: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "add_registrar", - "account", - &__self_0, - ) - } - Call::set_identity { info: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_identity", - "info", - &__self_0, - ) - } - Call::set_subs { subs: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_subs", - "subs", - &__self_0, - ) - } - Call::clear_identity => { - ::core::fmt::Formatter::write_str(f, "clear_identity") - } - Call::request_judgement { - reg_index: __self_0, - max_fee: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "request_judgement", - "reg_index", - __self_0, - "max_fee", - &__self_1, - ) - } - Call::cancel_request { reg_index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "cancel_request", - "reg_index", - &__self_0, - ) - } - Call::set_fee { index: __self_0, fee: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "set_fee", - "index", - __self_0, - "fee", - &__self_1, - ) - } - Call::set_account_id { index: __self_0, new: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "set_account_id", - "index", - __self_0, - "new", - &__self_1, - ) - } - Call::set_fields { index: __self_0, fields: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "set_fields", - "index", - __self_0, - "fields", - &__self_1, - ) - } - Call::provide_judgement { - reg_index: __self_0, - target: __self_1, - judgement: __self_2, - identity: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "provide_judgement", - "reg_index", - __self_0, - "target", - __self_1, - "judgement", - __self_2, - "identity", - &__self_3, - ) - } - Call::kill_identity { target: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "kill_identity", - "target", - &__self_0, - ) - } - Call::add_sub { sub: __self_0, data: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "add_sub", - "sub", - __self_0, - "data", - &__self_1, - ) - } - Call::rename_sub { sub: __self_0, data: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "rename_sub", - "sub", - __self_0, - "data", - &__self_1, - ) - } - Call::remove_sub { sub: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "remove_sub", - "sub", - &__self_0, - ) - } - Call::quit_sub => { - ::core::fmt::Formatter::write_str(f, "quit_sub") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - TooManySubAccounts, - #[codec(index = 1)] - NotFound, - #[codec(index = 2)] - NotNamed, - #[codec(index = 3)] - EmptyIndex, - #[codec(index = 4)] - FeeChanged, - #[codec(index = 5)] - NoIdentity, - #[codec(index = 6)] - StickyJudgement, - #[codec(index = 7)] - JudgementGiven, - #[codec(index = 8)] - InvalidJudgement, - #[codec(index = 9)] - InvalidIndex, - #[codec(index = 10)] - InvalidTarget, - #[codec(index = 11)] - TooManyFields, - #[codec(index = 12)] - TooManyRegistrars, - #[codec(index = 13)] - AlreadyClaimed, - #[codec(index = 14)] - NotSub, - #[codec(index = 15)] - NotOwned, - #[codec(index = 16)] - JudgementForDifferentIdentity, - #[codec(index = 17)] - JudgementPaymentFailed, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManySubAccounts) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotFound) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotNamed) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::EmptyIndex) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::FeeChanged) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoIdentity) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::StickyJudgement) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::JudgementGiven) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidJudgement) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidIndex) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidTarget) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyFields) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyRegistrars) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyClaimed) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotSub) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotOwned) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::JudgementForDifferentIdentity, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::JudgementPaymentFailed) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::TooManySubAccounts => 0_usize, - Error::NotFound => 0_usize, - Error::NotNamed => 0_usize, - Error::EmptyIndex => 0_usize, - Error::FeeChanged => 0_usize, - Error::NoIdentity => 0_usize, - Error::StickyJudgement => 0_usize, - Error::JudgementGiven => 0_usize, - Error::InvalidJudgement => 0_usize, - Error::InvalidIndex => 0_usize, - Error::InvalidTarget => 0_usize, - Error::TooManyFields => 0_usize, - Error::TooManyRegistrars => 0_usize, - Error::AlreadyClaimed => 0_usize, - Error::NotSub => 0_usize, - Error::NotOwned => 0_usize, - Error::JudgementForDifferentIdentity => 0_usize, - Error::JudgementPaymentFailed => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::TooManySubAccounts => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::NotFound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::NotNamed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::EmptyIndex => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::FeeChanged => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::NoIdentity => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::StickyJudgement => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::JudgementGiven => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::InvalidJudgement => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::InvalidIndex => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::InvalidTarget => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Error::TooManyFields => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - Error::TooManyRegistrars => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - Error::AlreadyClaimed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - } - Error::NotSub => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - } - Error::NotOwned => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - } - Error::JudgementForDifferentIdentity => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - } - Error::JudgementPaymentFailed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "TooManySubAccounts" { - return Ok(Error::TooManySubAccounts); - } - if value.name() == "NotFound" { - return Ok(Error::NotFound); - } - if value.name() == "NotNamed" { - return Ok(Error::NotNamed); - } - if value.name() == "EmptyIndex" { - return Ok(Error::EmptyIndex); - } - if value.name() == "FeeChanged" { - return Ok(Error::FeeChanged); - } - if value.name() == "NoIdentity" { - return Ok(Error::NoIdentity); - } - if value.name() == "StickyJudgement" { - return Ok(Error::StickyJudgement); - } - if value.name() == "JudgementGiven" { - return Ok(Error::JudgementGiven); - } - if value.name() == "InvalidJudgement" { - return Ok(Error::InvalidJudgement); - } - if value.name() == "InvalidIndex" { - return Ok(Error::InvalidIndex); - } - if value.name() == "InvalidTarget" { - return Ok(Error::InvalidTarget); - } - if value.name() == "TooManyFields" { - return Ok(Error::TooManyFields); - } - if value.name() == "TooManyRegistrars" { - return Ok(Error::TooManyRegistrars); - } - if value.name() == "AlreadyClaimed" { - return Ok(Error::AlreadyClaimed); - } - if value.name() == "NotSub" { - return Ok(Error::NotSub); - } - if value.name() == "NotOwned" { - return Ok(Error::NotOwned); - } - if value.name() == "JudgementForDifferentIdentity" { - return Ok(Error::JudgementForDifferentIdentity); - } - if value.name() == "JudgementPaymentFailed" { - return Ok(Error::JudgementPaymentFailed); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "TooManySubAccounts", - "NotFound", - "NotNamed", - "EmptyIndex", - "FeeChanged", - "NoIdentity", - "StickyJudgement", - "JudgementGiven", - "InvalidJudgement", - "InvalidIndex", - "InvalidTarget", - "TooManyFields", - "TooManyRegistrars", - "AlreadyClaimed", - "NotSub", - "NotOwned", - "JudgementForDifferentIdentity", - "JudgementPaymentFailed", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::TooManySubAccounts => { - ::subxt::ext::scale_encode::Variant { - name: "TooManySubAccounts", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotFound => { - ::subxt::ext::scale_encode::Variant { - name: "NotFound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotNamed => { - ::subxt::ext::scale_encode::Variant { - name: "NotNamed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::EmptyIndex => { - ::subxt::ext::scale_encode::Variant { - name: "EmptyIndex", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FeeChanged => { - ::subxt::ext::scale_encode::Variant { - name: "FeeChanged", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoIdentity => { - ::subxt::ext::scale_encode::Variant { - name: "NoIdentity", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::StickyJudgement => { - ::subxt::ext::scale_encode::Variant { - name: "StickyJudgement", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::JudgementGiven => { - ::subxt::ext::scale_encode::Variant { - name: "JudgementGiven", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidJudgement => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidJudgement", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidIndex => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidIndex", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidTarget => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidTarget", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyFields => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyFields", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyRegistrars => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyRegistrars", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyClaimed => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyClaimed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotSub => { - ::subxt::ext::scale_encode::Variant { - name: "NotSub", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotOwned => { - ::subxt::ext::scale_encode::Variant { - name: "NotOwned", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::JudgementForDifferentIdentity => { - ::subxt::ext::scale_encode::Variant { - name: "JudgementForDifferentIdentity", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::JudgementPaymentFailed => { - ::subxt::ext::scale_encode::Variant { - name: "JudgementPaymentFailed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::TooManySubAccounts => "TooManySubAccounts", - Error::NotFound => "NotFound", - Error::NotNamed => "NotNamed", - Error::EmptyIndex => "EmptyIndex", - Error::FeeChanged => "FeeChanged", - Error::NoIdentity => "NoIdentity", - Error::StickyJudgement => "StickyJudgement", - Error::JudgementGiven => "JudgementGiven", - Error::InvalidJudgement => "InvalidJudgement", - Error::InvalidIndex => "InvalidIndex", - Error::InvalidTarget => "InvalidTarget", - Error::TooManyFields => "TooManyFields", - Error::TooManyRegistrars => "TooManyRegistrars", - Error::AlreadyClaimed => "AlreadyClaimed", - Error::NotSub => "NotSub", - Error::NotOwned => "NotOwned", - Error::JudgementForDifferentIdentity => { - "JudgementForDifferentIdentity" - } - Error::JudgementPaymentFailed => "JudgementPaymentFailed", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - IdentitySet { who: ::subxt::utils::AccountId32 }, - #[codec(index = 1)] - IdentityCleared { - who: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 2)] - IdentityKilled { - who: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 3)] - JudgementRequested { - who: ::subxt::utils::AccountId32, - registrar_index: ::core::primitive::u32, - }, - #[codec(index = 4)] - JudgementUnrequested { - who: ::subxt::utils::AccountId32, - registrar_index: ::core::primitive::u32, - }, - #[codec(index = 5)] - JudgementGiven { - target: ::subxt::utils::AccountId32, - registrar_index: ::core::primitive::u32, - }, - #[codec(index = 6)] - RegistrarAdded { registrar_index: ::core::primitive::u32 }, - #[codec(index = 7)] - SubIdentityAdded { - sub: ::subxt::utils::AccountId32, - main: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 8)] - SubIdentityRemoved { - sub: ::subxt::utils::AccountId32, - main: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 9)] - SubIdentityRevoked { - sub: ::subxt::utils::AccountId32, - main: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::IdentitySet { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::IdentitySet::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::IdentityCleared { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::IdentityCleared::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::IdentityCleared::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::IdentityKilled { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::IdentityKilled::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::IdentityKilled::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::JudgementRequested { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::JudgementRequested::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - registrar_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::JudgementRequested::registrar_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::JudgementUnrequested { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::JudgementUnrequested::who`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - registrar_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::JudgementUnrequested::registrar_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::JudgementGiven { - target: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::JudgementGiven::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - registrar_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::JudgementGiven::registrar_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::RegistrarAdded { - registrar_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::RegistrarAdded::registrar_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::SubIdentityAdded { - sub: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::SubIdentityAdded::sub`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - main: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::SubIdentityAdded::main`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::SubIdentityAdded::deposit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::SubIdentityRemoved { - sub: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::SubIdentityRemoved::sub`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - main: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::SubIdentityRemoved::main`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::SubIdentityRemoved::deposit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::SubIdentityRevoked { - sub: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::SubIdentityRevoked::sub`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - main: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::SubIdentityRevoked::main`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::SubIdentityRevoked::deposit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::IdentitySet { ref who } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - } - Event::IdentityCleared { ref who, ref deposit } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(deposit), - ) - } - Event::IdentityKilled { ref who, ref deposit } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(deposit), - ) - } - Event::JudgementRequested { - ref who, - ref registrar_index, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(registrar_index), - ) - } - Event::JudgementUnrequested { - ref who, - ref registrar_index, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(registrar_index), - ) - } - Event::JudgementGiven { - ref target, - ref registrar_index, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(target), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(registrar_index), - ) - } - Event::RegistrarAdded { ref registrar_index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(registrar_index), - ) - } - Event::SubIdentityAdded { - ref sub, - ref main, - ref deposit, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(sub)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(main), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(deposit), - ) - } - Event::SubIdentityRemoved { - ref sub, - ref main, - ref deposit, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(sub)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(main), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(deposit), - ) - } - Event::SubIdentityRevoked { - ref sub, - ref main, - ref deposit, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(sub)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(main), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(deposit), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::IdentitySet { ref who } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - } - Event::IdentityCleared { ref who, ref deposit } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - deposit, - __codec_dest_edqy, - ); - } - Event::IdentityKilled { ref who, ref deposit } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - deposit, - __codec_dest_edqy, - ); - } - Event::JudgementRequested { - ref who, - ref registrar_index, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - registrar_index, - __codec_dest_edqy, - ); - } - Event::JudgementUnrequested { - ref who, - ref registrar_index, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - registrar_index, - __codec_dest_edqy, - ); - } - Event::JudgementGiven { - ref target, - ref registrar_index, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - target, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - registrar_index, - __codec_dest_edqy, - ); - } - Event::RegistrarAdded { ref registrar_index } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - registrar_index, - __codec_dest_edqy, - ); - } - Event::SubIdentityAdded { - ref sub, - ref main, - ref deposit, - } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - sub, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - main, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - deposit, - __codec_dest_edqy, - ); - } - Event::SubIdentityRemoved { - ref sub, - ref main, - ref deposit, - } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - sub, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - main, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - deposit, - __codec_dest_edqy, - ); - } - Event::SubIdentityRevoked { - ref sub, - ref main, - ref deposit, - } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - sub, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - main, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - deposit, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "IdentitySet" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::IdentitySet { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::IdentitySet { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - }; - } - if value.name() == "IdentityCleared" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::IdentityCleared { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::IdentityCleared { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - }; - } - if value.name() == "IdentityKilled" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::IdentityKilled { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::IdentityKilled { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - }; - } - if value.name() == "JudgementRequested" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::JudgementRequested { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - registrar_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("registrar_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::JudgementRequested { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - registrar_index: { - let val = *vals - .get(&Some("registrar_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "registrar_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("registrar_index"))? - }, - }) - }; - } - if value.name() == "JudgementUnrequested" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::JudgementUnrequested { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - registrar_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("registrar_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::JudgementUnrequested { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - registrar_index: { - let val = *vals - .get(&Some("registrar_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "registrar_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("registrar_index"))? - }, - }) - }; - } - if value.name() == "JudgementGiven" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::JudgementGiven { - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - registrar_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("registrar_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::JudgementGiven { - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - registrar_index: { - let val = *vals - .get(&Some("registrar_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "registrar_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("registrar_index"))? - }, - }) - }; - } - if value.name() == "RegistrarAdded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::RegistrarAdded { - registrar_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("registrar_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::RegistrarAdded { - registrar_index: { - let val = *vals - .get(&Some("registrar_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "registrar_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("registrar_index"))? - }, - }) - }; - } - if value.name() == "SubIdentityAdded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::SubIdentityAdded { - sub: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - main: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("main"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::SubIdentityAdded { - sub: { - let val = *vals - .get(&Some("sub")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sub".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - main: { - let val = *vals - .get(&Some("main")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "main".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("main"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - }; - } - if value.name() == "SubIdentityRemoved" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::SubIdentityRemoved { - sub: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - main: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("main"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::SubIdentityRemoved { - sub: { - let val = *vals - .get(&Some("sub")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sub".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - main: { - let val = *vals - .get(&Some("main")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "main".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("main"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - }; - } - if value.name() == "SubIdentityRevoked" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::SubIdentityRevoked { - sub: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - main: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("main"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::SubIdentityRevoked { - sub: { - let val = *vals - .get(&Some("sub")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sub".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sub"))? - }, - main: { - let val = *vals - .get(&Some("main")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "main".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("main"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "IdentitySet", - "IdentityCleared", - "IdentityKilled", - "JudgementRequested", - "JudgementUnrequested", - "JudgementGiven", - "RegistrarAdded", - "SubIdentityAdded", - "SubIdentityRemoved", - "SubIdentityRevoked", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::IdentitySet { who } => { - ::subxt::ext::scale_encode::Variant { - name: "IdentitySet", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::IdentityCleared { who, deposit } => { - ::subxt::ext::scale_encode::Variant { - name: "IdentityCleared", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::IdentityKilled { who, deposit } => { - ::subxt::ext::scale_encode::Variant { - name: "IdentityKilled", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::JudgementRequested { who, registrar_index } => { - ::subxt::ext::scale_encode::Variant { - name: "JudgementRequested", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("registrar_index"), - registrar_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::JudgementUnrequested { who, registrar_index } => { - ::subxt::ext::scale_encode::Variant { - name: "JudgementUnrequested", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("registrar_index"), - registrar_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::JudgementGiven { target, registrar_index } => { - ::subxt::ext::scale_encode::Variant { - name: "JudgementGiven", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("registrar_index"), - registrar_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::RegistrarAdded { registrar_index } => { - ::subxt::ext::scale_encode::Variant { - name: "RegistrarAdded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("registrar_index"), - registrar_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SubIdentityAdded { sub, main, deposit } => { - ::subxt::ext::scale_encode::Variant { - name: "SubIdentityAdded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("main"), - main as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SubIdentityRemoved { sub, main, deposit } => { - ::subxt::ext::scale_encode::Variant { - name: "SubIdentityRemoved", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("main"), - main as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SubIdentityRevoked { sub, main, deposit } => { - ::subxt::ext::scale_encode::Variant { - name: "SubIdentityRevoked", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sub"), - sub as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("main"), - main as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::IdentitySet { who: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "IdentitySet", - "who", - &__self_0, - ) - } - Event::IdentityCleared { - who: __self_0, - deposit: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "IdentityCleared", - "who", - __self_0, - "deposit", - &__self_1, - ) - } - Event::IdentityKilled { - who: __self_0, - deposit: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "IdentityKilled", - "who", - __self_0, - "deposit", - &__self_1, - ) - } - Event::JudgementRequested { - who: __self_0, - registrar_index: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "JudgementRequested", - "who", - __self_0, - "registrar_index", - &__self_1, - ) - } - Event::JudgementUnrequested { - who: __self_0, - registrar_index: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "JudgementUnrequested", - "who", - __self_0, - "registrar_index", - &__self_1, - ) - } - Event::JudgementGiven { - target: __self_0, - registrar_index: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "JudgementGiven", - "target", - __self_0, - "registrar_index", - &__self_1, - ) - } - Event::RegistrarAdded { registrar_index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "RegistrarAdded", - "registrar_index", - &__self_0, - ) - } - Event::SubIdentityAdded { - sub: __self_0, - main: __self_1, - deposit: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SubIdentityAdded", - "sub", - __self_0, - "main", - __self_1, - "deposit", - &__self_2, - ) - } - Event::SubIdentityRemoved { - sub: __self_0, - main: __self_1, - deposit: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SubIdentityRemoved", - "sub", - __self_0, - "main", - __self_1, - "deposit", - &__self_2, - ) - } - Event::SubIdentityRevoked { - sub: __self_0, - main: __self_1, - deposit: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SubIdentityRevoked", - "sub", - __self_0, - "main", - __self_1, - "deposit", - &__self_2, - ) - } - } - } - } - } - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BitFlags<_0>( - pub ::core::primitive::u64, - #[codec(skip)] - pub ::core::marker::PhantomData<_0>, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::CompactAs for BitFlags<_0> { - type As = ::core::primitive::u64; - fn encode_as(&self) -> &::core::primitive::u64 { - &self.0 - } - fn decode_from( - x: ::core::primitive::u64, - ) -> ::core::result::Result< - BitFlags<_0>, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(BitFlags(x, Default::default())) - } - } - #[automatically_derived] - impl<_0> From<::subxt::ext::codec::Compact>> - for BitFlags<_0> { - fn from( - x: ::subxt::ext::codec::Compact>, - ) -> BitFlags<_0> { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for BitFlags<_0> - where - ::core::marker::PhantomData<_0>: Default, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - BitFlags::< - _0, - >( - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BitFlags.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ::core::default::Default::default(), - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for BitFlags<_0> { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for BitFlags<_0> {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor for BitFlags<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BitFlags<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - BitFlags( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - ::core::default::Default::default(), - ), - ) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for BitFlags<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for BitFlags<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BitFlags(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields for BitFlags<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BitFlags(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for BitFlags<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "BitFlags", - &self.0, - &&self.1, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub 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]), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Data { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Data`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Data::None) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw0({ - let __codec_res_edqy = <[::core::primitive::u8; 0usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw0.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw1({ - let __codec_res_edqy = <[::core::primitive::u8; 1usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw1.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw2({ - let __codec_res_edqy = <[::core::primitive::u8; 2usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw2.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw3({ - let __codec_res_edqy = <[::core::primitive::u8; 3usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw3.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw4({ - let __codec_res_edqy = <[::core::primitive::u8; 4usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw4.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw5({ - let __codec_res_edqy = <[::core::primitive::u8; 5usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw5.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw6({ - let __codec_res_edqy = <[::core::primitive::u8; 6usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw6.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw7({ - let __codec_res_edqy = <[::core::primitive::u8; 7usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw7.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw8({ - let __codec_res_edqy = <[::core::primitive::u8; 8usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw8.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw9({ - let __codec_res_edqy = <[::core::primitive::u8; 9usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw9.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw10({ - let __codec_res_edqy = <[::core::primitive::u8; 10usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw10.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw11({ - let __codec_res_edqy = <[::core::primitive::u8; 11usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw11.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw12({ - let __codec_res_edqy = <[::core::primitive::u8; 12usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw12.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw13({ - let __codec_res_edqy = <[::core::primitive::u8; 13usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw13.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw14({ - let __codec_res_edqy = <[::core::primitive::u8; 14usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw14.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw15({ - let __codec_res_edqy = <[::core::primitive::u8; 15usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw15.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw16({ - let __codec_res_edqy = <[::core::primitive::u8; 16usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw16.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw17({ - let __codec_res_edqy = <[::core::primitive::u8; 17usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw17.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw18({ - let __codec_res_edqy = <[::core::primitive::u8; 18usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw18.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw19({ - let __codec_res_edqy = <[::core::primitive::u8; 19usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw19.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw20({ - let __codec_res_edqy = <[::core::primitive::u8; 20usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw20.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 22u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw21({ - let __codec_res_edqy = <[::core::primitive::u8; 21usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw21.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 23u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw22({ - let __codec_res_edqy = <[::core::primitive::u8; 22usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw22.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 24u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw23({ - let __codec_res_edqy = <[::core::primitive::u8; 23usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw23.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 25u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw24({ - let __codec_res_edqy = <[::core::primitive::u8; 24usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw24.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 26u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw25({ - let __codec_res_edqy = <[::core::primitive::u8; 25usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw25.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 27u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw26({ - let __codec_res_edqy = <[::core::primitive::u8; 26usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw26.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 28u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw27({ - let __codec_res_edqy = <[::core::primitive::u8; 27usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw27.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 29u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw28({ - let __codec_res_edqy = <[::core::primitive::u8; 28usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw28.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 30u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw29({ - let __codec_res_edqy = <[::core::primitive::u8; 29usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw29.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 31u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw30({ - let __codec_res_edqy = <[::core::primitive::u8; 30usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw30.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 32u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw31({ - let __codec_res_edqy = <[::core::primitive::u8; 31usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw31.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 33u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Raw32({ - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Raw32.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 34u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::BlakeTwo256({ - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::BlakeTwo256.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 35u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Sha256({ - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Sha256.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 36u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::Keccak256({ - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::Keccak256.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 37u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Data::ShaThree256({ - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Data::ShaThree256.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Data`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Data { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Data::None => 0_usize, - Data::Raw0(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw1(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw2(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw3(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw4(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw5(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw6(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw7(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw8(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw9(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw10(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw11(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw12(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw13(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw14(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw15(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw16(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw17(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw18(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw19(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw20(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw21(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw22(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw23(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw24(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw25(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw26(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw27(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw28(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw29(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw30(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw31(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Raw32(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::BlakeTwo256(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Sha256(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::Keccak256(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Data::ShaThree256(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Data::None => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Data::Raw0(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw1(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw2(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw3(ref aa) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw4(ref aa) => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw5(ref aa) => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw6(ref aa) => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw7(ref aa) => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw8(ref aa) => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw9(ref aa) => { - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw10(ref aa) => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw11(ref aa) => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw12(ref aa) => { - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw13(ref aa) => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw14(ref aa) => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw15(ref aa) => { - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw16(ref aa) => { - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw17(ref aa) => { - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw18(ref aa) => { - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw19(ref aa) => { - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw20(ref aa) => { - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw21(ref aa) => { - __codec_dest_edqy.push_byte(22u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw22(ref aa) => { - __codec_dest_edqy.push_byte(23u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw23(ref aa) => { - __codec_dest_edqy.push_byte(24u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw24(ref aa) => { - __codec_dest_edqy.push_byte(25u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw25(ref aa) => { - __codec_dest_edqy.push_byte(26u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw26(ref aa) => { - __codec_dest_edqy.push_byte(27u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw27(ref aa) => { - __codec_dest_edqy.push_byte(28u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw28(ref aa) => { - __codec_dest_edqy.push_byte(29u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw29(ref aa) => { - __codec_dest_edqy.push_byte(30u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw30(ref aa) => { - __codec_dest_edqy.push_byte(31u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw31(ref aa) => { - __codec_dest_edqy.push_byte(32u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Raw32(ref aa) => { - __codec_dest_edqy.push_byte(33u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::BlakeTwo256(ref aa) => { - __codec_dest_edqy.push_byte(34u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Sha256(ref aa) => { - __codec_dest_edqy.push_byte(35u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::Keccak256(ref aa) => { - __codec_dest_edqy.push_byte(36u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Data::ShaThree256(ref aa) => { - __codec_dest_edqy.push_byte(37u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Data {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Data { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Data; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "None" { - return Ok(Data::None); - } - if value.name() == "Raw0" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw0({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw1" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw1({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw2" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw2({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw3" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw3({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw4" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw4({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw5" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw5({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw6" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw6({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw7" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw7({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw8" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw8({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw9" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw9({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw10" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw10({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw11" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw11({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw12" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw12({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw13" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw13({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw14" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw14({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw15" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw15({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw16" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw16({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw17" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw17({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw18" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw18({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw19" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw19({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw20" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw20({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw21" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw21({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw22" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw22({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw23" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw23({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw24" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw24({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw25" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw25({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw26" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw26({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw27" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw27({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw28" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw28({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw29" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw29({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw30" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw30({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw31" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw31({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Raw32" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Raw32({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "BlakeTwo256" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::BlakeTwo256({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Sha256" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Sha256({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Keccak256" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::Keccak256({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ShaThree256" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Data::ShaThree256({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "None", - "Raw0", - "Raw1", - "Raw2", - "Raw3", - "Raw4", - "Raw5", - "Raw6", - "Raw7", - "Raw8", - "Raw9", - "Raw10", - "Raw11", - "Raw12", - "Raw13", - "Raw14", - "Raw15", - "Raw16", - "Raw17", - "Raw18", - "Raw19", - "Raw20", - "Raw21", - "Raw22", - "Raw23", - "Raw24", - "Raw25", - "Raw26", - "Raw27", - "Raw28", - "Raw29", - "Raw30", - "Raw31", - "Raw32", - "BlakeTwo256", - "Sha256", - "Keccak256", - "ShaThree256", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Data { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::None => { - ::subxt::ext::scale_encode::Variant { - name: "None", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw0(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw0", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw1(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw1", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw2(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw2", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw3(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw3", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw4(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw4", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw5(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw5", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw6(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw6", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw7(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw7", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw8(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw8", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw9(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw9", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw10(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw10", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw11(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw11", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw12(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw12", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw13(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw13", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw14(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw14", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw15(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw15", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw16(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw16", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw17(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw17", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw18(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw18", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw19(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw19", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw20(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw20", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw21(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw21", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw22(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw22", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw23(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw23", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw24(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw24", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw25(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw25", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw26(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw26", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw27(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw27", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw28(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw28", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw29(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw29", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw30(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw30", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw31(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw31", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Raw32(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Raw32", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BlakeTwo256(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "BlakeTwo256", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Sha256(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Sha256", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Keccak256(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Keccak256", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ShaThree256(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ShaThree256", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Data { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Data::None => ::core::fmt::Formatter::write_str(f, "None"), - Data::Raw0(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw0", - &__self_0, - ) - } - Data::Raw1(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw1", - &__self_0, - ) - } - Data::Raw2(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw2", - &__self_0, - ) - } - Data::Raw3(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw3", - &__self_0, - ) - } - Data::Raw4(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw4", - &__self_0, - ) - } - Data::Raw5(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw5", - &__self_0, - ) - } - Data::Raw6(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw6", - &__self_0, - ) - } - Data::Raw7(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw7", - &__self_0, - ) - } - Data::Raw8(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw8", - &__self_0, - ) - } - Data::Raw9(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw9", - &__self_0, - ) - } - Data::Raw10(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw10", - &__self_0, - ) - } - Data::Raw11(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw11", - &__self_0, - ) - } - Data::Raw12(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw12", - &__self_0, - ) - } - Data::Raw13(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw13", - &__self_0, - ) - } - Data::Raw14(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw14", - &__self_0, - ) - } - Data::Raw15(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw15", - &__self_0, - ) - } - Data::Raw16(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw16", - &__self_0, - ) - } - Data::Raw17(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw17", - &__self_0, - ) - } - Data::Raw18(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw18", - &__self_0, - ) - } - Data::Raw19(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw19", - &__self_0, - ) - } - Data::Raw20(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw20", - &__self_0, - ) - } - Data::Raw21(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw21", - &__self_0, - ) - } - Data::Raw22(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw22", - &__self_0, - ) - } - Data::Raw23(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw23", - &__self_0, - ) - } - Data::Raw24(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw24", - &__self_0, - ) - } - Data::Raw25(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw25", - &__self_0, - ) - } - Data::Raw26(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw26", - &__self_0, - ) - } - Data::Raw27(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw27", - &__self_0, - ) - } - Data::Raw28(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw28", - &__self_0, - ) - } - Data::Raw29(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw29", - &__self_0, - ) - } - Data::Raw30(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw30", - &__self_0, - ) - } - Data::Raw31(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw31", - &__self_0, - ) - } - Data::Raw32(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Raw32", - &__self_0, - ) - } - Data::BlakeTwo256(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "BlakeTwo256", - &__self_0, - ) - } - Data::Sha256(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Sha256", - &__self_0, - ) - } - Data::Keccak256(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Keccak256", - &__self_0, - ) - } - Data::ShaThree256(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ShaThree256", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum IdentityField { - #[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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for IdentityField { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `IdentityField`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(IdentityField::Display) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(IdentityField::Legal) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(IdentityField::Web) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(IdentityField::Riot) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(IdentityField::Email) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 32u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(IdentityField::PgpFingerprint) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 64u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(IdentityField::Image) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 128u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(IdentityField::Twitter) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `IdentityField`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for IdentityField { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - IdentityField::Display => 0_usize, - IdentityField::Legal => 0_usize, - IdentityField::Web => 0_usize, - IdentityField::Riot => 0_usize, - IdentityField::Email => 0_usize, - IdentityField::PgpFingerprint => 0_usize, - IdentityField::Image => 0_usize, - IdentityField::Twitter => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - IdentityField::Display => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - IdentityField::Legal => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - IdentityField::Web => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - IdentityField::Riot => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - IdentityField::Email => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - } - IdentityField::PgpFingerprint => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(32u8 as ::core::primitive::u8); - } - IdentityField::Image => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(64u8 as ::core::primitive::u8); - } - IdentityField::Twitter => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(128u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for IdentityField {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for IdentityField { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = IdentityField; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Display" { - return Ok(IdentityField::Display); - } - if value.name() == "Legal" { - return Ok(IdentityField::Legal); - } - if value.name() == "Web" { - return Ok(IdentityField::Web); - } - if value.name() == "Riot" { - return Ok(IdentityField::Riot); - } - if value.name() == "Email" { - return Ok(IdentityField::Email); - } - if value.name() == "PgpFingerprint" { - return Ok(IdentityField::PgpFingerprint); - } - if value.name() == "Image" { - return Ok(IdentityField::Image); - } - if value.name() == "Twitter" { - return Ok(IdentityField::Twitter); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Display", - "Legal", - "Web", - "Riot", - "Email", - "PgpFingerprint", - "Image", - "Twitter", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for IdentityField { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Display => { - ::subxt::ext::scale_encode::Variant { - name: "Display", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Legal => { - ::subxt::ext::scale_encode::Variant { - name: "Legal", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Web => { - ::subxt::ext::scale_encode::Variant { - name: "Web", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Riot => { - ::subxt::ext::scale_encode::Variant { - name: "Riot", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Email => { - ::subxt::ext::scale_encode::Variant { - name: "Email", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PgpFingerprint => { - ::subxt::ext::scale_encode::Variant { - name: "PgpFingerprint", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Image => { - ::subxt::ext::scale_encode::Variant { - name: "Image", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Twitter => { - ::subxt::ext::scale_encode::Variant { - name: "Twitter", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for IdentityField { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - IdentityField::Display => "Display", - IdentityField::Legal => "Legal", - IdentityField::Web => "Web", - IdentityField::Riot => "Riot", - IdentityField::Email => "Email", - IdentityField::PgpFingerprint => "PgpFingerprint", - IdentityField::Image => "Image", - IdentityField::Twitter => "Twitter", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IdentityInfo { - pub additional: runtime_types::bounded_collections::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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for IdentityInfo { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(IdentityInfo { - additional: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IdentityInfo::additional`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - display: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IdentityInfo::display`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - legal: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IdentityInfo::legal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - web: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IdentityInfo::web`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - riot: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IdentityInfo::riot`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - email: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IdentityInfo::email`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pgp_fingerprint: { - let __codec_res_edqy = <::core::option::Option< - [::core::primitive::u8; 20usize], - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IdentityInfo::pgp_fingerprint`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - image: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IdentityInfo::image`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - twitter: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IdentityInfo::twitter`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for IdentityInfo { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.additional), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.display), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.legal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.web), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.riot), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.email), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.pgp_fingerprint, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.image), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.twitter), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.additional, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.display, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.legal, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.web, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.riot, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.email, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.pgp_fingerprint, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.image, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.twitter, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for IdentityInfo {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for IdentityInfo { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = IdentityInfo; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(IdentityInfo { - additional: { - let val = *vals - .get(&Some("additional")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "additional".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("additional"))? - }, - display: { - let val = *vals - .get(&Some("display")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "display".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("display"))? - }, - legal: { - let val = *vals - .get(&Some("legal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "legal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("legal"))? - }, - web: { - let val = *vals - .get(&Some("web")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "web".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("web"))? - }, - riot: { - let val = *vals - .get(&Some("riot")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "riot".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("riot"))? - }, - email: { - let val = *vals - .get(&Some("email")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "email".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("email"))? - }, - pgp_fingerprint: { - let val = *vals - .get(&Some("pgp_fingerprint")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pgp_fingerprint".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("pgp_fingerprint"))? - }, - image: { - let val = *vals - .get(&Some("image")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "image".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("image"))? - }, - twitter: { - let val = *vals - .get(&Some("twitter")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "twitter".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("twitter"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 9usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 9usize, - }), - ); - } - let vals = value; - Ok(IdentityInfo { - additional: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("additional"))? - }, - display: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("display"))? - }, - legal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("legal"))? - }, - web: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("web"))? - }, - riot: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("riot"))? - }, - email: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("email"))? - }, - pgp_fingerprint: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("pgp_fingerprint"))? - }, - image: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("image"))? - }, - twitter: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("twitter"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for IdentityInfo { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for IdentityInfo { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IdentityInfo { - additional, - display, - legal, - web, - riot, - email, - pgp_fingerprint, - image, - twitter, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("additional"), - additional as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("display"), - display as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("legal"), - legal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("web"), - web as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("riot"), - riot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("email"), - email as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pgp_fingerprint"), - pgp_fingerprint - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("image"), - image as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("twitter"), - twitter as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for IdentityInfo { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IdentityInfo { - additional, - display, - legal, - web, - riot, - email, - pgp_fingerprint, - image, - twitter, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("additional"), - additional as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("display"), - display as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("legal"), - legal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("web"), - web as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("riot"), - riot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("email"), - email as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pgp_fingerprint"), - pgp_fingerprint - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("image"), - image as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("twitter"), - twitter as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for IdentityInfo { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "additional", - "display", - "legal", - "web", - "riot", - "email", - "pgp_fingerprint", - "image", - "twitter", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.additional, - &self.display, - &self.legal, - &self.web, - &self.riot, - &self.email, - &self.pgp_fingerprint, - &self.image, - &&self.twitter, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "IdentityInfo", - names, - values, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Judgement<_0> { - #[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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for Judgement<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Judgement`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Judgement::<_0>::Unknown) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Judgement::< - _0, - >::FeePaid({ - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Judgement::FeePaid.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Judgement::<_0>::Reasonable) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Judgement::<_0>::KnownGood) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Judgement::<_0>::OutOfDate) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Judgement::<_0>::LowQuality) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Judgement::<_0>::Erroneous) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Judgement`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for Judgement<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Judgement::Unknown => 0_usize, - Judgement::FeePaid(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Judgement::Reasonable => 0_usize, - Judgement::KnownGood => 0_usize, - Judgement::OutOfDate => 0_usize, - Judgement::LowQuality => 0_usize, - Judgement::Erroneous => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Judgement::Unknown => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Judgement::FeePaid(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Judgement::Reasonable => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Judgement::KnownGood => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Judgement::OutOfDate => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Judgement::LowQuality => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Judgement::Erroneous => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for Judgement<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for Judgement<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Judgement<_0>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Unknown" { - return Ok(Judgement::Unknown); - } - if value.name() == "FeePaid" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Judgement::FeePaid({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Reasonable" { - return Ok(Judgement::Reasonable); - } - if value.name() == "KnownGood" { - return Ok(Judgement::KnownGood); - } - if value.name() == "OutOfDate" { - return Ok(Judgement::OutOfDate); - } - if value.name() == "LowQuality" { - return Ok(Judgement::LowQuality); - } - if value.name() == "Erroneous" { - return Ok(Judgement::Erroneous); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Unknown", - "FeePaid", - "Reasonable", - "KnownGood", - "OutOfDate", - "LowQuality", - "Erroneous", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for Judgement<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Unknown => { - ::subxt::ext::scale_encode::Variant { - name: "Unknown", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FeePaid(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "FeePaid", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Reasonable => { - ::subxt::ext::scale_encode::Variant { - name: "Reasonable", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::KnownGood => { - ::subxt::ext::scale_encode::Variant { - name: "KnownGood", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OutOfDate => { - ::subxt::ext::scale_encode::Variant { - name: "OutOfDate", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LowQuality => { - ::subxt::ext::scale_encode::Variant { - name: "LowQuality", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Erroneous => { - ::subxt::ext::scale_encode::Variant { - name: "Erroneous", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for Judgement<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Judgement::Unknown => { - ::core::fmt::Formatter::write_str(f, "Unknown") - } - Judgement::FeePaid(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "FeePaid", - &__self_0, - ) - } - Judgement::Reasonable => { - ::core::fmt::Formatter::write_str(f, "Reasonable") - } - Judgement::KnownGood => { - ::core::fmt::Formatter::write_str(f, "KnownGood") - } - Judgement::OutOfDate => { - ::core::fmt::Formatter::write_str(f, "OutOfDate") - } - Judgement::LowQuality => { - ::core::fmt::Formatter::write_str(f, "LowQuality") - } - Judgement::Erroneous => { - ::core::fmt::Formatter::write_str(f, "Erroneous") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RegistrarInfo<_0, _1> { - pub account: _1, - pub fee: _0, - pub fields: runtime_types::pallet_identity::types::BitFlags< - runtime_types::pallet_identity::types::IdentityField, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode - for RegistrarInfo<_0, _1> - where - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RegistrarInfo::<_0, _1> { - account: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RegistrarInfo::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fee: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RegistrarInfo::fee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fields: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RegistrarInfo::fields`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode - for RegistrarInfo<_0, _1> - where - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.fee), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.fields), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.fee, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.fields, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for RegistrarInfo<_0, _1> - where - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>( - ::core::marker::PhantomData<(_0, _1)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for RegistrarInfo<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RegistrarInfo<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RegistrarInfo { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - fee: { - let val = *vals - .get(&Some("fee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - fields: { - let val = *vals - .get(&Some("fields")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fields".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fields"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(RegistrarInfo { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - fee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fee"))? - }, - fields: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fields"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for RegistrarInfo<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for RegistrarInfo<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RegistrarInfo { account, fee, fields } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee"), - fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fields"), - fields as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for RegistrarInfo<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RegistrarInfo { account, fee, fields } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee"), - fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fields"), - fields as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - > ::core::fmt::Debug for RegistrarInfo<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "RegistrarInfo", - "account", - &self.account, - "fee", - &self.fee, - "fields", - &&self.fields, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Registration<_0> { - pub judgements: runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - ::core::primitive::u32, - runtime_types::pallet_identity::types::Judgement<_0>, - ), - >, - pub deposit: _0, - pub info: runtime_types::pallet_identity::types::IdentityInfo, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for Registration<_0> - where - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - ::core::primitive::u32, - runtime_types::pallet_identity::types::Judgement<_0>, - ), - >: ::subxt::ext::codec::Decode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - ::core::primitive::u32, - runtime_types::pallet_identity::types::Judgement<_0>, - ), - >: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Registration::<_0> { - judgements: { - let __codec_res_edqy = , - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Registration::judgements`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Registration::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - info: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Registration::info`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for Registration<_0> - where - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - ::core::primitive::u32, - runtime_types::pallet_identity::types::Judgement<_0>, - ), - >: ::subxt::ext::codec::Encode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - ::core::primitive::u32, - runtime_types::pallet_identity::types::Judgement<_0>, - ), - >: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.judgements), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deposit), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.info), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.judgements, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.info, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for Registration<_0> - where - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - ::core::primitive::u32, - runtime_types::pallet_identity::types::Judgement<_0>, - ), - >: ::subxt::ext::codec::Encode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ( - ::core::primitive::u32, - runtime_types::pallet_identity::types::Judgement<_0>, - ), - >: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for Registration<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Registration<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Registration { - judgements: { - let val = *vals - .get(&Some("judgements")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "judgements".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("judgements"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - info: { - let val = *vals - .get(&Some("info")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "info".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("info"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Registration { - judgements: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("judgements"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - info: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("info"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for Registration<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for Registration<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Registration { judgements, deposit, info } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("judgements"), - judgements as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("info"), - info as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for Registration<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Registration { judgements, deposit, info } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("judgements"), - judgements as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("info"), - info as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for Registration<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Registration", - "judgements", - &self.judgements, - "deposit", - &self.deposit, - "info", - &&self.info, - ) - } - } - } - } - pub mod pallet_im_online { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - heartbeat { - heartbeat: runtime_types::pallet_im_online::Heartbeat< - ::core::primitive::u32, - >, - signature: runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::heartbeat { - heartbeat: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::heartbeat::heartbeat`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - signature: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::heartbeat::signature`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::heartbeat { ref heartbeat, ref signature } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(heartbeat), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(signature), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::heartbeat { ref heartbeat, ref signature } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - heartbeat, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - signature, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "heartbeat" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::heartbeat { - heartbeat: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("heartbeat"))? - }, - signature: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::heartbeat { - heartbeat: { - let val = *vals - .get(&Some("heartbeat")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "heartbeat".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("heartbeat"))? - }, - signature: { - let val = *vals - .get(&Some("signature")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "signature".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["heartbeat"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::heartbeat { heartbeat, signature } => { - ::subxt::ext::scale_encode::Variant { - name: "heartbeat", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("heartbeat"), - heartbeat as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("signature"), - signature as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::heartbeat { - heartbeat: __self_0, - signature: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "heartbeat", - "heartbeat", - __self_0, - "signature", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - InvalidKey, - #[codec(index = 1)] - DuplicatedHeartbeat, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidKey) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::DuplicatedHeartbeat) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::InvalidKey => 0_usize, - Error::DuplicatedHeartbeat => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::InvalidKey => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::DuplicatedHeartbeat => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "InvalidKey" { - return Ok(Error::InvalidKey); - } - if value.name() == "DuplicatedHeartbeat" { - return Ok(Error::DuplicatedHeartbeat); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "InvalidKey", - "DuplicatedHeartbeat", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::InvalidKey => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidKey", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DuplicatedHeartbeat => { - ::subxt::ext::scale_encode::Variant { - name: "DuplicatedHeartbeat", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::InvalidKey => "InvalidKey", - Error::DuplicatedHeartbeat => "DuplicatedHeartbeat", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - HeartbeatReceived { - authority_id: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - }, - #[codec(index = 1)] - AllGood, - #[codec(index = 2)] - SomeOffline { - offline: ::std::vec::Vec< - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - ), - >, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::HeartbeatReceived { - authority_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::HeartbeatReceived::authority_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::AllGood) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::SomeOffline { - offline: { - let __codec_res_edqy = <::std::vec::Vec< - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::SomeOffline::offline`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::HeartbeatReceived { ref authority_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(authority_id), - ) - } - Event::AllGood => 0_usize, - Event::SomeOffline { ref offline } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(offline), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::HeartbeatReceived { ref authority_id } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - authority_id, - __codec_dest_edqy, - ); - } - Event::AllGood => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Event::SomeOffline { ref offline } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - offline, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "HeartbeatReceived" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::HeartbeatReceived { - authority_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::HeartbeatReceived { - authority_id: { - let val = *vals - .get(&Some("authority_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "authority_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_id"))? - }, - }) - }; - } - if value.name() == "AllGood" { - return Ok(Event::AllGood); - } - if value.name() == "SomeOffline" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::SomeOffline { - offline: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("offline"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::SomeOffline { - offline: { - let val = *vals - .get(&Some("offline")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "offline".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("offline"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "HeartbeatReceived", - "AllGood", - "SomeOffline", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::HeartbeatReceived { authority_id } => { - ::subxt::ext::scale_encode::Variant { - name: "HeartbeatReceived", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("authority_id"), - authority_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AllGood => { - ::subxt::ext::scale_encode::Variant { - name: "AllGood", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SomeOffline { offline } => { - ::subxt::ext::scale_encode::Variant { - name: "SomeOffline", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("offline"), - offline as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::HeartbeatReceived { authority_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "HeartbeatReceived", - "authority_id", - &__self_0, - ) - } - Event::AllGood => { - ::core::fmt::Formatter::write_str(f, "AllGood") - } - Event::SomeOffline { offline: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SomeOffline", - "offline", - &__self_0, - ) - } - } - } - } - } - pub mod sr25519 { - use super::runtime_types; - pub mod app_sr25519 { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub runtime_types::sp_core::sr25519::Public); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Public { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Public({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Public.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Public { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Public {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Public { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Public; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Public({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Public { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Public { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Public { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Public { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Public", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Signature( - pub runtime_types::sp_core::sr25519::Signature, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Signature { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Signature({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Signature.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Signature { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Signature {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Signature { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Signature; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Signature({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for Signature { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Signature { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Signature(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Signature { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Signature(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Signature { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Signature", - &&self.0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BoundedOpaqueNetworkState { - pub peer_id: runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, - pub external_addresses: runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BoundedOpaqueNetworkState { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BoundedOpaqueNetworkState { - peer_id: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BoundedOpaqueNetworkState::peer_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - external_addresses: { - let __codec_res_edqy = , - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BoundedOpaqueNetworkState::external_addresses`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BoundedOpaqueNetworkState { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.peer_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.external_addresses, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.peer_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.external_addresses, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BoundedOpaqueNetworkState {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for BoundedOpaqueNetworkState { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BoundedOpaqueNetworkState; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BoundedOpaqueNetworkState { - peer_id: { - let val = *vals - .get(&Some("peer_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "peer_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("peer_id"))? - }, - external_addresses: { - let val = *vals - .get(&Some("external_addresses")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "external_addresses".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("external_addresses"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(BoundedOpaqueNetworkState { - peer_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("peer_id"))? - }, - external_addresses: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("external_addresses"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for BoundedOpaqueNetworkState { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for BoundedOpaqueNetworkState { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BoundedOpaqueNetworkState { peer_id, external_addresses } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("peer_id"), - peer_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("external_addresses"), - external_addresses - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for BoundedOpaqueNetworkState { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BoundedOpaqueNetworkState { peer_id, external_addresses } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("peer_id"), - peer_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("external_addresses"), - external_addresses - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BoundedOpaqueNetworkState { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "BoundedOpaqueNetworkState", - "peer_id", - &self.peer_id, - "external_addresses", - &&self.external_addresses, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Heartbeat<_0> { - pub block_number: _0, - pub network_state: runtime_types::sp_core::offchain::OpaqueNetworkState, - pub session_index: ::core::primitive::u32, - pub authority_index: ::core::primitive::u32, - pub validators_len: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for Heartbeat<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Heartbeat::<_0> { - block_number: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Heartbeat::block_number`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - network_state: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Heartbeat::network_state`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - session_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Heartbeat::session_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - authority_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Heartbeat::authority_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validators_len: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Heartbeat::validators_len`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for Heartbeat<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.block_number), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.network_state), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.session_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.authority_index, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.validators_len), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.block_number, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.network_state, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.session_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.authority_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validators_len, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for Heartbeat<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor for Heartbeat<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Heartbeat<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Heartbeat { - block_number: { - let val = *vals - .get(&Some("block_number")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "block_number".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("block_number"))? - }, - network_state: { - let val = *vals - .get(&Some("network_state")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "network_state".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("network_state"))? - }, - session_index: { - let val = *vals - .get(&Some("session_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "session_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("session_index"))? - }, - authority_index: { - let val = *vals - .get(&Some("authority_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "authority_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_index"))? - }, - validators_len: { - let val = *vals - .get(&Some("validators_len")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validators_len".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validators_len"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(Heartbeat { - block_number: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("block_number"))? - }, - network_state: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("network_state"))? - }, - session_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("session_index"))? - }, - authority_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_index"))? - }, - validators_len: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validators_len"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields for Heartbeat<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for Heartbeat<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Heartbeat { - block_number, - network_state, - session_index, - authority_index, - validators_len, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("block_number"), - block_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("network_state"), - network_state - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("session_index"), - session_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("authority_index"), - authority_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validators_len"), - validators_len - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields for Heartbeat<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Heartbeat { - block_number, - network_state, - session_index, - authority_index, - validators_len, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("block_number"), - block_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("network_state"), - network_state - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("session_index"), - session_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("authority_index"), - authority_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validators_len"), - validators_len - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for Heartbeat<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "Heartbeat", - "block_number", - &self.block_number, - "network_state", - &self.network_state, - "session_index", - &self.session_index, - "authority_index", - &self.authority_index, - "validators_len", - &&self.validators_len, - ) - } - } - } - pub mod pallet_indices { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - claim { index: ::core::primitive::u32 }, - #[codec(index = 1)] - transfer { - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - index: ::core::primitive::u32, - }, - #[codec(index = 2)] - free { index: ::core::primitive::u32 }, - #[codec(index = 3)] - force_transfer { - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - index: ::core::primitive::u32, - freeze: ::core::primitive::bool, - }, - #[codec(index = 4)] - freeze { index: ::core::primitive::u32 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::claim { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::claim::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::transfer { - new: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::transfer::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::transfer::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::free { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::free::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_transfer { - new: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_transfer::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_transfer::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - freeze: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_transfer::freeze`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::freeze { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::freeze::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::claim { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Call::transfer { ref new, ref index } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Call::free { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Call::force_transfer { ref new, ref index, ref freeze } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(freeze), - ) - } - Call::freeze { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::claim { ref index } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Call::transfer { ref new, ref index } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Call::free { ref index } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Call::force_transfer { ref new, ref index, ref freeze } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - freeze, - __codec_dest_edqy, - ); - } - Call::freeze { ref index } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "claim" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::claim { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::claim { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "transfer" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::transfer { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::transfer { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "free" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::free { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::free { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "force_transfer" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::force_transfer { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - freeze: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("freeze"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_transfer { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - freeze: { - let val = *vals - .get(&Some("freeze")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "freeze".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("freeze"))? - }, - }) - }; - } - if value.name() == "freeze" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::freeze { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::freeze { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "claim", - "transfer", - "free", - "force_transfer", - "freeze", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::claim { index } => { - ::subxt::ext::scale_encode::Variant { - name: "claim", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::transfer { new, index } => { - ::subxt::ext::scale_encode::Variant { - name: "transfer", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::free { index } => { - ::subxt::ext::scale_encode::Variant { - name: "free", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_transfer { new, index, freeze } => { - ::subxt::ext::scale_encode::Variant { - name: "force_transfer", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("freeze"), - freeze as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::freeze { index } => { - ::subxt::ext::scale_encode::Variant { - name: "freeze", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::claim { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "claim", - "index", - &__self_0, - ) - } - Call::transfer { new: __self_0, index: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "transfer", - "new", - __self_0, - "index", - &__self_1, - ) - } - Call::free { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "free", - "index", - &__self_0, - ) - } - Call::force_transfer { - new: __self_0, - index: __self_1, - freeze: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "force_transfer", - "new", - __self_0, - "index", - __self_1, - "freeze", - &__self_2, - ) - } - Call::freeze { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "freeze", - "index", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - NotAssigned, - #[codec(index = 1)] - NotOwner, - #[codec(index = 2)] - InUse, - #[codec(index = 3)] - NotTransfer, - #[codec(index = 4)] - Permanent, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotAssigned) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotOwner) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InUse) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotTransfer) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Permanent) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::NotAssigned => 0_usize, - Error::NotOwner => 0_usize, - Error::InUse => 0_usize, - Error::NotTransfer => 0_usize, - Error::Permanent => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::NotAssigned => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::NotOwner => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::InUse => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::NotTransfer => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::Permanent => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NotAssigned" { - return Ok(Error::NotAssigned); - } - if value.name() == "NotOwner" { - return Ok(Error::NotOwner); - } - if value.name() == "InUse" { - return Ok(Error::InUse); - } - if value.name() == "NotTransfer" { - return Ok(Error::NotTransfer); - } - if value.name() == "Permanent" { - return Ok(Error::Permanent); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "NotAssigned", - "NotOwner", - "InUse", - "NotTransfer", - "Permanent", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NotAssigned => { - ::subxt::ext::scale_encode::Variant { - name: "NotAssigned", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotOwner => { - ::subxt::ext::scale_encode::Variant { - name: "NotOwner", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InUse => { - ::subxt::ext::scale_encode::Variant { - name: "InUse", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotTransfer => { - ::subxt::ext::scale_encode::Variant { - name: "NotTransfer", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Permanent => { - ::subxt::ext::scale_encode::Variant { - name: "Permanent", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::NotAssigned => "NotAssigned", - Error::NotOwner => "NotOwner", - Error::InUse => "InUse", - Error::NotTransfer => "NotTransfer", - Error::Permanent => "Permanent", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - IndexAssigned { - who: ::subxt::utils::AccountId32, - index: ::core::primitive::u32, - }, - #[codec(index = 1)] - IndexFreed { index: ::core::primitive::u32 }, - #[codec(index = 2)] - IndexFrozen { - index: ::core::primitive::u32, - who: ::subxt::utils::AccountId32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::IndexAssigned { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::IndexAssigned::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::IndexAssigned::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::IndexFreed { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::IndexFreed::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::IndexFrozen { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::IndexFrozen::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::IndexFrozen::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::IndexAssigned { ref who, ref index } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Event::IndexFreed { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Event::IndexFrozen { ref index, ref who } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::IndexAssigned { ref who, ref index } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Event::IndexFreed { ref index } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Event::IndexFrozen { ref index, ref who } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "IndexAssigned" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::IndexAssigned { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::IndexAssigned { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "IndexFreed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::IndexFreed { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::IndexFreed { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "IndexFrozen" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::IndexFrozen { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::IndexFrozen { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "IndexAssigned", - "IndexFreed", - "IndexFrozen", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::IndexAssigned { who, index } => { - ::subxt::ext::scale_encode::Variant { - name: "IndexAssigned", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::IndexFreed { index } => { - ::subxt::ext::scale_encode::Variant { - name: "IndexFreed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::IndexFrozen { index, who } => { - ::subxt::ext::scale_encode::Variant { - name: "IndexFrozen", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::IndexAssigned { who: __self_0, index: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "IndexAssigned", - "who", - __self_0, - "index", - &__self_1, - ) - } - Event::IndexFreed { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "IndexFreed", - "index", - &__self_0, - ) - } - Event::IndexFrozen { index: __self_0, who: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "IndexFrozen", - "index", - __self_0, - "who", - &__self_1, - ) - } - } - } - } - } - } - pub mod pallet_membership { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - add_member { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 1)] - remove_member { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 2)] - swap_member { - remove: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - add: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 3)] - reset_members { - members: ::std::vec::Vec<::subxt::utils::AccountId32>, - }, - #[codec(index = 4)] - change_key { - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 5)] - set_prime { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 6)] - clear_prime, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::add_member { - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::add_member::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::remove_member { - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::remove_member::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::swap_member { - remove: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::swap_member::remove`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - add: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::swap_member::add`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::reset_members { - members: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::reset_members::members`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::change_key { - new: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::change_key::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_prime { - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_prime::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::clear_prime) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::add_member { ref who } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - } - Call::remove_member { ref who } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - } - Call::swap_member { ref remove, ref add } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(remove), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(add)) - } - Call::reset_members { ref members } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(members), - ) - } - Call::change_key { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_prime { ref who } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - } - Call::clear_prime => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::add_member { ref who } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - } - Call::remove_member { ref who } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - } - Call::swap_member { ref remove, ref add } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - remove, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - add, - __codec_dest_edqy, - ); - } - Call::reset_members { ref members } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - members, - __codec_dest_edqy, - ); - } - Call::change_key { ref new } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_prime { ref who } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - } - Call::clear_prime => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "add_member" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::add_member { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::add_member { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - }; - } - if value.name() == "remove_member" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::remove_member { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::remove_member { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - }; - } - if value.name() == "swap_member" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::swap_member { - remove: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("remove"))? - }, - add: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("add"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::swap_member { - remove: { - let val = *vals - .get(&Some("remove")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "remove".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("remove"))? - }, - add: { - let val = *vals - .get(&Some("add")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "add".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("add"))? - }, - }) - }; - } - if value.name() == "reset_members" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::reset_members { - members: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("members"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::reset_members { - members: { - let val = *vals - .get(&Some("members")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "members".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("members"))? - }, - }) - }; - } - if value.name() == "change_key" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::change_key { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::change_key { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_prime" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_prime { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_prime { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - }; - } - if value.name() == "clear_prime" { - return Ok(Call::clear_prime); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "add_member", - "remove_member", - "swap_member", - "reset_members", - "change_key", - "set_prime", - "clear_prime", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::add_member { who } => { - ::subxt::ext::scale_encode::Variant { - name: "add_member", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::remove_member { who } => { - ::subxt::ext::scale_encode::Variant { - name: "remove_member", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::swap_member { remove, add } => { - ::subxt::ext::scale_encode::Variant { - name: "swap_member", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("remove"), - remove as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("add"), - add as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::reset_members { members } => { - ::subxt::ext::scale_encode::Variant { - name: "reset_members", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("members"), - members as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::change_key { new } => { - ::subxt::ext::scale_encode::Variant { - name: "change_key", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_prime { who } => { - ::subxt::ext::scale_encode::Variant { - name: "set_prime", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::clear_prime => { - ::subxt::ext::scale_encode::Variant { - name: "clear_prime", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::add_member { who: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "add_member", - "who", - &__self_0, - ) - } - Call::remove_member { who: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "remove_member", - "who", - &__self_0, - ) - } - Call::swap_member { remove: __self_0, add: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "swap_member", - "remove", - __self_0, - "add", - &__self_1, - ) - } - Call::reset_members { members: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "reset_members", - "members", - &__self_0, - ) - } - Call::change_key { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "change_key", - "new", - &__self_0, - ) - } - Call::set_prime { who: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_prime", - "who", - &__self_0, - ) - } - Call::clear_prime => { - ::core::fmt::Formatter::write_str(f, "clear_prime") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - AlreadyMember, - #[codec(index = 1)] - NotMember, - #[codec(index = 2)] - TooManyMembers, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyMember) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotMember) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyMembers) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::AlreadyMember => 0_usize, - Error::NotMember => 0_usize, - Error::TooManyMembers => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::AlreadyMember => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::NotMember => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::TooManyMembers => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "AlreadyMember" { - return Ok(Error::AlreadyMember); - } - if value.name() == "NotMember" { - return Ok(Error::NotMember); - } - if value.name() == "TooManyMembers" { - return Ok(Error::TooManyMembers); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "AlreadyMember", - "NotMember", - "TooManyMembers", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::AlreadyMember => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyMember", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotMember => { - ::subxt::ext::scale_encode::Variant { - name: "NotMember", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyMembers => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyMembers", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::AlreadyMember => "AlreadyMember", - Error::NotMember => "NotMember", - Error::TooManyMembers => "TooManyMembers", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - MemberAdded, - #[codec(index = 1)] - MemberRemoved, - #[codec(index = 2)] - MembersSwapped, - #[codec(index = 3)] - MembersReset, - #[codec(index = 4)] - KeyChanged, - #[codec(index = 5)] - Dummy, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::MemberAdded) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::MemberRemoved) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::MembersSwapped) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::MembersReset) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::KeyChanged) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Dummy) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::MemberAdded => 0_usize, - Event::MemberRemoved => 0_usize, - Event::MembersSwapped => 0_usize, - Event::MembersReset => 0_usize, - Event::KeyChanged => 0_usize, - Event::Dummy => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::MemberAdded => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Event::MemberRemoved => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Event::MembersSwapped => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Event::MembersReset => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Event::KeyChanged => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Event::Dummy => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "MemberAdded" { - return Ok(Event::MemberAdded); - } - if value.name() == "MemberRemoved" { - return Ok(Event::MemberRemoved); - } - if value.name() == "MembersSwapped" { - return Ok(Event::MembersSwapped); - } - if value.name() == "MembersReset" { - return Ok(Event::MembersReset); - } - if value.name() == "KeyChanged" { - return Ok(Event::KeyChanged); - } - if value.name() == "Dummy" { - return Ok(Event::Dummy); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "MemberAdded", - "MemberRemoved", - "MembersSwapped", - "MembersReset", - "KeyChanged", - "Dummy", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::MemberAdded => { - ::subxt::ext::scale_encode::Variant { - name: "MemberAdded", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MemberRemoved => { - ::subxt::ext::scale_encode::Variant { - name: "MemberRemoved", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MembersSwapped => { - ::subxt::ext::scale_encode::Variant { - name: "MembersSwapped", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MembersReset => { - ::subxt::ext::scale_encode::Variant { - name: "MembersReset", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::KeyChanged => { - ::subxt::ext::scale_encode::Variant { - name: "KeyChanged", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Dummy => { - ::subxt::ext::scale_encode::Variant { - name: "Dummy", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Event::MemberAdded => "MemberAdded", - Event::MemberRemoved => "MemberRemoved", - Event::MembersSwapped => "MembersSwapped", - Event::MembersReset => "MembersReset", - Event::KeyChanged => "KeyChanged", - Event::Dummy => "Dummy", - }, - ) - } - } - } - } - pub mod pallet_message_queue { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - reap_page { - message_origin: runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - page_index: ::core::primitive::u32, - }, - #[codec(index = 1)] - execute_overweight { - message_origin: runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - page: ::core::primitive::u32, - index: ::core::primitive::u32, - weight_limit: runtime_types::sp_weights::weight_v2::Weight, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::reap_page { - message_origin: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::reap_page::message_origin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - page_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::reap_page::page_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::execute_overweight { - message_origin: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::execute_overweight::message_origin`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - page: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::execute_overweight::page`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::execute_overweight::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - weight_limit: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::execute_overweight::weight_limit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::reap_page { ref message_origin, ref page_index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(message_origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(page_index), - ) - } - Call::execute_overweight { - ref message_origin, - ref page, - ref index, - ref weight_limit, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(message_origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(page), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(weight_limit), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::reap_page { ref message_origin, ref page_index } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - message_origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - page_index, - __codec_dest_edqy, - ); - } - Call::execute_overweight { - ref message_origin, - ref page, - ref index, - ref weight_limit, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - message_origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - page, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - weight_limit, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "reap_page" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::reap_page { - message_origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("message_origin"))? - }, - page_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("page_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::reap_page { - message_origin: { - let val = *vals - .get(&Some("message_origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "message_origin".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("message_origin"))? - }, - page_index: { - let val = *vals - .get(&Some("page_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "page_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("page_index"))? - }, - }) - }; - } - if value.name() == "execute_overweight" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Call::execute_overweight { - message_origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("message_origin"))? - }, - page: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("page"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - weight_limit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::execute_overweight { - message_origin: { - let val = *vals - .get(&Some("message_origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "message_origin".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("message_origin"))? - }, - page: { - let val = *vals - .get(&Some("page")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "page".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("page"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - weight_limit: { - let val = *vals - .get(&Some("weight_limit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "weight_limit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "reap_page", - "execute_overweight", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::reap_page { message_origin, page_index } => { - ::subxt::ext::scale_encode::Variant { - name: "reap_page", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("message_origin"), - message_origin - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("page_index"), - page_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::execute_overweight { - message_origin, - page, - index, - weight_limit, - } => { - ::subxt::ext::scale_encode::Variant { - name: "execute_overweight", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("message_origin"), - message_origin - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("page"), - page as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight_limit"), - weight_limit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::reap_page { - message_origin: __self_0, - page_index: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "reap_page", - "message_origin", - __self_0, - "page_index", - &__self_1, - ) - } - Call::execute_overweight { - message_origin: __self_0, - page: __self_1, - index: __self_2, - weight_limit: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "execute_overweight", - "message_origin", - __self_0, - "page", - __self_1, - "index", - __self_2, - "weight_limit", - &__self_3, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - NotReapable, - #[codec(index = 1)] - NoPage, - #[codec(index = 2)] - NoMessage, - #[codec(index = 3)] - AlreadyProcessed, - #[codec(index = 4)] - Queued, - #[codec(index = 5)] - InsufficientWeight, - #[codec(index = 6)] - TemporarilyUnprocessable, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotReapable) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoPage) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoMessage) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyProcessed) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Queued) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InsufficientWeight) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TemporarilyUnprocessable) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::NotReapable => 0_usize, - Error::NoPage => 0_usize, - Error::NoMessage => 0_usize, - Error::AlreadyProcessed => 0_usize, - Error::Queued => 0_usize, - Error::InsufficientWeight => 0_usize, - Error::TemporarilyUnprocessable => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::NotReapable => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::NoPage => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::NoMessage => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::AlreadyProcessed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::Queued => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::InsufficientWeight => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::TemporarilyUnprocessable => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NotReapable" { - return Ok(Error::NotReapable); - } - if value.name() == "NoPage" { - return Ok(Error::NoPage); - } - if value.name() == "NoMessage" { - return Ok(Error::NoMessage); - } - if value.name() == "AlreadyProcessed" { - return Ok(Error::AlreadyProcessed); - } - if value.name() == "Queued" { - return Ok(Error::Queued); - } - if value.name() == "InsufficientWeight" { - return Ok(Error::InsufficientWeight); - } - if value.name() == "TemporarilyUnprocessable" { - return Ok(Error::TemporarilyUnprocessable); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "NotReapable", - "NoPage", - "NoMessage", - "AlreadyProcessed", - "Queued", - "InsufficientWeight", - "TemporarilyUnprocessable", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NotReapable => { - ::subxt::ext::scale_encode::Variant { - name: "NotReapable", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoPage => { - ::subxt::ext::scale_encode::Variant { - name: "NoPage", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoMessage => { - ::subxt::ext::scale_encode::Variant { - name: "NoMessage", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyProcessed => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyProcessed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Queued => { - ::subxt::ext::scale_encode::Variant { - name: "Queued", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InsufficientWeight => { - ::subxt::ext::scale_encode::Variant { - name: "InsufficientWeight", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TemporarilyUnprocessable => { - ::subxt::ext::scale_encode::Variant { - name: "TemporarilyUnprocessable", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::NotReapable => "NotReapable", - Error::NoPage => "NoPage", - Error::NoMessage => "NoMessage", - Error::AlreadyProcessed => "AlreadyProcessed", - Error::Queued => "Queued", - Error::InsufficientWeight => "InsufficientWeight", - Error::TemporarilyUnprocessable => { - "TemporarilyUnprocessable" - } - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - ProcessingFailed { - id: [::core::primitive::u8; 32usize], - origin: runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - error: runtime_types::frame_support::traits::messages::ProcessMessageError, - }, - #[codec(index = 1)] - Processed { - id: [::core::primitive::u8; 32usize], - origin: runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - weight_used: runtime_types::sp_weights::weight_v2::Weight, - success: ::core::primitive::bool, - }, - #[codec(index = 2)] - OverweightEnqueued { - id: [::core::primitive::u8; 32usize], - origin: runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - page_index: ::core::primitive::u32, - message_index: ::core::primitive::u32, - }, - #[codec(index = 3)] - PageReaped { - origin: runtime_types::polkadot_runtime_parachains::inclusion::AggregateMessageOrigin, - index: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ProcessingFailed { - id: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ProcessingFailed::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - origin: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::ProcessingFailed::origin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - error: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ProcessingFailed::error`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Processed { - id: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Processed::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - origin: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Processed::origin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - weight_used: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Processed::weight_used`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - success: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Processed::success`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::OverweightEnqueued { - id: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::OverweightEnqueued::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - origin: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::OverweightEnqueued::origin`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - page_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::OverweightEnqueued::page_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - message_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::OverweightEnqueued::message_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::PageReaped { - origin: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PageReaped::origin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PageReaped::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::ProcessingFailed { - ref id, - ref origin, - ref error, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(error), - ) - } - Event::Processed { - ref id, - ref origin, - ref weight_used, - ref success, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(weight_used), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(success), - ) - } - Event::OverweightEnqueued { - ref id, - ref origin, - ref page_index, - ref message_index, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(page_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(message_index), - ) - } - Event::PageReaped { ref origin, ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::ProcessingFailed { - ref id, - ref origin, - ref error, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - error, - __codec_dest_edqy, - ); - } - Event::Processed { - ref id, - ref origin, - ref weight_used, - ref success, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - weight_used, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - success, - __codec_dest_edqy, - ); - } - Event::OverweightEnqueued { - ref id, - ref origin, - ref page_index, - ref message_index, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - page_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - message_index, - __codec_dest_edqy, - ); - } - Event::PageReaped { ref origin, ref index } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "ProcessingFailed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::ProcessingFailed { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - error: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("error"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::ProcessingFailed { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - origin: { - let val = *vals - .get(&Some("origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "origin".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - error: { - let val = *vals - .get(&Some("error")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "error".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("error"))? - }, - }) - }; - } - if value.name() == "Processed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Event::Processed { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - weight_used: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("weight_used"))? - }, - success: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("success"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Processed { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - origin: { - let val = *vals - .get(&Some("origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "origin".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - weight_used: { - let val = *vals - .get(&Some("weight_used")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "weight_used".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("weight_used"))? - }, - success: { - let val = *vals - .get(&Some("success")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "success".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("success"))? - }, - }) - }; - } - if value.name() == "OverweightEnqueued" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Event::OverweightEnqueued { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - page_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("page_index"))? - }, - message_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("message_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::OverweightEnqueued { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - origin: { - let val = *vals - .get(&Some("origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "origin".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - page_index: { - let val = *vals - .get(&Some("page_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "page_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("page_index"))? - }, - message_index: { - let val = *vals - .get(&Some("message_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "message_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("message_index"))? - }, - }) - }; - } - if value.name() == "PageReaped" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::PageReaped { - origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::PageReaped { - origin: { - let val = *vals - .get(&Some("origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "origin".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "ProcessingFailed", - "Processed", - "OverweightEnqueued", - "PageReaped", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::ProcessingFailed { id, origin, error } => { - ::subxt::ext::scale_encode::Variant { - name: "ProcessingFailed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("error"), - error as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Processed { id, origin, weight_used, success } => { - ::subxt::ext::scale_encode::Variant { - name: "Processed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight_used"), - weight_used as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("success"), - success as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OverweightEnqueued { - id, - origin, - page_index, - message_index, - } => { - ::subxt::ext::scale_encode::Variant { - name: "OverweightEnqueued", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("page_index"), - page_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("message_index"), - message_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PageReaped { origin, index } => { - ::subxt::ext::scale_encode::Variant { - name: "PageReaped", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::ProcessingFailed { - id: __self_0, - origin: __self_1, - error: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ProcessingFailed", - "id", - __self_0, - "origin", - __self_1, - "error", - &__self_2, - ) - } - Event::Processed { - id: __self_0, - origin: __self_1, - weight_used: __self_2, - success: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Processed", - "id", - __self_0, - "origin", - __self_1, - "weight_used", - __self_2, - "success", - &__self_3, - ) - } - Event::OverweightEnqueued { - id: __self_0, - origin: __self_1, - page_index: __self_2, - message_index: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "OverweightEnqueued", - "id", - __self_0, - "origin", - __self_1, - "page_index", - __self_2, - "message_index", - &__self_3, - ) - } - Event::PageReaped { origin: __self_0, index: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PageReaped", - "origin", - __self_0, - "index", - &__self_1, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct 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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for BookState<_0> - where - ::core::option::Option< - runtime_types::pallet_message_queue::Neighbours<_0>, - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_message_queue::Neighbours<_0>, - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BookState::<_0> { - begin: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BookState::begin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - end: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BookState::end`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - count: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BookState::count`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ready_neighbours: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::pallet_message_queue::Neighbours<_0>, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BookState::ready_neighbours`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - message_count: { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BookState::message_count`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - size: { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BookState::size`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for BookState<_0> - where - ::core::option::Option< - runtime_types::pallet_message_queue::Neighbours<_0>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_message_queue::Neighbours<_0>, - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.begin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.end), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.count), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.ready_neighbours, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.message_count), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.size), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.begin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.end, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.count, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.ready_neighbours, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.message_count, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.size, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for BookState<_0> - where - ::core::option::Option< - runtime_types::pallet_message_queue::Neighbours<_0>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_message_queue::Neighbours<_0>, - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor for BookState<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BookState<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BookState { - begin: { - let val = *vals - .get(&Some("begin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "begin".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("begin"))? - }, - end: { - let val = *vals - .get(&Some("end")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "end".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - count: { - let val = *vals - .get(&Some("count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "count".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("count"))? - }, - ready_neighbours: { - let val = *vals - .get(&Some("ready_neighbours")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ready_neighbours".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("ready_neighbours"))? - }, - message_count: { - let val = *vals - .get(&Some("message_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "message_count".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("message_count"))? - }, - size: { - let val = *vals - .get(&Some("size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "size".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("size"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = value; - Ok(BookState { - begin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("begin"))? - }, - end: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("count"))? - }, - ready_neighbours: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("ready_neighbours"))? - }, - message_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("message_count"))? - }, - size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("size"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields for BookState<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for BookState<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BookState { - begin, - end, - count, - ready_neighbours, - message_count, - size, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("begin"), - begin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("end"), - end as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("count"), - count as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ready_neighbours"), - ready_neighbours - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("message_count"), - message_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("size"), - size as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields for BookState<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BookState { - begin, - end, - count, - ready_neighbours, - message_count, - size, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("begin"), - begin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("end"), - end as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("count"), - count as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ready_neighbours"), - ready_neighbours - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("message_count"), - message_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("size"), - size as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for BookState<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "begin", - "end", - "count", - "ready_neighbours", - "message_count", - "size", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.begin, - &self.end, - &self.count, - &self.ready_neighbours, - &self.message_count, - &&self.size, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "BookState", - names, - values, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for Neighbours<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Neighbours::<_0> { - prev: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Neighbours::prev`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - next: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Neighbours::next`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for Neighbours<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.prev), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.next), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.prev, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.next, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for Neighbours<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor for Neighbours<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Neighbours<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Neighbours { - prev: { - let val = *vals - .get(&Some("prev")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prev".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prev"))? - }, - next: { - let val = *vals - .get(&Some("next")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "next".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("next"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Neighbours { - prev: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prev"))? - }, - next: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("next"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for Neighbours<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for Neighbours<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Neighbours { prev, next } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("prev"), - prev as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("next"), - next as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields for Neighbours<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Neighbours { prev, next } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("prev"), - prev as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("next"), - next as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for Neighbours<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Neighbours", - "prev", - &self.prev, - "next", - &&self.next, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[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::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for Page<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Page::<_0> { - remaining: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Page::remaining`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - remaining_size: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Page::remaining_size`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - first_index: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Page::first_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - first: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Page::first`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - last: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Page::last`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - heap: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Page::heap`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for Page<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.remaining), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.remaining_size), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.first_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.first), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.last), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.heap), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.remaining, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.remaining_size, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.first_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.first, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.last, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.heap, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for Page<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor for Page<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Page<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Page { - remaining: { - let val = *vals - .get(&Some("remaining")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "remaining".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("remaining"))? - }, - remaining_size: { - let val = *vals - .get(&Some("remaining_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "remaining_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("remaining_size"))? - }, - first_index: { - let val = *vals - .get(&Some("first_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "first_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("first_index"))? - }, - first: { - let val = *vals - .get(&Some("first")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "first".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("first"))? - }, - last: { - let val = *vals - .get(&Some("last")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "last".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("last"))? - }, - heap: { - let val = *vals - .get(&Some("heap")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "heap".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("heap"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = value; - Ok(Page { - remaining: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("remaining"))? - }, - remaining_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("remaining_size"))? - }, - first_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("first_index"))? - }, - first: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("first"))? - }, - last: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("last"))? - }, - heap: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("heap"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields for Page<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for Page<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Page { - remaining, - remaining_size, - first_index, - first, - last, - heap, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("remaining"), - remaining as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("remaining_size"), - remaining_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_index"), - first_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first"), - first as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last"), - last as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("heap"), - heap as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields for Page<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Page { - remaining, - remaining_size, - first_index, - first, - last, - heap, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("remaining"), - remaining as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("remaining_size"), - remaining_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_index"), - first_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first"), - first as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last"), - last as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("heap"), - heap as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for Page<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "remaining", - "remaining_size", - "first_index", - "first", - "last", - "heap", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.remaining, - &self.remaining_size, - &self.first_index, - &self.first, - &self.last, - &&self.heap, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "Page", - names, - values, - ) - } - } - } - pub mod pallet_multisig { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - as_multi_threshold_1 { - other_signatories: ::std::vec::Vec< - ::subxt::utils::AccountId32, - >, - call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - #[codec(index = 1)] - 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)] - 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)] - 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], - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::as_multi_threshold_1 { - other_signatories: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::as_multi_threshold_1::other_signatories`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::as_multi_threshold_1::call`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::as_multi { - threshold: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::as_multi::threshold`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - other_signatories: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::as_multi::other_signatories`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_timepoint: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::pallet_multisig::Timepoint< - ::core::primitive::u32, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::as_multi::maybe_timepoint`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::as_multi::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_weight: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::as_multi::max_weight`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::approve_as_multi { - threshold: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::approve_as_multi::threshold`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - other_signatories: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::approve_as_multi::other_signatories`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_timepoint: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::pallet_multisig::Timepoint< - ::core::primitive::u32, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::approve_as_multi::maybe_timepoint`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::approve_as_multi::call_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_weight: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::approve_as_multi::max_weight`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::cancel_as_multi { - threshold: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::cancel_as_multi::threshold`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - other_signatories: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::cancel_as_multi::other_signatories`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - timepoint: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::cancel_as_multi::timepoint`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::cancel_as_multi::call_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::as_multi_threshold_1 { - ref other_signatories, - ref call, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(other_signatories), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call), - ) - } - Call::as_multi { - ref threshold, - ref other_signatories, - ref maybe_timepoint, - ref call, - ref max_weight, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(threshold), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(other_signatories), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maybe_timepoint), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(max_weight), - ) - } - Call::approve_as_multi { - ref threshold, - ref other_signatories, - ref maybe_timepoint, - ref call_hash, - ref max_weight, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(threshold), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(other_signatories), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maybe_timepoint), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(max_weight), - ) - } - Call::cancel_as_multi { - ref threshold, - ref other_signatories, - ref timepoint, - ref call_hash, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(threshold), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(other_signatories), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(timepoint), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_hash), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::as_multi_threshold_1 { - ref other_signatories, - ref call, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - other_signatories, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call, - __codec_dest_edqy, - ); - } - Call::as_multi { - ref threshold, - ref other_signatories, - ref maybe_timepoint, - ref call, - ref max_weight, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - threshold, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - other_signatories, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - maybe_timepoint, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - max_weight, - __codec_dest_edqy, - ); - } - Call::approve_as_multi { - ref threshold, - ref other_signatories, - ref maybe_timepoint, - ref call_hash, - ref max_weight, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - threshold, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - other_signatories, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - maybe_timepoint, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - max_weight, - __codec_dest_edqy, - ); - } - Call::cancel_as_multi { - ref threshold, - ref other_signatories, - ref timepoint, - ref call_hash, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - threshold, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - other_signatories, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - timepoint, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call_hash, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "as_multi_threshold_1" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::as_multi_threshold_1 { - other_signatories: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("other_signatories"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::as_multi_threshold_1 { - other_signatories: { - let val = *vals - .get(&Some("other_signatories")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "other_signatories".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("other_signatories"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - }; - } - if value.name() == "as_multi" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Call::as_multi { - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - other_signatories: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("other_signatories"))? - }, - maybe_timepoint: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_timepoint"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - max_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::as_multi { - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - other_signatories: { - let val = *vals - .get(&Some("other_signatories")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "other_signatories".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("other_signatories"))? - }, - maybe_timepoint: { - let val = *vals - .get(&Some("maybe_timepoint")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_timepoint".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_timepoint"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - max_weight: { - let val = *vals - .get(&Some("max_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_weight".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - }; - } - if value.name() == "approve_as_multi" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Call::approve_as_multi { - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - other_signatories: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("other_signatories"))? - }, - maybe_timepoint: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_timepoint"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - max_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::approve_as_multi { - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - other_signatories: { - let val = *vals - .get(&Some("other_signatories")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "other_signatories".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("other_signatories"))? - }, - maybe_timepoint: { - let val = *vals - .get(&Some("maybe_timepoint")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_timepoint".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_timepoint"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - max_weight: { - let val = *vals - .get(&Some("max_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_weight".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - }; - } - if value.name() == "cancel_as_multi" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Call::cancel_as_multi { - threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - other_signatories: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("other_signatories"))? - }, - timepoint: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("timepoint"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::cancel_as_multi { - threshold: { - let val = *vals - .get(&Some("threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "threshold".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("threshold"))? - }, - other_signatories: { - let val = *vals - .get(&Some("other_signatories")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "other_signatories".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("other_signatories"))? - }, - timepoint: { - let val = *vals - .get(&Some("timepoint")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "timepoint".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("timepoint"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "as_multi_threshold_1", - "as_multi", - "approve_as_multi", - "cancel_as_multi", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::as_multi_threshold_1 { other_signatories, call } => { - ::subxt::ext::scale_encode::Variant { - name: "as_multi_threshold_1", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("other_signatories"), - other_signatories - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::as_multi { - threshold, - other_signatories, - maybe_timepoint, - call, - max_weight, - } => { - ::subxt::ext::scale_encode::Variant { - name: "as_multi", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("other_signatories"), - other_signatories - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_timepoint"), - maybe_timepoint - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_weight"), - max_weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::approve_as_multi { - threshold, - other_signatories, - maybe_timepoint, - call_hash, - max_weight, - } => { - ::subxt::ext::scale_encode::Variant { - name: "approve_as_multi", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("other_signatories"), - other_signatories - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_timepoint"), - maybe_timepoint - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_weight"), - max_weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::cancel_as_multi { - threshold, - other_signatories, - timepoint, - call_hash, - } => { - ::subxt::ext::scale_encode::Variant { - name: "cancel_as_multi", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("threshold"), - threshold as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("other_signatories"), - other_signatories - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("timepoint"), - timepoint as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::as_multi_threshold_1 { - other_signatories: __self_0, - call: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "as_multi_threshold_1", - "other_signatories", - __self_0, - "call", - &__self_1, - ) - } - Call::as_multi { - threshold: __self_0, - other_signatories: __self_1, - maybe_timepoint: __self_2, - call: __self_3, - max_weight: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "as_multi", - "threshold", - __self_0, - "other_signatories", - __self_1, - "maybe_timepoint", - __self_2, - "call", - __self_3, - "max_weight", - &__self_4, - ) - } - Call::approve_as_multi { - threshold: __self_0, - other_signatories: __self_1, - maybe_timepoint: __self_2, - call_hash: __self_3, - max_weight: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "approve_as_multi", - "threshold", - __self_0, - "other_signatories", - __self_1, - "maybe_timepoint", - __self_2, - "call_hash", - __self_3, - "max_weight", - &__self_4, - ) - } - Call::cancel_as_multi { - threshold: __self_0, - other_signatories: __self_1, - timepoint: __self_2, - call_hash: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "cancel_as_multi", - "threshold", - __self_0, - "other_signatories", - __self_1, - "timepoint", - __self_2, - "call_hash", - &__self_3, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - MinimumThreshold, - #[codec(index = 1)] - AlreadyApproved, - #[codec(index = 2)] - NoApprovalsNeeded, - #[codec(index = 3)] - TooFewSignatories, - #[codec(index = 4)] - TooManySignatories, - #[codec(index = 5)] - SignatoriesOutOfOrder, - #[codec(index = 6)] - SenderInSignatories, - #[codec(index = 7)] - NotFound, - #[codec(index = 8)] - NotOwner, - #[codec(index = 9)] - NoTimepoint, - #[codec(index = 10)] - WrongTimepoint, - #[codec(index = 11)] - UnexpectedTimepoint, - #[codec(index = 12)] - MaxWeightTooLow, - #[codec(index = 13)] - AlreadyStored, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MinimumThreshold) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyApproved) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoApprovalsNeeded) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooFewSignatories) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManySignatories) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::SignatoriesOutOfOrder) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::SenderInSignatories) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotFound) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotOwner) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoTimepoint) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::WrongTimepoint) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UnexpectedTimepoint) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MaxWeightTooLow) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyStored) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::MinimumThreshold => 0_usize, - Error::AlreadyApproved => 0_usize, - Error::NoApprovalsNeeded => 0_usize, - Error::TooFewSignatories => 0_usize, - Error::TooManySignatories => 0_usize, - Error::SignatoriesOutOfOrder => 0_usize, - Error::SenderInSignatories => 0_usize, - Error::NotFound => 0_usize, - Error::NotOwner => 0_usize, - Error::NoTimepoint => 0_usize, - Error::WrongTimepoint => 0_usize, - Error::UnexpectedTimepoint => 0_usize, - Error::MaxWeightTooLow => 0_usize, - Error::AlreadyStored => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::MinimumThreshold => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::AlreadyApproved => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::NoApprovalsNeeded => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::TooFewSignatories => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::TooManySignatories => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::SignatoriesOutOfOrder => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::SenderInSignatories => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::NotFound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::NotOwner => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::NoTimepoint => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::WrongTimepoint => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Error::UnexpectedTimepoint => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - Error::MaxWeightTooLow => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - Error::AlreadyStored => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "MinimumThreshold" { - return Ok(Error::MinimumThreshold); - } - if value.name() == "AlreadyApproved" { - return Ok(Error::AlreadyApproved); - } - if value.name() == "NoApprovalsNeeded" { - return Ok(Error::NoApprovalsNeeded); - } - if value.name() == "TooFewSignatories" { - return Ok(Error::TooFewSignatories); - } - if value.name() == "TooManySignatories" { - return Ok(Error::TooManySignatories); - } - if value.name() == "SignatoriesOutOfOrder" { - return Ok(Error::SignatoriesOutOfOrder); - } - if value.name() == "SenderInSignatories" { - return Ok(Error::SenderInSignatories); - } - if value.name() == "NotFound" { - return Ok(Error::NotFound); - } - if value.name() == "NotOwner" { - return Ok(Error::NotOwner); - } - if value.name() == "NoTimepoint" { - return Ok(Error::NoTimepoint); - } - if value.name() == "WrongTimepoint" { - return Ok(Error::WrongTimepoint); - } - if value.name() == "UnexpectedTimepoint" { - return Ok(Error::UnexpectedTimepoint); - } - if value.name() == "MaxWeightTooLow" { - return Ok(Error::MaxWeightTooLow); - } - if value.name() == "AlreadyStored" { - return Ok(Error::AlreadyStored); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "MinimumThreshold", - "AlreadyApproved", - "NoApprovalsNeeded", - "TooFewSignatories", - "TooManySignatories", - "SignatoriesOutOfOrder", - "SenderInSignatories", - "NotFound", - "NotOwner", - "NoTimepoint", - "WrongTimepoint", - "UnexpectedTimepoint", - "MaxWeightTooLow", - "AlreadyStored", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::MinimumThreshold => { - ::subxt::ext::scale_encode::Variant { - name: "MinimumThreshold", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyApproved => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyApproved", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoApprovalsNeeded => { - ::subxt::ext::scale_encode::Variant { - name: "NoApprovalsNeeded", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooFewSignatories => { - ::subxt::ext::scale_encode::Variant { - name: "TooFewSignatories", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManySignatories => { - ::subxt::ext::scale_encode::Variant { - name: "TooManySignatories", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SignatoriesOutOfOrder => { - ::subxt::ext::scale_encode::Variant { - name: "SignatoriesOutOfOrder", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SenderInSignatories => { - ::subxt::ext::scale_encode::Variant { - name: "SenderInSignatories", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotFound => { - ::subxt::ext::scale_encode::Variant { - name: "NotFound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotOwner => { - ::subxt::ext::scale_encode::Variant { - name: "NotOwner", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoTimepoint => { - ::subxt::ext::scale_encode::Variant { - name: "NoTimepoint", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WrongTimepoint => { - ::subxt::ext::scale_encode::Variant { - name: "WrongTimepoint", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnexpectedTimepoint => { - ::subxt::ext::scale_encode::Variant { - name: "UnexpectedTimepoint", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MaxWeightTooLow => { - ::subxt::ext::scale_encode::Variant { - name: "MaxWeightTooLow", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyStored => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyStored", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::MinimumThreshold => "MinimumThreshold", - Error::AlreadyApproved => "AlreadyApproved", - Error::NoApprovalsNeeded => "NoApprovalsNeeded", - Error::TooFewSignatories => "TooFewSignatories", - Error::TooManySignatories => "TooManySignatories", - Error::SignatoriesOutOfOrder => "SignatoriesOutOfOrder", - Error::SenderInSignatories => "SenderInSignatories", - Error::NotFound => "NotFound", - Error::NotOwner => "NotOwner", - Error::NoTimepoint => "NoTimepoint", - Error::WrongTimepoint => "WrongTimepoint", - Error::UnexpectedTimepoint => "UnexpectedTimepoint", - Error::MaxWeightTooLow => "MaxWeightTooLow", - Error::AlreadyStored => "AlreadyStored", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - NewMultisig { - approving: ::subxt::utils::AccountId32, - multisig: ::subxt::utils::AccountId32, - call_hash: [::core::primitive::u8; 32usize], - }, - #[codec(index = 1)] - 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)] - 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)] - MultisigCancelled { - cancelling: ::subxt::utils::AccountId32, - timepoint: runtime_types::pallet_multisig::Timepoint< - ::core::primitive::u32, - >, - multisig: ::subxt::utils::AccountId32, - call_hash: [::core::primitive::u8; 32usize], - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::NewMultisig { - approving: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NewMultisig::approving`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - multisig: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NewMultisig::multisig`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NewMultisig::call_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::MultisigApproval { - approving: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::MultisigApproval::approving`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - timepoint: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::MultisigApproval::timepoint`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - multisig: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::MultisigApproval::multisig`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::MultisigApproval::call_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::MultisigExecuted { - approving: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::MultisigExecuted::approving`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - timepoint: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::MultisigExecuted::timepoint`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - multisig: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::MultisigExecuted::multisig`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::MultisigExecuted::call_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::MultisigExecuted::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::MultisigCancelled { - cancelling: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::MultisigCancelled::cancelling`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - timepoint: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::MultisigCancelled::timepoint`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - multisig: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::MultisigCancelled::multisig`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::MultisigCancelled::call_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::NewMultisig { - ref approving, - ref multisig, - ref call_hash, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(approving), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(multisig), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_hash), - ) - } - Event::MultisigApproval { - ref approving, - ref timepoint, - ref multisig, - ref call_hash, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(approving), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(timepoint), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(multisig), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_hash), - ) - } - Event::MultisigExecuted { - ref approving, - ref timepoint, - ref multisig, - ref call_hash, - ref result, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(approving), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(timepoint), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(multisig), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(result), - ) - } - Event::MultisigCancelled { - ref cancelling, - ref timepoint, - ref multisig, - ref call_hash, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(cancelling), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(timepoint), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(multisig), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_hash), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::NewMultisig { - ref approving, - ref multisig, - ref call_hash, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - approving, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - multisig, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call_hash, - __codec_dest_edqy, - ); - } - Event::MultisigApproval { - ref approving, - ref timepoint, - ref multisig, - ref call_hash, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - approving, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - timepoint, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - multisig, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call_hash, - __codec_dest_edqy, - ); - } - Event::MultisigExecuted { - ref approving, - ref timepoint, - ref multisig, - ref call_hash, - ref result, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - approving, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - timepoint, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - multisig, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - result, - __codec_dest_edqy, - ); - } - Event::MultisigCancelled { - ref cancelling, - ref timepoint, - ref multisig, - ref call_hash, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - cancelling, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - timepoint, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - multisig, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call_hash, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NewMultisig" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::NewMultisig { - approving: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("approving"))? - }, - multisig: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("multisig"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::NewMultisig { - approving: { - let val = *vals - .get(&Some("approving")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "approving".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("approving"))? - }, - multisig: { - let val = *vals - .get(&Some("multisig")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "multisig".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("multisig"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - }; - } - if value.name() == "MultisigApproval" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Event::MultisigApproval { - approving: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("approving"))? - }, - timepoint: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("timepoint"))? - }, - multisig: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("multisig"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::MultisigApproval { - approving: { - let val = *vals - .get(&Some("approving")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "approving".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("approving"))? - }, - timepoint: { - let val = *vals - .get(&Some("timepoint")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "timepoint".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("timepoint"))? - }, - multisig: { - let val = *vals - .get(&Some("multisig")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "multisig".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("multisig"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - }; - } - if value.name() == "MultisigExecuted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Event::MultisigExecuted { - approving: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("approving"))? - }, - timepoint: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("timepoint"))? - }, - multisig: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("multisig"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::MultisigExecuted { - approving: { - let val = *vals - .get(&Some("approving")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "approving".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("approving"))? - }, - timepoint: { - let val = *vals - .get(&Some("timepoint")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "timepoint".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("timepoint"))? - }, - multisig: { - let val = *vals - .get(&Some("multisig")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "multisig".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("multisig"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - }; - } - if value.name() == "MultisigCancelled" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Event::MultisigCancelled { - cancelling: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("cancelling"))? - }, - timepoint: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("timepoint"))? - }, - multisig: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("multisig"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::MultisigCancelled { - cancelling: { - let val = *vals - .get(&Some("cancelling")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "cancelling".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("cancelling"))? - }, - timepoint: { - let val = *vals - .get(&Some("timepoint")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "timepoint".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("timepoint"))? - }, - multisig: { - let val = *vals - .get(&Some("multisig")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "multisig".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("multisig"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "NewMultisig", - "MultisigApproval", - "MultisigExecuted", - "MultisigCancelled", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NewMultisig { approving, multisig, call_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "NewMultisig", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("approving"), - approving as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("multisig"), - multisig as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MultisigApproval { - approving, - timepoint, - multisig, - call_hash, - } => { - ::subxt::ext::scale_encode::Variant { - name: "MultisigApproval", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("approving"), - approving as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("timepoint"), - timepoint as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("multisig"), - multisig as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MultisigExecuted { - approving, - timepoint, - multisig, - call_hash, - result, - } => { - ::subxt::ext::scale_encode::Variant { - name: "MultisigExecuted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("approving"), - approving as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("timepoint"), - timepoint as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("multisig"), - multisig as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MultisigCancelled { - cancelling, - timepoint, - multisig, - call_hash, - } => { - ::subxt::ext::scale_encode::Variant { - name: "MultisigCancelled", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("cancelling"), - cancelling as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("timepoint"), - timepoint as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("multisig"), - multisig as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::NewMultisig { - approving: __self_0, - multisig: __self_1, - call_hash: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "NewMultisig", - "approving", - __self_0, - "multisig", - __self_1, - "call_hash", - &__self_2, - ) - } - Event::MultisigApproval { - approving: __self_0, - timepoint: __self_1, - multisig: __self_2, - call_hash: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "MultisigApproval", - "approving", - __self_0, - "timepoint", - __self_1, - "multisig", - __self_2, - "call_hash", - &__self_3, - ) - } - Event::MultisigExecuted { - approving: __self_0, - timepoint: __self_1, - multisig: __self_2, - call_hash: __self_3, - result: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "MultisigExecuted", - "approving", - __self_0, - "timepoint", - __self_1, - "multisig", - __self_2, - "call_hash", - __self_3, - "result", - &__self_4, - ) - } - Event::MultisigCancelled { - cancelling: __self_0, - timepoint: __self_1, - multisig: __self_2, - call_hash: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "MultisigCancelled", - "cancelling", - __self_0, - "timepoint", - __self_1, - "multisig", - __self_2, - "call_hash", - &__self_3, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Multisig<_0, _1, _2> { - pub when: runtime_types::pallet_multisig::Timepoint<_0>, - pub deposit: _1, - pub depositor: _2, - pub approvals: runtime_types::bounded_collections::bounded_vec::BoundedVec< - _2, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Decode for Multisig<_0, _1, _2> - where - runtime_types::pallet_multisig::Timepoint< - _0, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_multisig::Timepoint< - _0, - >: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - _2, - >: ::subxt::ext::codec::Decode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - _2, - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Multisig::<_0, _1, _2> { - when: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Multisig::when`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Multisig::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - depositor: { - let __codec_res_edqy = <_2 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Multisig::depositor`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - approvals: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Multisig::approvals`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Encode for Multisig<_0, _1, _2> - where - runtime_types::pallet_multisig::Timepoint< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_multisig::Timepoint< - _0, - >: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - _2, - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.when), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deposit), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.depositor), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.approvals), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.when, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.depositor, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.approvals, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::EncodeLike - for Multisig<_0, _1, _2> - where - runtime_types::pallet_multisig::Timepoint< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_multisig::Timepoint< - _0, - >: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - _2, - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2>( - ::core::marker::PhantomData<(_0, _1, _2)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1, _2> ::subxt::ext::scale_decode::IntoVisitor - for Multisig<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Multisig<_0, _1, _2>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Multisig { - when: { - let val = *vals - .get(&Some("when")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "when".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - depositor: { - let val = *vals - .get(&Some("depositor")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "depositor".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("depositor"))? - }, - approvals: { - let val = *vals - .get(&Some("approvals")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "approvals".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("approvals"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(Multisig { - when: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - depositor: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("depositor"))? - }, - approvals: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("approvals"))? - }, - }) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::DecodeAsFields - for Multisig<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsType - for Multisig<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Multisig { when, deposit, depositor, approvals } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("when"), - when as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("depositor"), - depositor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("approvals"), - approvals as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsFields - for Multisig<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Multisig { when, deposit, depositor, approvals } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("when"), - when as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("depositor"), - depositor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("approvals"), - approvals as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - > ::core::fmt::Debug for Multisig<_0, _1, _2> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Multisig", - "when", - &self.when, - "deposit", - &self.deposit, - "depositor", - &self.depositor, - "approvals", - &&self.approvals, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Timepoint<_0> { - pub height: _0, - pub index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for Timepoint<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Timepoint::<_0> { - height: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Timepoint::height`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Timepoint::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for Timepoint<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.height), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.height, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for Timepoint<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor for Timepoint<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Timepoint<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Timepoint { - height: { - let val = *vals - .get(&Some("height")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "height".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("height"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Timepoint { - height: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("height"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields for Timepoint<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for Timepoint<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Timepoint { height, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("height"), - height as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields for Timepoint<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Timepoint { height, index } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("height"), - height as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for Timepoint<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Timepoint", - "height", - &self.height, - "index", - &&self.index, - ) - } - } - } - pub mod pallet_nomination_pools { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - join { - #[codec(compact)] - amount: ::core::primitive::u128, - pool_id: ::core::primitive::u32, - }, - #[codec(index = 1)] - bond_extra { - extra: runtime_types::pallet_nomination_pools::BondExtra< - ::core::primitive::u128, - >, - }, - #[codec(index = 2)] - claim_payout, - #[codec(index = 3)] - unbond { - member_account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - #[codec(compact)] - unbonding_points: ::core::primitive::u128, - }, - #[codec(index = 4)] - pool_withdraw_unbonded { - pool_id: ::core::primitive::u32, - num_slashing_spans: ::core::primitive::u32, - }, - #[codec(index = 5)] - withdraw_unbonded { - member_account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - num_slashing_spans: ::core::primitive::u32, - }, - #[codec(index = 6)] - create { - #[codec(compact)] - amount: ::core::primitive::u128, - root: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - nominator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - bouncer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 7)] - create_with_pool_id { - #[codec(compact)] - amount: ::core::primitive::u128, - root: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - nominator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - bouncer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - pool_id: ::core::primitive::u32, - }, - #[codec(index = 8)] - nominate { - pool_id: ::core::primitive::u32, - validators: ::std::vec::Vec<::subxt::utils::AccountId32>, - }, - #[codec(index = 9)] - set_state { - pool_id: ::core::primitive::u32, - state: runtime_types::pallet_nomination_pools::PoolState, - }, - #[codec(index = 10)] - set_metadata { - pool_id: ::core::primitive::u32, - metadata: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 11)] - 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, - >, - global_max_commission: runtime_types::pallet_nomination_pools::ConfigOp< - runtime_types::sp_arithmetic::per_things::Perbill, - >, - }, - #[codec(index = 12)] - 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_bouncer: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - }, - #[codec(index = 13)] - chill { pool_id: ::core::primitive::u32 }, - #[codec(index = 14)] - bond_extra_other { - member: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - extra: runtime_types::pallet_nomination_pools::BondExtra< - ::core::primitive::u128, - >, - }, - #[codec(index = 15)] - set_claim_permission { - permission: runtime_types::pallet_nomination_pools::ClaimPermission, - }, - #[codec(index = 16)] - claim_payout_other { other: ::subxt::utils::AccountId32 }, - #[codec(index = 17)] - set_commission { - pool_id: ::core::primitive::u32, - new_commission: ::core::option::Option< - ( - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::utils::AccountId32, - ), - >, - }, - #[codec(index = 18)] - set_commission_max { - pool_id: ::core::primitive::u32, - max_commission: runtime_types::sp_arithmetic::per_things::Perbill, - }, - #[codec(index = 19)] - set_commission_change_rate { - pool_id: ::core::primitive::u32, - change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< - ::core::primitive::u32, - >, - }, - #[codec(index = 20)] - claim_commission { pool_id: ::core::primitive::u32 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::join { - amount: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::join::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::join::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::bond_extra { - extra: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::bond_extra::extra`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::claim_payout) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::unbond { - member_account: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::unbond::member_account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - unbonding_points: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::unbond::unbonding_points`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::pool_withdraw_unbonded { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::pool_withdraw_unbonded::pool_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - num_slashing_spans: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::pool_withdraw_unbonded::num_slashing_spans`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::withdraw_unbonded { - member_account: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::withdraw_unbonded::member_account`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - num_slashing_spans: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::withdraw_unbonded::num_slashing_spans`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::create { - amount: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::create::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - root: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::create::root`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - nominator: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::create::nominator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - bouncer: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::create::bouncer`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::create_with_pool_id { - amount: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::create_with_pool_id::amount`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - root: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::create_with_pool_id::root`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - nominator: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::create_with_pool_id::nominator`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - bouncer: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::create_with_pool_id::bouncer`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::create_with_pool_id::pool_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::nominate { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::nominate::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validators: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::nominate::validators`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_state { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_state::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - state: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_state::state`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_metadata { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_metadata::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - metadata: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_metadata::metadata`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_configs { - min_join_bond: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_configs::min_join_bond`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - min_create_bond: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_configs::min_create_bond`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_pools: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_configs::max_pools`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_members: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_configs::max_members`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_members_per_pool: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_configs::max_members_per_pool`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - global_max_commission: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_configs::global_max_commission`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::update_roles { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::update_roles::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_root: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::update_roles::new_root`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_nominator: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::update_roles::new_nominator`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_bouncer: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::update_roles::new_bouncer`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::chill { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::chill::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::bond_extra_other { - member: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::bond_extra_other::member`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - extra: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::bond_extra_other::extra`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_claim_permission { - permission: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_claim_permission::permission`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::claim_payout_other { - other: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::claim_payout_other::other`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_commission { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_commission::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_commission: { - let __codec_res_edqy = <::core::option::Option< - ( - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::utils::AccountId32, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_commission::new_commission`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_commission_max { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_commission_max::pool_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_commission: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_commission_max::max_commission`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_commission_change_rate { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_commission_change_rate::pool_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - change_rate: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_commission_change_rate::change_rate`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::claim_commission { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::claim_commission::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::join { ref amount, ref pool_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(amount), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - } - Call::bond_extra { ref extra } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(extra), - ) - } - Call::claim_payout => 0_usize, - Call::unbond { - ref member_account, - ref unbonding_points, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(member_account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(unbonding_points), - ), - ) - } - Call::pool_withdraw_unbonded { - ref pool_id, - ref num_slashing_spans, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(num_slashing_spans), - ) - } - Call::withdraw_unbonded { - ref member_account, - ref num_slashing_spans, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(member_account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(num_slashing_spans), - ) - } - Call::create { - ref amount, - ref root, - ref nominator, - ref bouncer, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(amount), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(root), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(nominator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(bouncer), - ) - } - Call::create_with_pool_id { - ref amount, - ref root, - ref nominator, - ref bouncer, - ref pool_id, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(amount), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(root), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(nominator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(bouncer), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - } - Call::nominate { ref pool_id, ref validators } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(validators), - ) - } - Call::set_state { ref pool_id, ref state } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(state), - ) - } - Call::set_metadata { ref pool_id, ref metadata } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(metadata), - ) - } - Call::set_configs { - ref min_join_bond, - ref min_create_bond, - ref max_pools, - ref max_members, - ref max_members_per_pool, - ref global_max_commission, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(min_join_bond), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(min_create_bond), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(max_pools), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(max_members), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(max_members_per_pool), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - global_max_commission, - ), - ) - } - Call::update_roles { - ref pool_id, - ref new_root, - ref new_nominator, - ref new_bouncer, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(new_root), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(new_nominator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(new_bouncer), - ) - } - Call::chill { ref pool_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - } - Call::bond_extra_other { ref member, ref extra } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(member), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(extra), - ) - } - Call::set_claim_permission { ref permission } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(permission), - ) - } - Call::claim_payout_other { ref other } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(other), - ) - } - Call::set_commission { ref pool_id, ref new_commission } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(new_commission), - ) - } - Call::set_commission_max { - ref pool_id, - ref max_commission, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(max_commission), - ) - } - Call::set_commission_change_rate { - ref pool_id, - ref change_rate, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(change_rate), - ) - } - Call::claim_commission { ref pool_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::join { ref amount, ref pool_id } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(amount), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - } - Call::bond_extra { ref extra } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - extra, - __codec_dest_edqy, - ); - } - Call::claim_payout => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Call::unbond { - ref member_account, - ref unbonding_points, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - member_account, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(unbonding_points), - __codec_dest_edqy, - ); - } - } - Call::pool_withdraw_unbonded { - ref pool_id, - ref num_slashing_spans, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - num_slashing_spans, - __codec_dest_edqy, - ); - } - Call::withdraw_unbonded { - ref member_account, - ref num_slashing_spans, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - member_account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - num_slashing_spans, - __codec_dest_edqy, - ); - } - Call::create { - ref amount, - ref root, - ref nominator, - ref bouncer, - } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(amount), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - root, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - nominator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - bouncer, - __codec_dest_edqy, - ); - } - Call::create_with_pool_id { - ref amount, - ref root, - ref nominator, - ref bouncer, - ref pool_id, - } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(amount), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - root, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - nominator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - bouncer, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - } - Call::nominate { ref pool_id, ref validators } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - validators, - __codec_dest_edqy, - ); - } - Call::set_state { ref pool_id, ref state } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - state, - __codec_dest_edqy, - ); - } - Call::set_metadata { ref pool_id, ref metadata } => { - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - metadata, - __codec_dest_edqy, - ); - } - Call::set_configs { - ref min_join_bond, - ref min_create_bond, - ref max_pools, - ref max_members, - ref max_members_per_pool, - ref global_max_commission, - } => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - min_join_bond, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - min_create_bond, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - max_pools, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - max_members, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - max_members_per_pool, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - global_max_commission, - __codec_dest_edqy, - ); - } - Call::update_roles { - ref pool_id, - ref new_root, - ref new_nominator, - ref new_bouncer, - } => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - new_root, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - new_nominator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - new_bouncer, - __codec_dest_edqy, - ); - } - Call::chill { ref pool_id } => { - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - } - Call::bond_extra_other { ref member, ref extra } => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - member, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - extra, - __codec_dest_edqy, - ); - } - Call::set_claim_permission { ref permission } => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - permission, - __codec_dest_edqy, - ); - } - Call::claim_payout_other { ref other } => { - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - other, - __codec_dest_edqy, - ); - } - Call::set_commission { - ref pool_id, - ref new_commission, - } => { - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - new_commission, - __codec_dest_edqy, - ); - } - Call::set_commission_max { - ref pool_id, - ref max_commission, - } => { - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - max_commission, - __codec_dest_edqy, - ); - } - Call::set_commission_change_rate { - ref pool_id, - ref change_rate, - } => { - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - change_rate, - __codec_dest_edqy, - ); - } - Call::claim_commission { ref pool_id } => { - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "join" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::join { - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::join { - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - }; - } - if value.name() == "bond_extra" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::bond_extra { - extra: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("extra"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::bond_extra { - extra: { - let val = *vals - .get(&Some("extra")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "extra".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("extra"))? - }, - }) - }; - } - if value.name() == "claim_payout" { - return Ok(Call::claim_payout); - } - if value.name() == "unbond" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::unbond { - member_account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("member_account"))? - }, - unbonding_points: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("unbonding_points"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::unbond { - member_account: { - let val = *vals - .get(&Some("member_account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member_account".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("member_account"))? - }, - unbonding_points: { - let val = *vals - .get(&Some("unbonding_points")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "unbonding_points".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("unbonding_points"))? - }, - }) - }; - } - if value.name() == "pool_withdraw_unbonded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::pool_withdraw_unbonded { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - num_slashing_spans: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::pool_withdraw_unbonded { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - num_slashing_spans: { - let val = *vals - .get(&Some("num_slashing_spans")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "num_slashing_spans".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - }; - } - if value.name() == "withdraw_unbonded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::withdraw_unbonded { - member_account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("member_account"))? - }, - num_slashing_spans: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::withdraw_unbonded { - member_account: { - let val = *vals - .get(&Some("member_account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member_account".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("member_account"))? - }, - num_slashing_spans: { - let val = *vals - .get(&Some("num_slashing_spans")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "num_slashing_spans".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - }; - } - if value.name() == "create" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Call::create { - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - root: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("root"))? - }, - nominator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - bouncer: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bouncer"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::create { - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - root: { - let val = *vals - .get(&Some("root")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "root".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("root"))? - }, - nominator: { - let val = *vals - .get(&Some("nominator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nominator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - bouncer: { - let val = *vals - .get(&Some("bouncer")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bouncer".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bouncer"))? - }, - }) - }; - } - if value.name() == "create_with_pool_id" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Call::create_with_pool_id { - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - root: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("root"))? - }, - nominator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - bouncer: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bouncer"))? - }, - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::create_with_pool_id { - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - root: { - let val = *vals - .get(&Some("root")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "root".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("root"))? - }, - nominator: { - let val = *vals - .get(&Some("nominator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nominator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - bouncer: { - let val = *vals - .get(&Some("bouncer")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bouncer".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bouncer"))? - }, - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - }; - } - if value.name() == "nominate" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::nominate { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - validators: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("validators"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::nominate { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - validators: { - let val = *vals - .get(&Some("validators")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validators".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("validators"))? - }, - }) - }; - } - if value.name() == "set_state" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::set_state { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - state: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("state"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_state { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - state: { - let val = *vals - .get(&Some("state")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "state".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("state"))? - }, - }) - }; - } - if value.name() == "set_metadata" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::set_metadata { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - metadata: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("metadata"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_metadata { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - metadata: { - let val = *vals - .get(&Some("metadata")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "metadata".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("metadata"))? - }, - }) - }; - } - if value.name() == "set_configs" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = fields; - Ok(Call::set_configs { - min_join_bond: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("min_join_bond"))? - }, - min_create_bond: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("min_create_bond"))? - }, - max_pools: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_pools"))? - }, - max_members: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_members"))? - }, - max_members_per_pool: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_members_per_pool"))? - }, - global_max_commission: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("global_max_commission"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_configs { - min_join_bond: { - let val = *vals - .get(&Some("min_join_bond")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "min_join_bond".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("min_join_bond"))? - }, - min_create_bond: { - let val = *vals - .get(&Some("min_create_bond")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "min_create_bond".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("min_create_bond"))? - }, - max_pools: { - let val = *vals - .get(&Some("max_pools")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_pools".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_pools"))? - }, - max_members: { - let val = *vals - .get(&Some("max_members")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_members".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_members"))? - }, - max_members_per_pool: { - let val = *vals - .get(&Some("max_members_per_pool")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_members_per_pool".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_members_per_pool"))? - }, - global_max_commission: { - let val = *vals - .get(&Some("global_max_commission")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "global_max_commission".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("global_max_commission"))? - }, - }) - }; - } - if value.name() == "update_roles" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Call::update_roles { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - new_root: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_root"))? - }, - new_nominator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("new_nominator"))? - }, - new_bouncer: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_bouncer"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::update_roles { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - new_root: { - let val = *vals - .get(&Some("new_root")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_root".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_root"))? - }, - new_nominator: { - let val = *vals - .get(&Some("new_nominator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_nominator".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("new_nominator"))? - }, - new_bouncer: { - let val = *vals - .get(&Some("new_bouncer")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_bouncer".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_bouncer"))? - }, - }) - }; - } - if value.name() == "chill" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::chill { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::chill { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - }; - } - if value.name() == "bond_extra_other" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::bond_extra_other { - member: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - extra: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("extra"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::bond_extra_other { - member: { - let val = *vals - .get(&Some("member")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - extra: { - let val = *vals - .get(&Some("extra")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "extra".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("extra"))? - }, - }) - }; - } - if value.name() == "set_claim_permission" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_claim_permission { - permission: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("permission"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_claim_permission { - permission: { - let val = *vals - .get(&Some("permission")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "permission".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("permission"))? - }, - }) - }; - } - if value.name() == "claim_payout_other" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::claim_payout_other { - other: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("other"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::claim_payout_other { - other: { - let val = *vals - .get(&Some("other")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "other".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("other"))? - }, - }) - }; - } - if value.name() == "set_commission" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::set_commission { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - new_commission: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("new_commission"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_commission { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - new_commission: { - let val = *vals - .get(&Some("new_commission")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_commission".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("new_commission"))? - }, - }) - }; - } - if value.name() == "set_commission_max" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::set_commission_max { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - max_commission: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_commission"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_commission_max { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - max_commission: { - let val = *vals - .get(&Some("max_commission")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_commission".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_commission"))? - }, - }) - }; - } - if value.name() == "set_commission_change_rate" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::set_commission_change_rate { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - change_rate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("change_rate"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_commission_change_rate { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - change_rate: { - let val = *vals - .get(&Some("change_rate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "change_rate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("change_rate"))? - }, - }) - }; - } - if value.name() == "claim_commission" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::claim_commission { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::claim_commission { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "join", - "bond_extra", - "claim_payout", - "unbond", - "pool_withdraw_unbonded", - "withdraw_unbonded", - "create", - "create_with_pool_id", - "nominate", - "set_state", - "set_metadata", - "set_configs", - "update_roles", - "chill", - "bond_extra_other", - "set_claim_permission", - "claim_payout_other", - "set_commission", - "set_commission_max", - "set_commission_change_rate", - "claim_commission", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::join { amount, pool_id } => { - ::subxt::ext::scale_encode::Variant { - name: "join", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::bond_extra { extra } => { - ::subxt::ext::scale_encode::Variant { - name: "bond_extra", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("extra"), - extra as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::claim_payout => { - ::subxt::ext::scale_encode::Variant { - name: "claim_payout", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::unbond { member_account, unbonding_points } => { - ::subxt::ext::scale_encode::Variant { - name: "unbond", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member_account"), - member_account - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("unbonding_points"), - unbonding_points - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::pool_withdraw_unbonded { - pool_id, - num_slashing_spans, - } => { - ::subxt::ext::scale_encode::Variant { - name: "pool_withdraw_unbonded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("num_slashing_spans"), - num_slashing_spans - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::withdraw_unbonded { - member_account, - num_slashing_spans, - } => { - ::subxt::ext::scale_encode::Variant { - name: "withdraw_unbonded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member_account"), - member_account - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("num_slashing_spans"), - num_slashing_spans - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::create { amount, root, nominator, bouncer } => { - ::subxt::ext::scale_encode::Variant { - name: "create", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("root"), - root as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nominator"), - nominator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bouncer"), - bouncer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::create_with_pool_id { - amount, - root, - nominator, - bouncer, - pool_id, - } => { - ::subxt::ext::scale_encode::Variant { - name: "create_with_pool_id", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("root"), - root as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nominator"), - nominator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bouncer"), - bouncer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::nominate { pool_id, validators } => { - ::subxt::ext::scale_encode::Variant { - name: "nominate", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validators"), - validators as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_state { pool_id, state } => { - ::subxt::ext::scale_encode::Variant { - name: "set_state", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("state"), - state as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_metadata { pool_id, metadata } => { - ::subxt::ext::scale_encode::Variant { - name: "set_metadata", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("metadata"), - metadata as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_configs { - min_join_bond, - min_create_bond, - max_pools, - max_members, - max_members_per_pool, - global_max_commission, - } => { - ::subxt::ext::scale_encode::Variant { - name: "set_configs", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("min_join_bond"), - min_join_bond - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_create_bond"), - min_create_bond - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_pools"), - max_pools as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_members"), - max_members as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_members_per_pool"), - max_members_per_pool - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("global_max_commission"), - global_max_commission - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::update_roles { - pool_id, - new_root, - new_nominator, - new_bouncer, - } => { - ::subxt::ext::scale_encode::Variant { - name: "update_roles", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_root"), - new_root as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_nominator"), - new_nominator - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_bouncer"), - new_bouncer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::chill { pool_id } => { - ::subxt::ext::scale_encode::Variant { - name: "chill", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::bond_extra_other { member, extra } => { - ::subxt::ext::scale_encode::Variant { - name: "bond_extra_other", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("extra"), - extra as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_claim_permission { permission } => { - ::subxt::ext::scale_encode::Variant { - name: "set_claim_permission", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("permission"), - permission as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::claim_payout_other { other } => { - ::subxt::ext::scale_encode::Variant { - name: "claim_payout_other", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("other"), - other as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_commission { pool_id, new_commission } => { - ::subxt::ext::scale_encode::Variant { - name: "set_commission", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_commission"), - new_commission - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_commission_max { pool_id, max_commission } => { - ::subxt::ext::scale_encode::Variant { - name: "set_commission_max", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_commission"), - max_commission - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_commission_change_rate { - pool_id, - change_rate, - } => { - ::subxt::ext::scale_encode::Variant { - name: "set_commission_change_rate", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("change_rate"), - change_rate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::claim_commission { pool_id } => { - ::subxt::ext::scale_encode::Variant { - name: "claim_commission", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::join { amount: __self_0, pool_id: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "join", - "amount", - __self_0, - "pool_id", - &__self_1, - ) - } - Call::bond_extra { extra: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "bond_extra", - "extra", - &__self_0, - ) - } - Call::claim_payout => { - ::core::fmt::Formatter::write_str(f, "claim_payout") - } - Call::unbond { - member_account: __self_0, - unbonding_points: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "unbond", - "member_account", - __self_0, - "unbonding_points", - &__self_1, - ) - } - Call::pool_withdraw_unbonded { - pool_id: __self_0, - num_slashing_spans: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "pool_withdraw_unbonded", - "pool_id", - __self_0, - "num_slashing_spans", - &__self_1, - ) - } - Call::withdraw_unbonded { - member_account: __self_0, - num_slashing_spans: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "withdraw_unbonded", - "member_account", - __self_0, - "num_slashing_spans", - &__self_1, - ) - } - Call::create { - amount: __self_0, - root: __self_1, - nominator: __self_2, - bouncer: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "create", - "amount", - __self_0, - "root", - __self_1, - "nominator", - __self_2, - "bouncer", - &__self_3, - ) - } - Call::create_with_pool_id { - amount: __self_0, - root: __self_1, - nominator: __self_2, - bouncer: __self_3, - pool_id: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "create_with_pool_id", - "amount", - __self_0, - "root", - __self_1, - "nominator", - __self_2, - "bouncer", - __self_3, - "pool_id", - &__self_4, - ) - } - Call::nominate { - pool_id: __self_0, - validators: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "nominate", - "pool_id", - __self_0, - "validators", - &__self_1, - ) - } - Call::set_state { pool_id: __self_0, state: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "set_state", - "pool_id", - __self_0, - "state", - &__self_1, - ) - } - Call::set_metadata { - pool_id: __self_0, - metadata: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "set_metadata", - "pool_id", - __self_0, - "metadata", - &__self_1, - ) - } - Call::set_configs { - min_join_bond: __self_0, - min_create_bond: __self_1, - max_pools: __self_2, - max_members: __self_3, - max_members_per_pool: __self_4, - global_max_commission: __self_5, - } => { - let names: &'static _ = &[ - "min_join_bond", - "min_create_bond", - "max_pools", - "max_members", - "max_members_per_pool", - "global_max_commission", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - &__self_5, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "set_configs", - names, - values, - ) - } - Call::update_roles { - pool_id: __self_0, - new_root: __self_1, - new_nominator: __self_2, - new_bouncer: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "update_roles", - "pool_id", - __self_0, - "new_root", - __self_1, - "new_nominator", - __self_2, - "new_bouncer", - &__self_3, - ) - } - Call::chill { pool_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "chill", - "pool_id", - &__self_0, - ) - } - Call::bond_extra_other { - member: __self_0, - extra: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "bond_extra_other", - "member", - __self_0, - "extra", - &__self_1, - ) - } - Call::set_claim_permission { permission: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_claim_permission", - "permission", - &__self_0, - ) - } - Call::claim_payout_other { other: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "claim_payout_other", - "other", - &__self_0, - ) - } - Call::set_commission { - pool_id: __self_0, - new_commission: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "set_commission", - "pool_id", - __self_0, - "new_commission", - &__self_1, - ) - } - Call::set_commission_max { - pool_id: __self_0, - max_commission: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "set_commission_max", - "pool_id", - __self_0, - "max_commission", - &__self_1, - ) - } - Call::set_commission_change_rate { - pool_id: __self_0, - change_rate: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "set_commission_change_rate", - "pool_id", - __self_0, - "change_rate", - &__self_1, - ) - } - Call::claim_commission { pool_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "claim_commission", - "pool_id", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum DefensiveError { - #[codec(index = 0)] - NotEnoughSpaceInUnbondPool, - #[codec(index = 1)] - PoolNotFound, - #[codec(index = 2)] - RewardPoolNotFound, - #[codec(index = 3)] - SubPoolsNotFound, - #[codec(index = 4)] - BondedStashKilledPrematurely, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DefensiveError { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `DefensiveError`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - DefensiveError::NotEnoughSpaceInUnbondPool, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DefensiveError::PoolNotFound) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - DefensiveError::RewardPoolNotFound, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DefensiveError::SubPoolsNotFound) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - DefensiveError::BondedStashKilledPrematurely, - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `DefensiveError`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DefensiveError { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - DefensiveError::NotEnoughSpaceInUnbondPool => 0_usize, - DefensiveError::PoolNotFound => 0_usize, - DefensiveError::RewardPoolNotFound => 0_usize, - DefensiveError::SubPoolsNotFound => 0_usize, - DefensiveError::BondedStashKilledPrematurely => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - DefensiveError::NotEnoughSpaceInUnbondPool => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - DefensiveError::PoolNotFound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - DefensiveError::RewardPoolNotFound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - DefensiveError::SubPoolsNotFound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - DefensiveError::BondedStashKilledPrematurely => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DefensiveError {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for DefensiveError { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DefensiveError; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NotEnoughSpaceInUnbondPool" { - return Ok(DefensiveError::NotEnoughSpaceInUnbondPool); - } - if value.name() == "PoolNotFound" { - return Ok(DefensiveError::PoolNotFound); - } - if value.name() == "RewardPoolNotFound" { - return Ok(DefensiveError::RewardPoolNotFound); - } - if value.name() == "SubPoolsNotFound" { - return Ok(DefensiveError::SubPoolsNotFound); - } - if value.name() == "BondedStashKilledPrematurely" { - return Ok(DefensiveError::BondedStashKilledPrematurely); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "NotEnoughSpaceInUnbondPool", - "PoolNotFound", - "RewardPoolNotFound", - "SubPoolsNotFound", - "BondedStashKilledPrematurely", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DefensiveError { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NotEnoughSpaceInUnbondPool => { - ::subxt::ext::scale_encode::Variant { - name: "NotEnoughSpaceInUnbondPool", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PoolNotFound => { - ::subxt::ext::scale_encode::Variant { - name: "PoolNotFound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::RewardPoolNotFound => { - ::subxt::ext::scale_encode::Variant { - name: "RewardPoolNotFound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SubPoolsNotFound => { - ::subxt::ext::scale_encode::Variant { - name: "SubPoolsNotFound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BondedStashKilledPrematurely => { - ::subxt::ext::scale_encode::Variant { - name: "BondedStashKilledPrematurely", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DefensiveError { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - DefensiveError::NotEnoughSpaceInUnbondPool => { - "NotEnoughSpaceInUnbondPool" - } - DefensiveError::PoolNotFound => "PoolNotFound", - DefensiveError::RewardPoolNotFound => "RewardPoolNotFound", - DefensiveError::SubPoolsNotFound => "SubPoolsNotFound", - DefensiveError::BondedStashKilledPrematurely => { - "BondedStashKilledPrematurely" - } - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - PoolNotFound, - #[codec(index = 1)] - PoolMemberNotFound, - #[codec(index = 2)] - RewardPoolNotFound, - #[codec(index = 3)] - SubPoolsNotFound, - #[codec(index = 4)] - AccountBelongsToOtherPool, - #[codec(index = 5)] - FullyUnbonding, - #[codec(index = 6)] - MaxUnbondingLimit, - #[codec(index = 7)] - CannotWithdrawAny, - #[codec(index = 8)] - MinimumBondNotMet, - #[codec(index = 9)] - OverflowRisk, - #[codec(index = 10)] - NotDestroying, - #[codec(index = 11)] - NotNominator, - #[codec(index = 12)] - NotKickerOrDestroying, - #[codec(index = 13)] - NotOpen, - #[codec(index = 14)] - MaxPools, - #[codec(index = 15)] - MaxPoolMembers, - #[codec(index = 16)] - CanNotChangeState, - #[codec(index = 17)] - DoesNotHavePermission, - #[codec(index = 18)] - MetadataExceedsMaxLen, - #[codec(index = 19)] - Defensive( - runtime_types::pallet_nomination_pools::pallet::DefensiveError, - ), - #[codec(index = 20)] - PartialUnbondNotAllowedPermissionlessly, - #[codec(index = 21)] - MaxCommissionRestricted, - #[codec(index = 22)] - CommissionExceedsMaximum, - #[codec(index = 23)] - CommissionChangeThrottled, - #[codec(index = 24)] - CommissionChangeRateNotAllowed, - #[codec(index = 25)] - NoPendingCommission, - #[codec(index = 26)] - NoCommissionCurrentSet, - #[codec(index = 27)] - PoolIdInUse, - #[codec(index = 28)] - InvalidPoolId, - #[codec(index = 29)] - BondExtraRestricted, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::PoolNotFound) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::PoolMemberNotFound) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::RewardPoolNotFound) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::SubPoolsNotFound) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AccountBelongsToOtherPool) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::FullyUnbonding) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MaxUnbondingLimit) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CannotWithdrawAny) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MinimumBondNotMet) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::OverflowRisk) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotDestroying) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotNominator) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotKickerOrDestroying) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotOpen) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MaxPools) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MaxPoolMembers) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CanNotChangeState) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::DoesNotHavePermission) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MetadataExceedsMaxLen) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::Defensive({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Error::Defensive.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::PartialUnbondNotAllowedPermissionlessly, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MaxCommissionRestricted) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 22u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CommissionExceedsMaximum) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 23u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CommissionChangeThrottled) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 24u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::CommissionChangeRateNotAllowed, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 25u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoPendingCommission) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 26u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoCommissionCurrentSet) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 27u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::PoolIdInUse) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 28u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidPoolId) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 29u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::BondExtraRestricted) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::PoolNotFound => 0_usize, - Error::PoolMemberNotFound => 0_usize, - Error::RewardPoolNotFound => 0_usize, - Error::SubPoolsNotFound => 0_usize, - Error::AccountBelongsToOtherPool => 0_usize, - Error::FullyUnbonding => 0_usize, - Error::MaxUnbondingLimit => 0_usize, - Error::CannotWithdrawAny => 0_usize, - Error::MinimumBondNotMet => 0_usize, - Error::OverflowRisk => 0_usize, - Error::NotDestroying => 0_usize, - Error::NotNominator => 0_usize, - Error::NotKickerOrDestroying => 0_usize, - Error::NotOpen => 0_usize, - Error::MaxPools => 0_usize, - Error::MaxPoolMembers => 0_usize, - Error::CanNotChangeState => 0_usize, - Error::DoesNotHavePermission => 0_usize, - Error::MetadataExceedsMaxLen => 0_usize, - Error::Defensive(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Error::PartialUnbondNotAllowedPermissionlessly => 0_usize, - Error::MaxCommissionRestricted => 0_usize, - Error::CommissionExceedsMaximum => 0_usize, - Error::CommissionChangeThrottled => 0_usize, - Error::CommissionChangeRateNotAllowed => 0_usize, - Error::NoPendingCommission => 0_usize, - Error::NoCommissionCurrentSet => 0_usize, - Error::PoolIdInUse => 0_usize, - Error::InvalidPoolId => 0_usize, - Error::BondExtraRestricted => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::PoolNotFound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::PoolMemberNotFound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::RewardPoolNotFound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::SubPoolsNotFound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::AccountBelongsToOtherPool => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::FullyUnbonding => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::MaxUnbondingLimit => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::CannotWithdrawAny => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::MinimumBondNotMet => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::OverflowRisk => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::NotDestroying => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Error::NotNominator => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - Error::NotKickerOrDestroying => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - Error::NotOpen => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - } - Error::MaxPools => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - } - Error::MaxPoolMembers => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - } - Error::CanNotChangeState => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - } - Error::DoesNotHavePermission => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - } - Error::MetadataExceedsMaxLen => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - } - Error::Defensive(ref aa) => { - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Error::PartialUnbondNotAllowedPermissionlessly => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - } - Error::MaxCommissionRestricted => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - } - Error::CommissionExceedsMaximum => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(22u8 as ::core::primitive::u8); - } - Error::CommissionChangeThrottled => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(23u8 as ::core::primitive::u8); - } - Error::CommissionChangeRateNotAllowed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(24u8 as ::core::primitive::u8); - } - Error::NoPendingCommission => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(25u8 as ::core::primitive::u8); - } - Error::NoCommissionCurrentSet => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(26u8 as ::core::primitive::u8); - } - Error::PoolIdInUse => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(27u8 as ::core::primitive::u8); - } - Error::InvalidPoolId => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(28u8 as ::core::primitive::u8); - } - Error::BondExtraRestricted => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(29u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "PoolNotFound" { - return Ok(Error::PoolNotFound); - } - if value.name() == "PoolMemberNotFound" { - return Ok(Error::PoolMemberNotFound); - } - if value.name() == "RewardPoolNotFound" { - return Ok(Error::RewardPoolNotFound); - } - if value.name() == "SubPoolsNotFound" { - return Ok(Error::SubPoolsNotFound); - } - if value.name() == "AccountBelongsToOtherPool" { - return Ok(Error::AccountBelongsToOtherPool); - } - if value.name() == "FullyUnbonding" { - return Ok(Error::FullyUnbonding); - } - if value.name() == "MaxUnbondingLimit" { - return Ok(Error::MaxUnbondingLimit); - } - if value.name() == "CannotWithdrawAny" { - return Ok(Error::CannotWithdrawAny); - } - if value.name() == "MinimumBondNotMet" { - return Ok(Error::MinimumBondNotMet); - } - if value.name() == "OverflowRisk" { - return Ok(Error::OverflowRisk); - } - if value.name() == "NotDestroying" { - return Ok(Error::NotDestroying); - } - if value.name() == "NotNominator" { - return Ok(Error::NotNominator); - } - if value.name() == "NotKickerOrDestroying" { - return Ok(Error::NotKickerOrDestroying); - } - if value.name() == "NotOpen" { - return Ok(Error::NotOpen); - } - if value.name() == "MaxPools" { - return Ok(Error::MaxPools); - } - if value.name() == "MaxPoolMembers" { - return Ok(Error::MaxPoolMembers); - } - if value.name() == "CanNotChangeState" { - return Ok(Error::CanNotChangeState); - } - if value.name() == "DoesNotHavePermission" { - return Ok(Error::DoesNotHavePermission); - } - if value.name() == "MetadataExceedsMaxLen" { - return Ok(Error::MetadataExceedsMaxLen); - } - if value.name() == "Defensive" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Error::Defensive({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "PartialUnbondNotAllowedPermissionlessly" - { - return Ok(Error::PartialUnbondNotAllowedPermissionlessly); - } - if value.name() == "MaxCommissionRestricted" { - return Ok(Error::MaxCommissionRestricted); - } - if value.name() == "CommissionExceedsMaximum" { - return Ok(Error::CommissionExceedsMaximum); - } - if value.name() == "CommissionChangeThrottled" { - return Ok(Error::CommissionChangeThrottled); - } - if value.name() == "CommissionChangeRateNotAllowed" { - return Ok(Error::CommissionChangeRateNotAllowed); - } - if value.name() == "NoPendingCommission" { - return Ok(Error::NoPendingCommission); - } - if value.name() == "NoCommissionCurrentSet" { - return Ok(Error::NoCommissionCurrentSet); - } - if value.name() == "PoolIdInUse" { - return Ok(Error::PoolIdInUse); - } - if value.name() == "InvalidPoolId" { - return Ok(Error::InvalidPoolId); - } - if value.name() == "BondExtraRestricted" { - return Ok(Error::BondExtraRestricted); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "PoolNotFound", - "PoolMemberNotFound", - "RewardPoolNotFound", - "SubPoolsNotFound", - "AccountBelongsToOtherPool", - "FullyUnbonding", - "MaxUnbondingLimit", - "CannotWithdrawAny", - "MinimumBondNotMet", - "OverflowRisk", - "NotDestroying", - "NotNominator", - "NotKickerOrDestroying", - "NotOpen", - "MaxPools", - "MaxPoolMembers", - "CanNotChangeState", - "DoesNotHavePermission", - "MetadataExceedsMaxLen", - "Defensive", - "PartialUnbondNotAllowedPermissionlessly", - "MaxCommissionRestricted", - "CommissionExceedsMaximum", - "CommissionChangeThrottled", - "CommissionChangeRateNotAllowed", - "NoPendingCommission", - "NoCommissionCurrentSet", - "PoolIdInUse", - "InvalidPoolId", - "BondExtraRestricted", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::PoolNotFound => { - ::subxt::ext::scale_encode::Variant { - name: "PoolNotFound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PoolMemberNotFound => { - ::subxt::ext::scale_encode::Variant { - name: "PoolMemberNotFound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::RewardPoolNotFound => { - ::subxt::ext::scale_encode::Variant { - name: "RewardPoolNotFound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SubPoolsNotFound => { - ::subxt::ext::scale_encode::Variant { - name: "SubPoolsNotFound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AccountBelongsToOtherPool => { - ::subxt::ext::scale_encode::Variant { - name: "AccountBelongsToOtherPool", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FullyUnbonding => { - ::subxt::ext::scale_encode::Variant { - name: "FullyUnbonding", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MaxUnbondingLimit => { - ::subxt::ext::scale_encode::Variant { - name: "MaxUnbondingLimit", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CannotWithdrawAny => { - ::subxt::ext::scale_encode::Variant { - name: "CannotWithdrawAny", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MinimumBondNotMet => { - ::subxt::ext::scale_encode::Variant { - name: "MinimumBondNotMet", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OverflowRisk => { - ::subxt::ext::scale_encode::Variant { - name: "OverflowRisk", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotDestroying => { - ::subxt::ext::scale_encode::Variant { - name: "NotDestroying", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotNominator => { - ::subxt::ext::scale_encode::Variant { - name: "NotNominator", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotKickerOrDestroying => { - ::subxt::ext::scale_encode::Variant { - name: "NotKickerOrDestroying", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotOpen => { - ::subxt::ext::scale_encode::Variant { - name: "NotOpen", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MaxPools => { - ::subxt::ext::scale_encode::Variant { - name: "MaxPools", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MaxPoolMembers => { - ::subxt::ext::scale_encode::Variant { - name: "MaxPoolMembers", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CanNotChangeState => { - ::subxt::ext::scale_encode::Variant { - name: "CanNotChangeState", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DoesNotHavePermission => { - ::subxt::ext::scale_encode::Variant { - name: "DoesNotHavePermission", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MetadataExceedsMaxLen => { - ::subxt::ext::scale_encode::Variant { - name: "MetadataExceedsMaxLen", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Defensive(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Defensive", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PartialUnbondNotAllowedPermissionlessly => { - ::subxt::ext::scale_encode::Variant { - name: "PartialUnbondNotAllowedPermissionlessly", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MaxCommissionRestricted => { - ::subxt::ext::scale_encode::Variant { - name: "MaxCommissionRestricted", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CommissionExceedsMaximum => { - ::subxt::ext::scale_encode::Variant { - name: "CommissionExceedsMaximum", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CommissionChangeThrottled => { - ::subxt::ext::scale_encode::Variant { - name: "CommissionChangeThrottled", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CommissionChangeRateNotAllowed => { - ::subxt::ext::scale_encode::Variant { - name: "CommissionChangeRateNotAllowed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoPendingCommission => { - ::subxt::ext::scale_encode::Variant { - name: "NoPendingCommission", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoCommissionCurrentSet => { - ::subxt::ext::scale_encode::Variant { - name: "NoCommissionCurrentSet", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PoolIdInUse => { - ::subxt::ext::scale_encode::Variant { - name: "PoolIdInUse", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidPoolId => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidPoolId", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BondExtraRestricted => { - ::subxt::ext::scale_encode::Variant { - name: "BondExtraRestricted", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Error::PoolNotFound => { - ::core::fmt::Formatter::write_str(f, "PoolNotFound") - } - Error::PoolMemberNotFound => { - ::core::fmt::Formatter::write_str(f, "PoolMemberNotFound") - } - Error::RewardPoolNotFound => { - ::core::fmt::Formatter::write_str(f, "RewardPoolNotFound") - } - Error::SubPoolsNotFound => { - ::core::fmt::Formatter::write_str(f, "SubPoolsNotFound") - } - Error::AccountBelongsToOtherPool => { - ::core::fmt::Formatter::write_str( - f, - "AccountBelongsToOtherPool", - ) - } - Error::FullyUnbonding => { - ::core::fmt::Formatter::write_str(f, "FullyUnbonding") - } - Error::MaxUnbondingLimit => { - ::core::fmt::Formatter::write_str(f, "MaxUnbondingLimit") - } - Error::CannotWithdrawAny => { - ::core::fmt::Formatter::write_str(f, "CannotWithdrawAny") - } - Error::MinimumBondNotMet => { - ::core::fmt::Formatter::write_str(f, "MinimumBondNotMet") - } - Error::OverflowRisk => { - ::core::fmt::Formatter::write_str(f, "OverflowRisk") - } - Error::NotDestroying => { - ::core::fmt::Formatter::write_str(f, "NotDestroying") - } - Error::NotNominator => { - ::core::fmt::Formatter::write_str(f, "NotNominator") - } - Error::NotKickerOrDestroying => { - ::core::fmt::Formatter::write_str( - f, - "NotKickerOrDestroying", - ) - } - Error::NotOpen => { - ::core::fmt::Formatter::write_str(f, "NotOpen") - } - Error::MaxPools => { - ::core::fmt::Formatter::write_str(f, "MaxPools") - } - Error::MaxPoolMembers => { - ::core::fmt::Formatter::write_str(f, "MaxPoolMembers") - } - Error::CanNotChangeState => { - ::core::fmt::Formatter::write_str(f, "CanNotChangeState") - } - Error::DoesNotHavePermission => { - ::core::fmt::Formatter::write_str( - f, - "DoesNotHavePermission", - ) - } - Error::MetadataExceedsMaxLen => { - ::core::fmt::Formatter::write_str( - f, - "MetadataExceedsMaxLen", - ) - } - Error::Defensive(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Defensive", - &__self_0, - ) - } - Error::PartialUnbondNotAllowedPermissionlessly => { - ::core::fmt::Formatter::write_str( - f, - "PartialUnbondNotAllowedPermissionlessly", - ) - } - Error::MaxCommissionRestricted => { - ::core::fmt::Formatter::write_str( - f, - "MaxCommissionRestricted", - ) - } - Error::CommissionExceedsMaximum => { - ::core::fmt::Formatter::write_str( - f, - "CommissionExceedsMaximum", - ) - } - Error::CommissionChangeThrottled => { - ::core::fmt::Formatter::write_str( - f, - "CommissionChangeThrottled", - ) - } - Error::CommissionChangeRateNotAllowed => { - ::core::fmt::Formatter::write_str( - f, - "CommissionChangeRateNotAllowed", - ) - } - Error::NoPendingCommission => { - ::core::fmt::Formatter::write_str(f, "NoPendingCommission") - } - Error::NoCommissionCurrentSet => { - ::core::fmt::Formatter::write_str( - f, - "NoCommissionCurrentSet", - ) - } - Error::PoolIdInUse => { - ::core::fmt::Formatter::write_str(f, "PoolIdInUse") - } - Error::InvalidPoolId => { - ::core::fmt::Formatter::write_str(f, "InvalidPoolId") - } - Error::BondExtraRestricted => { - ::core::fmt::Formatter::write_str(f, "BondExtraRestricted") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - Created { - depositor: ::subxt::utils::AccountId32, - pool_id: ::core::primitive::u32, - }, - #[codec(index = 1)] - Bonded { - member: ::subxt::utils::AccountId32, - pool_id: ::core::primitive::u32, - bonded: ::core::primitive::u128, - joined: ::core::primitive::bool, - }, - #[codec(index = 2)] - PaidOut { - member: ::subxt::utils::AccountId32, - pool_id: ::core::primitive::u32, - payout: ::core::primitive::u128, - }, - #[codec(index = 3)] - 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)] - Withdrawn { - member: ::subxt::utils::AccountId32, - pool_id: ::core::primitive::u32, - balance: ::core::primitive::u128, - points: ::core::primitive::u128, - }, - #[codec(index = 5)] - Destroyed { pool_id: ::core::primitive::u32 }, - #[codec(index = 6)] - StateChanged { - pool_id: ::core::primitive::u32, - new_state: runtime_types::pallet_nomination_pools::PoolState, - }, - #[codec(index = 7)] - MemberRemoved { - pool_id: ::core::primitive::u32, - member: ::subxt::utils::AccountId32, - }, - #[codec(index = 8)] - RolesUpdated { - root: ::core::option::Option<::subxt::utils::AccountId32>, - bouncer: ::core::option::Option<::subxt::utils::AccountId32>, - nominator: ::core::option::Option< - ::subxt::utils::AccountId32, - >, - }, - #[codec(index = 9)] - PoolSlashed { - pool_id: ::core::primitive::u32, - balance: ::core::primitive::u128, - }, - #[codec(index = 10)] - UnbondingPoolSlashed { - pool_id: ::core::primitive::u32, - era: ::core::primitive::u32, - balance: ::core::primitive::u128, - }, - #[codec(index = 11)] - PoolCommissionUpdated { - pool_id: ::core::primitive::u32, - current: ::core::option::Option< - ( - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::utils::AccountId32, - ), - >, - }, - #[codec(index = 12)] - PoolMaxCommissionUpdated { - pool_id: ::core::primitive::u32, - max_commission: runtime_types::sp_arithmetic::per_things::Perbill, - }, - #[codec(index = 13)] - PoolCommissionChangeRateUpdated { - pool_id: ::core::primitive::u32, - change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< - ::core::primitive::u32, - >, - }, - #[codec(index = 14)] - PoolCommissionClaimed { - pool_id: ::core::primitive::u32, - commission: ::core::primitive::u128, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Created { - depositor: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Created::depositor`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Created::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Bonded { - member: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Bonded::member`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Bonded::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - bonded: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Bonded::bonded`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - joined: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Bonded::joined`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::PaidOut { - member: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PaidOut::member`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PaidOut::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - payout: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PaidOut::payout`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Unbonded { - member: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Unbonded::member`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Unbonded::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - balance: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Unbonded::balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - points: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Unbonded::points`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - era: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Unbonded::era`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Withdrawn { - member: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Withdrawn::member`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Withdrawn::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - balance: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Withdrawn::balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - points: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Withdrawn::points`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Destroyed { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Destroyed::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::StateChanged { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::StateChanged::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_state: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::StateChanged::new_state`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::MemberRemoved { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::MemberRemoved::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - member: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::MemberRemoved::member`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::RolesUpdated { - root: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::RolesUpdated::root`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - bouncer: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::RolesUpdated::bouncer`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - nominator: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::RolesUpdated::nominator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::PoolSlashed { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PoolSlashed::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - balance: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PoolSlashed::balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::UnbondingPoolSlashed { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::UnbondingPoolSlashed::pool_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - era: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::UnbondingPoolSlashed::era`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - balance: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::UnbondingPoolSlashed::balance`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::PoolCommissionUpdated { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::PoolCommissionUpdated::pool_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - current: { - let __codec_res_edqy = <::core::option::Option< - ( - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::utils::AccountId32, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::PoolCommissionUpdated::current`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::PoolMaxCommissionUpdated { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::PoolMaxCommissionUpdated::pool_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_commission: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::PoolMaxCommissionUpdated::max_commission`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::PoolCommissionChangeRateUpdated { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::PoolCommissionChangeRateUpdated::pool_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - change_rate: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::PoolCommissionChangeRateUpdated::change_rate`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::PoolCommissionClaimed { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::PoolCommissionClaimed::pool_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - commission: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::PoolCommissionClaimed::commission`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::Created { ref depositor, ref pool_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(depositor), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - } - Event::Bonded { - ref member, - ref pool_id, - ref bonded, - ref joined, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(member), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(bonded), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(joined), - ) - } - Event::PaidOut { ref member, ref pool_id, ref payout } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(member), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(payout), - ) - } - Event::Unbonded { - ref member, - ref pool_id, - ref balance, - ref points, - ref era, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(member), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(balance), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(points), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(era)) - } - Event::Withdrawn { - ref member, - ref pool_id, - ref balance, - ref points, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(member), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(balance), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(points), - ) - } - Event::Destroyed { ref pool_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - } - Event::StateChanged { ref pool_id, ref new_state } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(new_state), - ) - } - Event::MemberRemoved { ref pool_id, ref member } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(member), - ) - } - Event::RolesUpdated { - ref root, - ref bouncer, - ref nominator, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(root), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(bouncer), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(nominator), - ) - } - Event::PoolSlashed { ref pool_id, ref balance } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(balance), - ) - } - Event::UnbondingPoolSlashed { - ref pool_id, - ref era, - ref balance, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(era)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(balance), - ) - } - Event::PoolCommissionUpdated { - ref pool_id, - ref current, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(current), - ) - } - Event::PoolMaxCommissionUpdated { - ref pool_id, - ref max_commission, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(max_commission), - ) - } - Event::PoolCommissionChangeRateUpdated { - ref pool_id, - ref change_rate, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(change_rate), - ) - } - Event::PoolCommissionClaimed { - ref pool_id, - ref commission, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(commission), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::Created { ref depositor, ref pool_id } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - depositor, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - } - Event::Bonded { - ref member, - ref pool_id, - ref bonded, - ref joined, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - member, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - bonded, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - joined, - __codec_dest_edqy, - ); - } - Event::PaidOut { ref member, ref pool_id, ref payout } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - member, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - payout, - __codec_dest_edqy, - ); - } - Event::Unbonded { - ref member, - ref pool_id, - ref balance, - ref points, - ref era, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - member, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - balance, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - points, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - era, - __codec_dest_edqy, - ); - } - Event::Withdrawn { - ref member, - ref pool_id, - ref balance, - ref points, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - member, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - balance, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - points, - __codec_dest_edqy, - ); - } - Event::Destroyed { ref pool_id } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - } - Event::StateChanged { ref pool_id, ref new_state } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - new_state, - __codec_dest_edqy, - ); - } - Event::MemberRemoved { ref pool_id, ref member } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - member, - __codec_dest_edqy, - ); - } - Event::RolesUpdated { - ref root, - ref bouncer, - ref nominator, - } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - root, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - bouncer, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - nominator, - __codec_dest_edqy, - ); - } - Event::PoolSlashed { ref pool_id, ref balance } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - balance, - __codec_dest_edqy, - ); - } - Event::UnbondingPoolSlashed { - ref pool_id, - ref era, - ref balance, - } => { - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - era, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - balance, - __codec_dest_edqy, - ); - } - Event::PoolCommissionUpdated { - ref pool_id, - ref current, - } => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - current, - __codec_dest_edqy, - ); - } - Event::PoolMaxCommissionUpdated { - ref pool_id, - ref max_commission, - } => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - max_commission, - __codec_dest_edqy, - ); - } - Event::PoolCommissionChangeRateUpdated { - ref pool_id, - ref change_rate, - } => { - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - change_rate, - __codec_dest_edqy, - ); - } - Event::PoolCommissionClaimed { - ref pool_id, - ref commission, - } => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - commission, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Created" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Created { - depositor: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("depositor"))? - }, - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Created { - depositor: { - let val = *vals - .get(&Some("depositor")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "depositor".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("depositor"))? - }, - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - }; - } - if value.name() == "Bonded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Event::Bonded { - member: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - bonded: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bonded"))? - }, - joined: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("joined"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Bonded { - member: { - let val = *vals - .get(&Some("member")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - bonded: { - let val = *vals - .get(&Some("bonded")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bonded".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bonded"))? - }, - joined: { - let val = *vals - .get(&Some("joined")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "joined".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("joined"))? - }, - }) - }; - } - if value.name() == "PaidOut" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::PaidOut { - member: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - payout: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::PaidOut { - member: { - let val = *vals - .get(&Some("member")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - payout: { - let val = *vals - .get(&Some("payout")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "payout".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - }) - }; - } - if value.name() == "Unbonded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Event::Unbonded { - member: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - points: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("points"))? - }, - era: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Unbonded { - member: { - let val = *vals - .get(&Some("member")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - balance: { - let val = *vals - .get(&Some("balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "balance".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - points: { - let val = *vals - .get(&Some("points")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "points".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("points"))? - }, - era: { - let val = *vals - .get(&Some("era")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "era".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - }) - }; - } - if value.name() == "Withdrawn" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Event::Withdrawn { - member: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - points: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("points"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Withdrawn { - member: { - let val = *vals - .get(&Some("member")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - balance: { - let val = *vals - .get(&Some("balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "balance".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - points: { - let val = *vals - .get(&Some("points")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "points".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("points"))? - }, - }) - }; - } - if value.name() == "Destroyed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Destroyed { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Destroyed { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - }) - }; - } - if value.name() == "StateChanged" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::StateChanged { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - new_state: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_state"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::StateChanged { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - new_state: { - let val = *vals - .get(&Some("new_state")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_state".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_state"))? - }, - }) - }; - } - if value.name() == "MemberRemoved" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::MemberRemoved { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - member: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::MemberRemoved { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - member: { - let val = *vals - .get(&Some("member")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("member"))? - }, - }) - }; - } - if value.name() == "RolesUpdated" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::RolesUpdated { - root: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("root"))? - }, - bouncer: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bouncer"))? - }, - nominator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::RolesUpdated { - root: { - let val = *vals - .get(&Some("root")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "root".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("root"))? - }, - bouncer: { - let val = *vals - .get(&Some("bouncer")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bouncer".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bouncer"))? - }, - nominator: { - let val = *vals - .get(&Some("nominator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nominator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - }) - }; - } - if value.name() == "PoolSlashed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::PoolSlashed { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::PoolSlashed { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - balance: { - let val = *vals - .get(&Some("balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "balance".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - }; - } - if value.name() == "UnbondingPoolSlashed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::UnbondingPoolSlashed { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - era: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::UnbondingPoolSlashed { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - era: { - let val = *vals - .get(&Some("era")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "era".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - balance: { - let val = *vals - .get(&Some("balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "balance".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - }; - } - if value.name() == "PoolCommissionUpdated" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::PoolCommissionUpdated { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - current: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("current"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::PoolCommissionUpdated { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - current: { - let val = *vals - .get(&Some("current")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "current".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("current"))? - }, - }) - }; - } - if value.name() == "PoolMaxCommissionUpdated" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::PoolMaxCommissionUpdated { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - max_commission: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_commission"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::PoolMaxCommissionUpdated { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - max_commission: { - let val = *vals - .get(&Some("max_commission")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_commission".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_commission"))? - }, - }) - }; - } - if value.name() == "PoolCommissionChangeRateUpdated" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::PoolCommissionChangeRateUpdated { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - change_rate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("change_rate"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::PoolCommissionChangeRateUpdated { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - change_rate: { - let val = *vals - .get(&Some("change_rate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "change_rate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("change_rate"))? - }, - }) - }; - } - if value.name() == "PoolCommissionClaimed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::PoolCommissionClaimed { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - commission: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("commission"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::PoolCommissionClaimed { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - commission: { - let val = *vals - .get(&Some("commission")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "commission".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("commission"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Created", - "Bonded", - "PaidOut", - "Unbonded", - "Withdrawn", - "Destroyed", - "StateChanged", - "MemberRemoved", - "RolesUpdated", - "PoolSlashed", - "UnbondingPoolSlashed", - "PoolCommissionUpdated", - "PoolMaxCommissionUpdated", - "PoolCommissionChangeRateUpdated", - "PoolCommissionClaimed", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Created { depositor, pool_id } => { - ::subxt::ext::scale_encode::Variant { - name: "Created", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("depositor"), - depositor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Bonded { member, pool_id, bonded, joined } => { - ::subxt::ext::scale_encode::Variant { - name: "Bonded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bonded"), - bonded as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("joined"), - joined as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PaidOut { member, pool_id, payout } => { - ::subxt::ext::scale_encode::Variant { - name: "PaidOut", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("payout"), - payout as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unbonded { member, pool_id, balance, points, era } => { - ::subxt::ext::scale_encode::Variant { - name: "Unbonded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("points"), - points as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("era"), - era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Withdrawn { member, pool_id, balance, points } => { - ::subxt::ext::scale_encode::Variant { - name: "Withdrawn", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("points"), - points as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Destroyed { pool_id } => { - ::subxt::ext::scale_encode::Variant { - name: "Destroyed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::StateChanged { pool_id, new_state } => { - ::subxt::ext::scale_encode::Variant { - name: "StateChanged", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_state"), - new_state as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MemberRemoved { pool_id, member } => { - ::subxt::ext::scale_encode::Variant { - name: "MemberRemoved", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("member"), - member as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::RolesUpdated { root, bouncer, nominator } => { - ::subxt::ext::scale_encode::Variant { - name: "RolesUpdated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("root"), - root as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bouncer"), - bouncer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nominator"), - nominator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PoolSlashed { pool_id, balance } => { - ::subxt::ext::scale_encode::Variant { - name: "PoolSlashed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnbondingPoolSlashed { pool_id, era, balance } => { - ::subxt::ext::scale_encode::Variant { - name: "UnbondingPoolSlashed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("era"), - era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PoolCommissionUpdated { pool_id, current } => { - ::subxt::ext::scale_encode::Variant { - name: "PoolCommissionUpdated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("current"), - current as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PoolMaxCommissionUpdated { - pool_id, - max_commission, - } => { - ::subxt::ext::scale_encode::Variant { - name: "PoolMaxCommissionUpdated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_commission"), - max_commission - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PoolCommissionChangeRateUpdated { - pool_id, - change_rate, - } => { - ::subxt::ext::scale_encode::Variant { - name: "PoolCommissionChangeRateUpdated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("change_rate"), - change_rate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PoolCommissionClaimed { pool_id, commission } => { - ::subxt::ext::scale_encode::Variant { - name: "PoolCommissionClaimed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("commission"), - commission as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::Created { - depositor: __self_0, - pool_id: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Created", - "depositor", - __self_0, - "pool_id", - &__self_1, - ) - } - Event::Bonded { - member: __self_0, - pool_id: __self_1, - bonded: __self_2, - joined: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Bonded", - "member", - __self_0, - "pool_id", - __self_1, - "bonded", - __self_2, - "joined", - &__self_3, - ) - } - Event::PaidOut { - member: __self_0, - pool_id: __self_1, - payout: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "PaidOut", - "member", - __self_0, - "pool_id", - __self_1, - "payout", - &__self_2, - ) - } - Event::Unbonded { - member: __self_0, - pool_id: __self_1, - balance: __self_2, - points: __self_3, - era: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "Unbonded", - "member", - __self_0, - "pool_id", - __self_1, - "balance", - __self_2, - "points", - __self_3, - "era", - &__self_4, - ) - } - Event::Withdrawn { - member: __self_0, - pool_id: __self_1, - balance: __self_2, - points: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Withdrawn", - "member", - __self_0, - "pool_id", - __self_1, - "balance", - __self_2, - "points", - &__self_3, - ) - } - Event::Destroyed { pool_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Destroyed", - "pool_id", - &__self_0, - ) - } - Event::StateChanged { - pool_id: __self_0, - new_state: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "StateChanged", - "pool_id", - __self_0, - "new_state", - &__self_1, - ) - } - Event::MemberRemoved { - pool_id: __self_0, - member: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MemberRemoved", - "pool_id", - __self_0, - "member", - &__self_1, - ) - } - Event::RolesUpdated { - root: __self_0, - bouncer: __self_1, - nominator: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "RolesUpdated", - "root", - __self_0, - "bouncer", - __self_1, - "nominator", - &__self_2, - ) - } - Event::PoolSlashed { - pool_id: __self_0, - balance: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PoolSlashed", - "pool_id", - __self_0, - "balance", - &__self_1, - ) - } - Event::UnbondingPoolSlashed { - pool_id: __self_0, - era: __self_1, - balance: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "UnbondingPoolSlashed", - "pool_id", - __self_0, - "era", - __self_1, - "balance", - &__self_2, - ) - } - Event::PoolCommissionUpdated { - pool_id: __self_0, - current: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PoolCommissionUpdated", - "pool_id", - __self_0, - "current", - &__self_1, - ) - } - Event::PoolMaxCommissionUpdated { - pool_id: __self_0, - max_commission: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PoolMaxCommissionUpdated", - "pool_id", - __self_0, - "max_commission", - &__self_1, - ) - } - Event::PoolCommissionChangeRateUpdated { - pool_id: __self_0, - change_rate: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PoolCommissionChangeRateUpdated", - "pool_id", - __self_0, - "change_rate", - &__self_1, - ) - } - Event::PoolCommissionClaimed { - pool_id: __self_0, - commission: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PoolCommissionClaimed", - "pool_id", - __self_0, - "commission", - &__self_1, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum BondExtra<_0> { - #[codec(index = 0)] - FreeBalance(_0), - #[codec(index = 1)] - Rewards, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for BondExtra<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `BondExtra`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - BondExtra::< - _0, - >::FreeBalance({ - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BondExtra::FreeBalance.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BondExtra::<_0>::Rewards) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `BondExtra`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for BondExtra<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - BondExtra::FreeBalance(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - BondExtra::Rewards => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - BondExtra::FreeBalance(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - BondExtra::Rewards => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for BondExtra<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor for BondExtra<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BondExtra<_0>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "FreeBalance" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - BondExtra::FreeBalance({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Rewards" { - return Ok(BondExtra::Rewards); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["FreeBalance", "Rewards"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for BondExtra<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::FreeBalance(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "FreeBalance", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Rewards => { - ::subxt::ext::scale_encode::Variant { - name: "Rewards", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for BondExtra<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - BondExtra::FreeBalance(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "FreeBalance", - &__self_0, - ) - } - BondExtra::Rewards => { - ::core::fmt::Formatter::write_str(f, "Rewards") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BondedPoolInner { - pub commission: runtime_types::pallet_nomination_pools::Commission, - pub member_counter: ::core::primitive::u32, - pub points: ::core::primitive::u128, - pub roles: runtime_types::pallet_nomination_pools::PoolRoles< - ::subxt::utils::AccountId32, - >, - pub state: runtime_types::pallet_nomination_pools::PoolState, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BondedPoolInner { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BondedPoolInner { - commission: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BondedPoolInner::commission`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - member_counter: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `BondedPoolInner::member_counter`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - points: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BondedPoolInner::points`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - roles: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BondedPoolInner::roles`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - state: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BondedPoolInner::state`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BondedPoolInner { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.commission), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.member_counter), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.points), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.roles), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.state), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.commission, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.member_counter, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.points, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.roles, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.state, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BondedPoolInner {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BondedPoolInner { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BondedPoolInner; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BondedPoolInner { - commission: { - let val = *vals - .get(&Some("commission")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "commission".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("commission"))? - }, - member_counter: { - let val = *vals - .get(&Some("member_counter")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "member_counter".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("member_counter"))? - }, - points: { - let val = *vals - .get(&Some("points")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "points".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("points"))? - }, - roles: { - let val = *vals - .get(&Some("roles")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "roles".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("roles"))? - }, - state: { - let val = *vals - .get(&Some("state")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "state".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("state"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(BondedPoolInner { - commission: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("commission"))? - }, - member_counter: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("member_counter"))? - }, - points: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("points"))? - }, - roles: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("roles"))? - }, - state: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("state"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for BondedPoolInner { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BondedPoolInner { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BondedPoolInner { - commission, - member_counter, - points, - roles, - state, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("commission"), - commission as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("member_counter"), - member_counter - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("points"), - points as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("roles"), - roles as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("state"), - state as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BondedPoolInner { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BondedPoolInner { - commission, - member_counter, - points, - roles, - state, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("commission"), - commission as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("member_counter"), - member_counter - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("points"), - points as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("roles"), - roles as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("state"), - state as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BondedPoolInner { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "BondedPoolInner", - "commission", - &self.commission, - "member_counter", - &self.member_counter, - "points", - &self.points, - "roles", - &self.roles, - "state", - &&self.state, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ClaimPermission { - #[codec(index = 0)] - Permissioned, - #[codec(index = 1)] - PermissionlessCompound, - #[codec(index = 2)] - PermissionlessWithdraw, - #[codec(index = 3)] - PermissionlessAll, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ClaimPermission { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `ClaimPermission`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ClaimPermission::Permissioned) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ClaimPermission::PermissionlessCompound, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ClaimPermission::PermissionlessWithdraw, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ClaimPermission::PermissionlessAll, - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `ClaimPermission`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ClaimPermission { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - ClaimPermission::Permissioned => 0_usize, - ClaimPermission::PermissionlessCompound => 0_usize, - ClaimPermission::PermissionlessWithdraw => 0_usize, - ClaimPermission::PermissionlessAll => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - ClaimPermission::Permissioned => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - ClaimPermission::PermissionlessCompound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - ClaimPermission::PermissionlessWithdraw => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - ClaimPermission::PermissionlessAll => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ClaimPermission {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ClaimPermission { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ClaimPermission; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Permissioned" { - return Ok(ClaimPermission::Permissioned); - } - if value.name() == "PermissionlessCompound" { - return Ok(ClaimPermission::PermissionlessCompound); - } - if value.name() == "PermissionlessWithdraw" { - return Ok(ClaimPermission::PermissionlessWithdraw); - } - if value.name() == "PermissionlessAll" { - return Ok(ClaimPermission::PermissionlessAll); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Permissioned", - "PermissionlessCompound", - "PermissionlessWithdraw", - "PermissionlessAll", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ClaimPermission { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Permissioned => { - ::subxt::ext::scale_encode::Variant { - name: "Permissioned", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PermissionlessCompound => { - ::subxt::ext::scale_encode::Variant { - name: "PermissionlessCompound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PermissionlessWithdraw => { - ::subxt::ext::scale_encode::Variant { - name: "PermissionlessWithdraw", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PermissionlessAll => { - ::subxt::ext::scale_encode::Variant { - name: "PermissionlessAll", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ClaimPermission { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - ClaimPermission::Permissioned => "Permissioned", - ClaimPermission::PermissionlessCompound => { - "PermissionlessCompound" - } - ClaimPermission::PermissionlessWithdraw => { - "PermissionlessWithdraw" - } - ClaimPermission::PermissionlessAll => "PermissionlessAll", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Commission { - pub current: ::core::option::Option< - ( - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::utils::AccountId32, - ), - >, - pub max: ::core::option::Option< - runtime_types::sp_arithmetic::per_things::Perbill, - >, - pub change_rate: ::core::option::Option< - runtime_types::pallet_nomination_pools::CommissionChangeRate< - ::core::primitive::u32, - >, - >, - pub throttle_from: ::core::option::Option<::core::primitive::u32>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Commission { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Commission { - current: { - let __codec_res_edqy = <::core::option::Option< - ( - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::utils::AccountId32, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Commission::current`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::sp_arithmetic::per_things::Perbill, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Commission::max`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - change_rate: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::pallet_nomination_pools::CommissionChangeRate< - ::core::primitive::u32, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Commission::change_rate`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - throttle_from: { - let __codec_res_edqy = <::core::option::Option< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Commission::throttle_from`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Commission { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.current), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.change_rate), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.throttle_from), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.current, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.change_rate, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.throttle_from, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Commission {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Commission { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Commission; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Commission { - current: { - let val = *vals - .get(&Some("current")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "current".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("current"))? - }, - max: { - let val = *vals - .get(&Some("max")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max"))? - }, - change_rate: { - let val = *vals - .get(&Some("change_rate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "change_rate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("change_rate"))? - }, - throttle_from: { - let val = *vals - .get(&Some("throttle_from")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "throttle_from".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("throttle_from"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(Commission { - current: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("current"))? - }, - max: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max"))? - }, - change_rate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("change_rate"))? - }, - throttle_from: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("throttle_from"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Commission { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Commission { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Commission { current, max, change_rate, throttle_from } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("current"), - current as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max"), - max as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("change_rate"), - change_rate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("throttle_from"), - throttle_from - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Commission { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Commission { current, max, change_rate, throttle_from } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("current"), - current as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max"), - max as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("change_rate"), - change_rate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("throttle_from"), - throttle_from - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Commission { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Commission", - "current", - &self.current, - "max", - &self.max, - "change_rate", - &self.change_rate, - "throttle_from", - &&self.throttle_from, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CommissionChangeRate<_0> { - pub max_increase: runtime_types::sp_arithmetic::per_things::Perbill, - pub min_delay: _0, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for CommissionChangeRate<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(CommissionChangeRate::<_0> { - max_increase: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CommissionChangeRate::max_increase`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - min_delay: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `CommissionChangeRate::min_delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for CommissionChangeRate<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_increase), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.min_delay), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.max_increase, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.min_delay, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for CommissionChangeRate<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for CommissionChangeRate<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CommissionChangeRate<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CommissionChangeRate { - max_increase: { - let val = *vals - .get(&Some("max_increase")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_increase".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_increase"))? - }, - min_delay: { - let val = *vals - .get(&Some("min_delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "min_delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("min_delay"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(CommissionChangeRate { - max_increase: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_increase"))? - }, - min_delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("min_delay"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for CommissionChangeRate<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for CommissionChangeRate<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CommissionChangeRate { max_increase, min_delay } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("max_increase"), - max_increase - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_delay"), - min_delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for CommissionChangeRate<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CommissionChangeRate { max_increase, min_delay } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("max_increase"), - max_increase - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_delay"), - min_delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for CommissionChangeRate<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "CommissionChangeRate", - "max_increase", - &self.max_increase, - "min_delay", - &&self.min_delay, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ConfigOp<_0> { - #[codec(index = 0)] - Noop, - #[codec(index = 1)] - Set(_0), - #[codec(index = 2)] - Remove, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for ConfigOp<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `ConfigOp`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ConfigOp::<_0>::Noop) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ConfigOp::< - _0, - >::Set({ - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ConfigOp::Set.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ConfigOp::<_0>::Remove) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `ConfigOp`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for ConfigOp<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - ConfigOp::Noop => 0_usize, - ConfigOp::Set(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - ConfigOp::Remove => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - ConfigOp::Noop => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - ConfigOp::Set(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - ConfigOp::Remove => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for ConfigOp<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor for ConfigOp<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ConfigOp<_0>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Noop" { - return Ok(ConfigOp::Noop); - } - if value.name() == "Set" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - ConfigOp::Set({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Remove" { - return Ok(ConfigOp::Remove); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Noop", "Set", "Remove"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for ConfigOp<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Noop => { - ::subxt::ext::scale_encode::Variant { - name: "Noop", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Set(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Set", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Remove => { - ::subxt::ext::scale_encode::Variant { - name: "Remove", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for ConfigOp<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - ConfigOp::Noop => { - ::core::fmt::Formatter::write_str(f, "Noop") - } - ConfigOp::Set(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Set", - &__self_0, - ) - } - ConfigOp::Remove => { - ::core::fmt::Formatter::write_str(f, "Remove") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PoolMember { - pub pool_id: ::core::primitive::u32, - pub points: ::core::primitive::u128, - pub last_recorded_reward_counter: runtime_types::sp_arithmetic::fixed_point::FixedU128, - pub unbonding_eras: runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< - ::core::primitive::u32, - ::core::primitive::u128, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PoolMember { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(PoolMember { - pool_id: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PoolMember::pool_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - points: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PoolMember::points`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - last_recorded_reward_counter: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `PoolMember::last_recorded_reward_counter`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - unbonding_eras: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PoolMember::unbonding_eras`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PoolMember { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pool_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.points), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.last_recorded_reward_counter, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.unbonding_eras), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.pool_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.points, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.last_recorded_reward_counter, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.unbonding_eras, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PoolMember {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PoolMember { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PoolMember; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PoolMember { - pool_id: { - let val = *vals - .get(&Some("pool_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pool_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - points: { - let val = *vals - .get(&Some("points")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "points".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("points"))? - }, - last_recorded_reward_counter: { - let val = *vals - .get(&Some("last_recorded_reward_counter")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "last_recorded_reward_counter".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("last_recorded_reward_counter"))? - }, - unbonding_eras: { - let val = *vals - .get(&Some("unbonding_eras")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "unbonding_eras".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("unbonding_eras"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(PoolMember { - pool_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pool_id"))? - }, - points: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("points"))? - }, - last_recorded_reward_counter: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("last_recorded_reward_counter"))? - }, - unbonding_eras: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("unbonding_eras"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for PoolMember { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PoolMember { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PoolMember { - pool_id, - points, - last_recorded_reward_counter, - unbonding_eras, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("points"), - points as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_recorded_reward_counter"), - last_recorded_reward_counter - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("unbonding_eras"), - unbonding_eras - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PoolMember { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PoolMember { - pool_id, - points, - last_recorded_reward_counter, - unbonding_eras, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pool_id"), - pool_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("points"), - points as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_recorded_reward_counter"), - last_recorded_reward_counter - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("unbonding_eras"), - unbonding_eras - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PoolMember { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "PoolMember", - "pool_id", - &self.pool_id, - "points", - &self.points, - "last_recorded_reward_counter", - &self.last_recorded_reward_counter, - "unbonding_eras", - &&self.unbonding_eras, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PoolRoles<_0> { - pub depositor: _0, - pub root: ::core::option::Option<_0>, - pub nominator: ::core::option::Option<_0>, - pub bouncer: ::core::option::Option<_0>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for PoolRoles<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(PoolRoles::<_0> { - depositor: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PoolRoles::depositor`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - root: { - let __codec_res_edqy = <::core::option::Option< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PoolRoles::root`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - nominator: { - let __codec_res_edqy = <::core::option::Option< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PoolRoles::nominator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - bouncer: { - let __codec_res_edqy = <::core::option::Option< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PoolRoles::bouncer`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for PoolRoles<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.depositor), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.root), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.nominator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.bouncer), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.depositor, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.root, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.nominator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.bouncer, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for PoolRoles<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor for PoolRoles<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PoolRoles<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PoolRoles { - depositor: { - let val = *vals - .get(&Some("depositor")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "depositor".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("depositor"))? - }, - root: { - let val = *vals - .get(&Some("root")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "root".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("root"))? - }, - nominator: { - let val = *vals - .get(&Some("nominator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nominator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - bouncer: { - let val = *vals - .get(&Some("bouncer")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bouncer".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bouncer"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(PoolRoles { - depositor: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("depositor"))? - }, - root: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("root"))? - }, - nominator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - bouncer: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bouncer"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields for PoolRoles<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for PoolRoles<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PoolRoles { depositor, root, nominator, bouncer } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("depositor"), - depositor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("root"), - root as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nominator"), - nominator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bouncer"), - bouncer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields for PoolRoles<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PoolRoles { depositor, root, nominator, bouncer } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("depositor"), - depositor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("root"), - root as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("nominator"), - nominator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bouncer"), - bouncer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for PoolRoles<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "PoolRoles", - "depositor", - &self.depositor, - "root", - &self.root, - "nominator", - &self.nominator, - "bouncer", - &&self.bouncer, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum PoolState { - #[codec(index = 0)] - Open, - #[codec(index = 1)] - Blocked, - #[codec(index = 2)] - Destroying, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PoolState { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `PoolState`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(PoolState::Open) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(PoolState::Blocked) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(PoolState::Destroying) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `PoolState`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PoolState { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - PoolState::Open => 0_usize, - PoolState::Blocked => 0_usize, - PoolState::Destroying => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - PoolState::Open => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - PoolState::Blocked => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - PoolState::Destroying => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PoolState {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PoolState { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PoolState; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Open" { - return Ok(PoolState::Open); - } - if value.name() == "Blocked" { - return Ok(PoolState::Blocked); - } - if value.name() == "Destroying" { - return Ok(PoolState::Destroying); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Open", "Blocked", "Destroying"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PoolState { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Open => { - ::subxt::ext::scale_encode::Variant { - name: "Open", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Blocked => { - ::subxt::ext::scale_encode::Variant { - name: "Blocked", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Destroying => { - ::subxt::ext::scale_encode::Variant { - name: "Destroying", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PoolState { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - PoolState::Open => "Open", - PoolState::Blocked => "Blocked", - PoolState::Destroying => "Destroying", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RewardPool { - pub last_recorded_reward_counter: runtime_types::sp_arithmetic::fixed_point::FixedU128, - pub last_recorded_total_payouts: ::core::primitive::u128, - pub total_rewards_claimed: ::core::primitive::u128, - pub total_commission_pending: ::core::primitive::u128, - pub total_commission_claimed: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RewardPool { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(RewardPool { - last_recorded_reward_counter: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RewardPool::last_recorded_reward_counter`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - last_recorded_total_payouts: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RewardPool::last_recorded_total_payouts`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - total_rewards_claimed: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RewardPool::total_rewards_claimed`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - total_commission_pending: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RewardPool::total_commission_pending`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - total_commission_claimed: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RewardPool::total_commission_claimed`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RewardPool { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.last_recorded_reward_counter, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.last_recorded_total_payouts, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.total_rewards_claimed, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.total_commission_pending, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.total_commission_claimed, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.last_recorded_reward_counter, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.last_recorded_total_payouts, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.total_rewards_claimed, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.total_commission_pending, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.total_commission_claimed, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RewardPool {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RewardPool { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RewardPool; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RewardPool { - last_recorded_reward_counter: { - let val = *vals - .get(&Some("last_recorded_reward_counter")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "last_recorded_reward_counter".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("last_recorded_reward_counter"))? - }, - last_recorded_total_payouts: { - let val = *vals - .get(&Some("last_recorded_total_payouts")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "last_recorded_total_payouts".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("last_recorded_total_payouts"))? - }, - total_rewards_claimed: { - let val = *vals - .get(&Some("total_rewards_claimed")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "total_rewards_claimed".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("total_rewards_claimed"))? - }, - total_commission_pending: { - let val = *vals - .get(&Some("total_commission_pending")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "total_commission_pending".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("total_commission_pending"))? - }, - total_commission_claimed: { - let val = *vals - .get(&Some("total_commission_claimed")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "total_commission_claimed".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("total_commission_claimed"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(RewardPool { - last_recorded_reward_counter: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("last_recorded_reward_counter"))? - }, - last_recorded_total_payouts: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("last_recorded_total_payouts"))? - }, - total_rewards_claimed: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("total_rewards_claimed"))? - }, - total_commission_pending: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("total_commission_pending"))? - }, - total_commission_claimed: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("total_commission_claimed"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for RewardPool { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RewardPool { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RewardPool { - last_recorded_reward_counter, - last_recorded_total_payouts, - total_rewards_claimed, - total_commission_pending, - total_commission_claimed, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("last_recorded_reward_counter"), - last_recorded_reward_counter - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_recorded_total_payouts"), - last_recorded_total_payouts - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("total_rewards_claimed"), - total_rewards_claimed - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("total_commission_pending"), - total_commission_pending - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("total_commission_claimed"), - total_commission_claimed - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RewardPool { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RewardPool { - last_recorded_reward_counter, - last_recorded_total_payouts, - total_rewards_claimed, - total_commission_pending, - total_commission_claimed, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("last_recorded_reward_counter"), - last_recorded_reward_counter - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_recorded_total_payouts"), - last_recorded_total_payouts - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("total_rewards_claimed"), - total_rewards_claimed - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("total_commission_pending"), - total_commission_pending - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("total_commission_claimed"), - total_commission_claimed - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RewardPool { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "RewardPool", - "last_recorded_reward_counter", - &self.last_recorded_reward_counter, - "last_recorded_total_payouts", - &self.last_recorded_total_payouts, - "total_rewards_claimed", - &self.total_rewards_claimed, - "total_commission_pending", - &self.total_commission_pending, - "total_commission_claimed", - &&self.total_commission_claimed, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SubPools { - pub no_era: runtime_types::pallet_nomination_pools::UnbondPool, - pub with_era: runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< - ::core::primitive::u32, - runtime_types::pallet_nomination_pools::UnbondPool, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SubPools { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(SubPools { - no_era: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SubPools::no_era`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - with_era: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SubPools::with_era`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SubPools { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.no_era), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.with_era), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.no_era, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.with_era, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SubPools {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SubPools { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SubPools; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SubPools { - no_era: { - let val = *vals - .get(&Some("no_era")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "no_era".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("no_era"))? - }, - with_era: { - let val = *vals - .get(&Some("with_era")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "with_era".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("with_era"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SubPools { - no_era: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("no_era"))? - }, - with_era: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("with_era"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SubPools { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SubPools { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SubPools { no_era, with_era } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("no_era"), - no_era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("with_era"), - with_era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SubPools { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SubPools { no_era, with_era } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("no_era"), - no_era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("with_era"), - with_era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SubPools { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SubPools", - "no_era", - &self.no_era, - "with_era", - &&self.with_era, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnbondPool { - pub points: ::core::primitive::u128, - pub balance: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for UnbondPool { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(UnbondPool { - points: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnbondPool::points`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - balance: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnbondPool::balance`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for UnbondPool { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.points), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.balance), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.points, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.balance, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for UnbondPool {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for UnbondPool { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UnbondPool; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(UnbondPool { - points: { - let val = *vals - .get(&Some("points")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "points".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("points"))? - }, - balance: { - let val = *vals - .get(&Some("balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "balance".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(UnbondPool { - points: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("points"))? - }, - balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("balance"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for UnbondPool { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for UnbondPool { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnbondPool { points, balance } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("points"), - points as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for UnbondPool { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnbondPool { points, balance } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("points"), - points as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("balance"), - balance as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for UnbondPool { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "UnbondPool", - "points", - &self.points, - "balance", - &&self.balance, - ) - } - } - } - pub mod pallet_offences { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - Offence { - kind: [::core::primitive::u8; 16usize], - timeslot: ::std::vec::Vec<::core::primitive::u8>, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Offence { - kind: { - let __codec_res_edqy = <[::core::primitive::u8; 16usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Offence::kind`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - timeslot: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Offence::timeslot`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::Offence { ref kind, ref timeslot } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(kind), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(timeslot), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::Offence { ref kind, ref timeslot } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - kind, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - timeslot, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Offence" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Offence { - kind: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("kind"))? - }, - timeslot: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("timeslot"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Offence { - kind: { - let val = *vals - .get(&Some("kind")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "kind".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("kind"))? - }, - timeslot: { - let val = *vals - .get(&Some("timeslot")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "timeslot".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("timeslot"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Offence"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Offence { kind, timeslot } => { - ::subxt::ext::scale_encode::Variant { - name: "Offence", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("kind"), - kind as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("timeslot"), - timeslot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::Offence { kind: __self_0, timeslot: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Offence", - "kind", - __self_0, - "timeslot", - &__self_1, - ) - } - } - } - } - } - } - pub mod pallet_preimage { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - note_preimage { bytes: ::std::vec::Vec<::core::primitive::u8> }, - #[codec(index = 1)] - unnote_preimage { hash: ::subxt::utils::H256 }, - #[codec(index = 2)] - request_preimage { hash: ::subxt::utils::H256 }, - #[codec(index = 3)] - unrequest_preimage { hash: ::subxt::utils::H256 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::note_preimage { - bytes: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::note_preimage::bytes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::unnote_preimage { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::unnote_preimage::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::request_preimage { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::request_preimage::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::unrequest_preimage { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::unrequest_preimage::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::note_preimage { ref bytes } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(bytes), - ) - } - Call::unnote_preimage { ref hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - } - Call::request_preimage { ref hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - } - Call::unrequest_preimage { ref hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::note_preimage { ref bytes } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - bytes, - __codec_dest_edqy, - ); - } - Call::unnote_preimage { ref hash } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - } - Call::request_preimage { ref hash } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - } - Call::unrequest_preimage { ref hash } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "note_preimage" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::note_preimage { - bytes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bytes"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::note_preimage { - bytes: { - let val = *vals - .get(&Some("bytes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bytes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bytes"))? - }, - }) - }; - } - if value.name() == "unnote_preimage" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::unnote_preimage { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::unnote_preimage { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - }; - } - if value.name() == "request_preimage" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::request_preimage { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::request_preimage { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - }; - } - if value.name() == "unrequest_preimage" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::unrequest_preimage { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::unrequest_preimage { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "note_preimage", - "unnote_preimage", - "request_preimage", - "unrequest_preimage", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::note_preimage { bytes } => { - ::subxt::ext::scale_encode::Variant { - name: "note_preimage", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bytes"), - bytes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::unnote_preimage { hash } => { - ::subxt::ext::scale_encode::Variant { - name: "unnote_preimage", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::request_preimage { hash } => { - ::subxt::ext::scale_encode::Variant { - name: "request_preimage", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::unrequest_preimage { hash } => { - ::subxt::ext::scale_encode::Variant { - name: "unrequest_preimage", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::note_preimage { bytes: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "note_preimage", - "bytes", - &__self_0, - ) - } - Call::unnote_preimage { hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "unnote_preimage", - "hash", - &__self_0, - ) - } - Call::request_preimage { hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "request_preimage", - "hash", - &__self_0, - ) - } - Call::unrequest_preimage { hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "unrequest_preimage", - "hash", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - TooBig, - #[codec(index = 1)] - AlreadyNoted, - #[codec(index = 2)] - NotAuthorized, - #[codec(index = 3)] - NotNoted, - #[codec(index = 4)] - Requested, - #[codec(index = 5)] - NotRequested, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooBig) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyNoted) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotAuthorized) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotNoted) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Requested) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotRequested) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::TooBig => 0_usize, - Error::AlreadyNoted => 0_usize, - Error::NotAuthorized => 0_usize, - Error::NotNoted => 0_usize, - Error::Requested => 0_usize, - Error::NotRequested => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::TooBig => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::AlreadyNoted => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::NotAuthorized => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::NotNoted => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::Requested => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::NotRequested => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "TooBig" { - return Ok(Error::TooBig); - } - if value.name() == "AlreadyNoted" { - return Ok(Error::AlreadyNoted); - } - if value.name() == "NotAuthorized" { - return Ok(Error::NotAuthorized); - } - if value.name() == "NotNoted" { - return Ok(Error::NotNoted); - } - if value.name() == "Requested" { - return Ok(Error::Requested); - } - if value.name() == "NotRequested" { - return Ok(Error::NotRequested); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "TooBig", - "AlreadyNoted", - "NotAuthorized", - "NotNoted", - "Requested", - "NotRequested", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::TooBig => { - ::subxt::ext::scale_encode::Variant { - name: "TooBig", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyNoted => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyNoted", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotAuthorized => { - ::subxt::ext::scale_encode::Variant { - name: "NotAuthorized", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotNoted => { - ::subxt::ext::scale_encode::Variant { - name: "NotNoted", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Requested => { - ::subxt::ext::scale_encode::Variant { - name: "Requested", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotRequested => { - ::subxt::ext::scale_encode::Variant { - name: "NotRequested", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::TooBig => "TooBig", - Error::AlreadyNoted => "AlreadyNoted", - Error::NotAuthorized => "NotAuthorized", - Error::NotNoted => "NotNoted", - Error::Requested => "Requested", - Error::NotRequested => "NotRequested", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - Noted { hash: ::subxt::utils::H256 }, - #[codec(index = 1)] - Requested { hash: ::subxt::utils::H256 }, - #[codec(index = 2)] - Cleared { hash: ::subxt::utils::H256 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Noted { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Noted::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Requested { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Requested::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Cleared { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Cleared::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::Noted { ref hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - } - Event::Requested { ref hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - } - Event::Cleared { ref hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::Noted { ref hash } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - } - Event::Requested { ref hash } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - } - Event::Cleared { ref hash } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Noted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Noted { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Noted { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - }; - } - if value.name() == "Requested" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Requested { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Requested { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - }; - } - if value.name() == "Cleared" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Cleared { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Cleared { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Noted", "Requested", "Cleared"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Noted { hash } => { - ::subxt::ext::scale_encode::Variant { - name: "Noted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Requested { hash } => { - ::subxt::ext::scale_encode::Variant { - name: "Requested", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Cleared { hash } => { - ::subxt::ext::scale_encode::Variant { - name: "Cleared", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::Noted { hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Noted", - "hash", - &__self_0, - ) - } - Event::Requested { hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Requested", - "hash", - &__self_0, - ) - } - Event::Cleared { hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Cleared", - "hash", - &__self_0, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum RequestStatus<_0, _1> { - #[codec(index = 0)] - Unrequested { deposit: (_0, _1), len: ::core::primitive::u32 }, - #[codec(index = 1)] - Requested { - deposit: ::core::option::Option<(_0, _1)>, - count: ::core::primitive::u32, - len: ::core::option::Option<::core::primitive::u32>, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for RequestStatus<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - (_0, _1): ::subxt::ext::codec::Decode, - ::core::option::Option<(_0, _1)>: ::subxt::ext::codec::Decode, - ::core::option::Option<(_0, _1)>: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `RequestStatus`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(RequestStatus::< - _0, - _1, - >::Unrequested { - deposit: { - let __codec_res_edqy = <( - _0, - _1, - ) as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RequestStatus::Unrequested::deposit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - len: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `RequestStatus::Unrequested::len`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(RequestStatus::< - _0, - _1, - >::Requested { - deposit: { - let __codec_res_edqy = <::core::option::Option< - (_0, _1), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RequestStatus::Requested::deposit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - count: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `RequestStatus::Requested::count`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - len: { - let __codec_res_edqy = <::core::option::Option< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RequestStatus::Requested::len`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `RequestStatus`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for RequestStatus<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - (_0, _1): ::subxt::ext::codec::Encode, - ::core::option::Option<(_0, _1)>: ::subxt::ext::codec::Encode, - ::core::option::Option<(_0, _1)>: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - RequestStatus::Unrequested { ref deposit, ref len } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(deposit), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(len)) - } - RequestStatus::Requested { - ref deposit, - ref count, - ref len, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(deposit), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(count), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(len)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - RequestStatus::Unrequested { ref deposit, ref len } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - len, - __codec_dest_edqy, - ); - } - RequestStatus::Requested { - ref deposit, - ref count, - ref len, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - count, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - len, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for RequestStatus<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - (_0, _1): ::subxt::ext::codec::Encode, - ::core::option::Option<(_0, _1)>: ::subxt::ext::codec::Encode, - ::core::option::Option<(_0, _1)>: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for RequestStatus<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RequestStatus<_0, _1>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Unrequested" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(RequestStatus::Unrequested { - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - len: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("len"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RequestStatus::Unrequested { - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - len: { - let val = *vals - .get(&Some("len")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "len".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("len"))? - }, - }) - }; - } - if value.name() == "Requested" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(RequestStatus::Requested { - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("count"))? - }, - len: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("len"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RequestStatus::Requested { - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - count: { - let val = *vals - .get(&Some("count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "count".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("count"))? - }, - len: { - let val = *vals - .get(&Some("len")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "len".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("len"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Unrequested", "Requested"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for RequestStatus<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Unrequested { deposit, len } => { - ::subxt::ext::scale_encode::Variant { - name: "Unrequested", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("len"), - len as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Requested { deposit, count, len } => { - ::subxt::ext::scale_encode::Variant { - name: "Requested", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("count"), - count as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("len"), - len as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for RequestStatus<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - RequestStatus::Unrequested { - deposit: __self_0, - len: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Unrequested", - "deposit", - __self_0, - "len", - &__self_1, - ) - } - RequestStatus::Requested { - deposit: __self_0, - count: __self_1, - len: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Requested", - "deposit", - __self_0, - "count", - __self_1, - "len", - &__self_2, - ) - } - } - } - } - } - pub mod pallet_proxy { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - 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)] - add_proxy { - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - }, - #[codec(index = 2)] - remove_proxy { - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - }, - #[codec(index = 3)] - remove_proxies, - #[codec(index = 4)] - create_pure { - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - index: ::core::primitive::u16, - }, - #[codec(index = 5)] - 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)] - announce { - real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - call_hash: ::subxt::utils::H256, - }, - #[codec(index = 7)] - remove_announcement { - real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - call_hash: ::subxt::utils::H256, - }, - #[codec(index = 8)] - reject_announcement { - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - call_hash: ::subxt::utils::H256, - }, - #[codec(index = 9)] - 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, - >, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::proxy { - real: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::proxy::real`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - force_proxy_type: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::polkadot_runtime::ProxyType, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::proxy::force_proxy_type`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::proxy::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::add_proxy { - delegate: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::add_proxy::delegate`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proxy_type: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::add_proxy::proxy_type`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delay: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::add_proxy::delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::remove_proxy { - delegate: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::remove_proxy::delegate`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proxy_type: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::remove_proxy::proxy_type`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delay: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::remove_proxy::delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::remove_proxies) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::create_pure { - proxy_type: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::create_pure::proxy_type`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delay: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::create_pure::delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::create_pure::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::kill_pure { - spawner: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::kill_pure::spawner`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proxy_type: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::kill_pure::proxy_type`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::kill_pure::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - height: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::kill_pure::height`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - ext_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::kill_pure::ext_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::announce { - real: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::announce::real`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::announce::call_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::remove_announcement { - real: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::remove_announcement::real`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::remove_announcement::call_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::reject_announcement { - delegate: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::reject_announcement::delegate`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::reject_announcement::call_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::proxy_announced { - delegate: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::proxy_announced::delegate`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - real: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::proxy_announced::real`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - force_proxy_type: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::polkadot_runtime::ProxyType, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::proxy_announced::force_proxy_type`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::proxy_announced::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::proxy { ref real, ref force_proxy_type, ref call } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(real), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(force_proxy_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call), - ) - } - Call::add_proxy { - ref delegate, - ref proxy_type, - ref delay, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delegate), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proxy_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delay), - ) - } - Call::remove_proxy { - ref delegate, - ref proxy_type, - ref delay, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delegate), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proxy_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delay), - ) - } - Call::remove_proxies => 0_usize, - Call::create_pure { - ref proxy_type, - ref delay, - ref index, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proxy_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delay), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Call::kill_pure { - ref spawner, - ref proxy_type, - ref index, - ref height, - ref ext_index, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(spawner), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proxy_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(height), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(ext_index), - ), - ) - } - Call::announce { ref real, ref call_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(real), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_hash), - ) - } - Call::remove_announcement { ref real, ref call_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(real), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_hash), - ) - } - Call::reject_announcement { - ref delegate, - ref call_hash, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delegate), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_hash), - ) - } - Call::proxy_announced { - ref delegate, - ref real, - ref force_proxy_type, - ref call, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delegate), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(real), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(force_proxy_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::proxy { - ref real, - ref force_proxy_type, - ref call, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - real, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - force_proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call, - __codec_dest_edqy, - ); - } - Call::add_proxy { - ref delegate, - ref proxy_type, - ref delay, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - delegate, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - delay, - __codec_dest_edqy, - ); - } - Call::remove_proxy { - ref delegate, - ref proxy_type, - ref delay, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - delegate, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - delay, - __codec_dest_edqy, - ); - } - Call::remove_proxies => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Call::create_pure { - ref proxy_type, - ref delay, - ref index, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - delay, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Call::kill_pure { - ref spawner, - ref proxy_type, - ref index, - ref height, - ref ext_index, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - spawner, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(height), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(ext_index), - __codec_dest_edqy, - ); - } - } - Call::announce { ref real, ref call_hash } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - real, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call_hash, - __codec_dest_edqy, - ); - } - Call::remove_announcement { ref real, ref call_hash } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - real, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call_hash, - __codec_dest_edqy, - ); - } - Call::reject_announcement { - ref delegate, - ref call_hash, - } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - delegate, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call_hash, - __codec_dest_edqy, - ); - } - Call::proxy_announced { - ref delegate, - ref real, - ref force_proxy_type, - ref call, - } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - delegate, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - real, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - force_proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "proxy" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::proxy { - real: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - force_proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("force_proxy_type"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::proxy { - real: { - let val = *vals - .get(&Some("real")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "real".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - force_proxy_type: { - let val = *vals - .get(&Some("force_proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "force_proxy_type".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("force_proxy_type"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - }; - } - if value.name() == "add_proxy" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::add_proxy { - delegate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::add_proxy { - delegate: { - let val = *vals - .get(&Some("delegate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - proxy_type: { - let val = *vals - .get(&Some("proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proxy_type".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - }; - } - if value.name() == "remove_proxy" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::remove_proxy { - delegate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::remove_proxy { - delegate: { - let val = *vals - .get(&Some("delegate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - proxy_type: { - let val = *vals - .get(&Some("proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proxy_type".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - }; - } - if value.name() == "remove_proxies" { - return Ok(Call::remove_proxies); - } - if value.name() == "create_pure" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::create_pure { - proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::create_pure { - proxy_type: { - let val = *vals - .get(&Some("proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proxy_type".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "kill_pure" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Call::kill_pure { - spawner: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("spawner"))? - }, - proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - height: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("height"))? - }, - ext_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ext_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::kill_pure { - spawner: { - let val = *vals - .get(&Some("spawner")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "spawner".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("spawner"))? - }, - proxy_type: { - let val = *vals - .get(&Some("proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proxy_type".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - height: { - let val = *vals - .get(&Some("height")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "height".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("height"))? - }, - ext_index: { - let val = *vals - .get(&Some("ext_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ext_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ext_index"))? - }, - }) - }; - } - if value.name() == "announce" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::announce { - real: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::announce { - real: { - let val = *vals - .get(&Some("real")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "real".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - }; - } - if value.name() == "remove_announcement" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::remove_announcement { - real: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::remove_announcement { - real: { - let val = *vals - .get(&Some("real")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "real".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - }; - } - if value.name() == "reject_announcement" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::reject_announcement { - delegate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::reject_announcement { - delegate: { - let val = *vals - .get(&Some("delegate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - }; - } - if value.name() == "proxy_announced" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Call::proxy_announced { - delegate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - real: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - force_proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("force_proxy_type"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::proxy_announced { - delegate: { - let val = *vals - .get(&Some("delegate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - real: { - let val = *vals - .get(&Some("real")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "real".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - force_proxy_type: { - let val = *vals - .get(&Some("force_proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "force_proxy_type".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("force_proxy_type"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "proxy", - "add_proxy", - "remove_proxy", - "remove_proxies", - "create_pure", - "kill_pure", - "announce", - "remove_announcement", - "reject_announcement", - "proxy_announced", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::proxy { real, force_proxy_type, call } => { - ::subxt::ext::scale_encode::Variant { - name: "proxy", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("real"), - real as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("force_proxy_type"), - force_proxy_type - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::add_proxy { delegate, proxy_type, delay } => { - ::subxt::ext::scale_encode::Variant { - name: "add_proxy", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegate"), - delegate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::remove_proxy { delegate, proxy_type, delay } => { - ::subxt::ext::scale_encode::Variant { - name: "remove_proxy", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegate"), - delegate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::remove_proxies => { - ::subxt::ext::scale_encode::Variant { - name: "remove_proxies", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::create_pure { proxy_type, delay, index } => { - ::subxt::ext::scale_encode::Variant { - name: "create_pure", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::kill_pure { - spawner, - proxy_type, - index, - height, - ext_index, - } => { - ::subxt::ext::scale_encode::Variant { - name: "kill_pure", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("spawner"), - spawner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("height"), - height as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ext_index"), - ext_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::announce { real, call_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "announce", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("real"), - real as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::remove_announcement { real, call_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "remove_announcement", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("real"), - real as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::reject_announcement { delegate, call_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "reject_announcement", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegate"), - delegate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::proxy_announced { - delegate, - real, - force_proxy_type, - call, - } => { - ::subxt::ext::scale_encode::Variant { - name: "proxy_announced", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegate"), - delegate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("real"), - real as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("force_proxy_type"), - force_proxy_type - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::proxy { - real: __self_0, - force_proxy_type: __self_1, - call: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "proxy", - "real", - __self_0, - "force_proxy_type", - __self_1, - "call", - &__self_2, - ) - } - Call::add_proxy { - delegate: __self_0, - proxy_type: __self_1, - delay: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "add_proxy", - "delegate", - __self_0, - "proxy_type", - __self_1, - "delay", - &__self_2, - ) - } - Call::remove_proxy { - delegate: __self_0, - proxy_type: __self_1, - delay: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "remove_proxy", - "delegate", - __self_0, - "proxy_type", - __self_1, - "delay", - &__self_2, - ) - } - Call::remove_proxies => { - ::core::fmt::Formatter::write_str(f, "remove_proxies") - } - Call::create_pure { - proxy_type: __self_0, - delay: __self_1, - index: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "create_pure", - "proxy_type", - __self_0, - "delay", - __self_1, - "index", - &__self_2, - ) - } - Call::kill_pure { - spawner: __self_0, - proxy_type: __self_1, - index: __self_2, - height: __self_3, - ext_index: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "kill_pure", - "spawner", - __self_0, - "proxy_type", - __self_1, - "index", - __self_2, - "height", - __self_3, - "ext_index", - &__self_4, - ) - } - Call::announce { real: __self_0, call_hash: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "announce", - "real", - __self_0, - "call_hash", - &__self_1, - ) - } - Call::remove_announcement { - real: __self_0, - call_hash: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "remove_announcement", - "real", - __self_0, - "call_hash", - &__self_1, - ) - } - Call::reject_announcement { - delegate: __self_0, - call_hash: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "reject_announcement", - "delegate", - __self_0, - "call_hash", - &__self_1, - ) - } - Call::proxy_announced { - delegate: __self_0, - real: __self_1, - force_proxy_type: __self_2, - call: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "proxy_announced", - "delegate", - __self_0, - "real", - __self_1, - "force_proxy_type", - __self_2, - "call", - &__self_3, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - TooMany, - #[codec(index = 1)] - NotFound, - #[codec(index = 2)] - NotProxy, - #[codec(index = 3)] - Unproxyable, - #[codec(index = 4)] - Duplicate, - #[codec(index = 5)] - NoPermission, - #[codec(index = 6)] - Unannounced, - #[codec(index = 7)] - NoSelfProxy, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooMany) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotFound) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotProxy) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Unproxyable) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Duplicate) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoPermission) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Unannounced) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoSelfProxy) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::TooMany => 0_usize, - Error::NotFound => 0_usize, - Error::NotProxy => 0_usize, - Error::Unproxyable => 0_usize, - Error::Duplicate => 0_usize, - Error::NoPermission => 0_usize, - Error::Unannounced => 0_usize, - Error::NoSelfProxy => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::TooMany => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::NotFound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::NotProxy => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::Unproxyable => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::Duplicate => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::NoPermission => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::Unannounced => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::NoSelfProxy => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "TooMany" { - return Ok(Error::TooMany); - } - if value.name() == "NotFound" { - return Ok(Error::NotFound); - } - if value.name() == "NotProxy" { - return Ok(Error::NotProxy); - } - if value.name() == "Unproxyable" { - return Ok(Error::Unproxyable); - } - if value.name() == "Duplicate" { - return Ok(Error::Duplicate); - } - if value.name() == "NoPermission" { - return Ok(Error::NoPermission); - } - if value.name() == "Unannounced" { - return Ok(Error::Unannounced); - } - if value.name() == "NoSelfProxy" { - return Ok(Error::NoSelfProxy); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "TooMany", - "NotFound", - "NotProxy", - "Unproxyable", - "Duplicate", - "NoPermission", - "Unannounced", - "NoSelfProxy", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::TooMany => { - ::subxt::ext::scale_encode::Variant { - name: "TooMany", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotFound => { - ::subxt::ext::scale_encode::Variant { - name: "NotFound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotProxy => { - ::subxt::ext::scale_encode::Variant { - name: "NotProxy", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unproxyable => { - ::subxt::ext::scale_encode::Variant { - name: "Unproxyable", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Duplicate => { - ::subxt::ext::scale_encode::Variant { - name: "Duplicate", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoPermission => { - ::subxt::ext::scale_encode::Variant { - name: "NoPermission", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unannounced => { - ::subxt::ext::scale_encode::Variant { - name: "Unannounced", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoSelfProxy => { - ::subxt::ext::scale_encode::Variant { - name: "NoSelfProxy", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::TooMany => "TooMany", - Error::NotFound => "NotFound", - Error::NotProxy => "NotProxy", - Error::Unproxyable => "Unproxyable", - Error::Duplicate => "Duplicate", - Error::NoPermission => "NoPermission", - Error::Unannounced => "Unannounced", - Error::NoSelfProxy => "NoSelfProxy", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - ProxyExecuted { - result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - }, - #[codec(index = 1)] - PureCreated { - pure: ::subxt::utils::AccountId32, - who: ::subxt::utils::AccountId32, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - disambiguation_index: ::core::primitive::u16, - }, - #[codec(index = 2)] - Announced { - real: ::subxt::utils::AccountId32, - proxy: ::subxt::utils::AccountId32, - call_hash: ::subxt::utils::H256, - }, - #[codec(index = 3)] - ProxyAdded { - delegator: ::subxt::utils::AccountId32, - delegatee: ::subxt::utils::AccountId32, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - }, - #[codec(index = 4)] - ProxyRemoved { - delegator: ::subxt::utils::AccountId32, - delegatee: ::subxt::utils::AccountId32, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ProxyExecuted { - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ProxyExecuted::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::PureCreated { - pure: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PureCreated::pure`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PureCreated::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proxy_type: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PureCreated::proxy_type`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - disambiguation_index: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::PureCreated::disambiguation_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Announced { - real: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Announced::real`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proxy: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Announced::proxy`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Announced::call_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ProxyAdded { - delegator: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ProxyAdded::delegator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delegatee: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ProxyAdded::delegatee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proxy_type: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ProxyAdded::proxy_type`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delay: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ProxyAdded::delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ProxyRemoved { - delegator: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ProxyRemoved::delegator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delegatee: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ProxyRemoved::delegatee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proxy_type: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::ProxyRemoved::proxy_type`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delay: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ProxyRemoved::delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::ProxyExecuted { ref result } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(result), - ) - } - Event::PureCreated { - ref pure, - ref who, - ref proxy_type, - ref disambiguation_index, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(pure), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proxy_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(disambiguation_index), - ) - } - Event::Announced { ref real, ref proxy, ref call_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(real), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proxy), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_hash), - ) - } - Event::ProxyAdded { - ref delegator, - ref delegatee, - ref proxy_type, - ref delay, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delegator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delegatee), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proxy_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delay), - ) - } - Event::ProxyRemoved { - ref delegator, - ref delegatee, - ref proxy_type, - ref delay, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delegator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delegatee), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proxy_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(delay), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::ProxyExecuted { ref result } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - result, - __codec_dest_edqy, - ); - } - Event::PureCreated { - ref pure, - ref who, - ref proxy_type, - ref disambiguation_index, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - pure, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - disambiguation_index, - __codec_dest_edqy, - ); - } - Event::Announced { ref real, ref proxy, ref call_hash } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - real, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proxy, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call_hash, - __codec_dest_edqy, - ); - } - Event::ProxyAdded { - ref delegator, - ref delegatee, - ref proxy_type, - ref delay, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - delegator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - delegatee, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - delay, - __codec_dest_edqy, - ); - } - Event::ProxyRemoved { - ref delegator, - ref delegatee, - ref proxy_type, - ref delay, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - delegator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - delegatee, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - delay, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "ProxyExecuted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::ProxyExecuted { - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::ProxyExecuted { - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - }; - } - if value.name() == "PureCreated" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Event::PureCreated { - pure: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pure"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - disambiguation_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("disambiguation_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::PureCreated { - pure: { - let val = *vals - .get(&Some("pure")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pure".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pure"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - proxy_type: { - let val = *vals - .get(&Some("proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proxy_type".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - disambiguation_index: { - let val = *vals - .get(&Some("disambiguation_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "disambiguation_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("disambiguation_index"))? - }, - }) - }; - } - if value.name() == "Announced" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::Announced { - real: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - proxy: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proxy"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Announced { - real: { - let val = *vals - .get(&Some("real")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "real".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - proxy: { - let val = *vals - .get(&Some("proxy")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proxy".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proxy"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - }; - } - if value.name() == "ProxyAdded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Event::ProxyAdded { - delegator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegator"))? - }, - delegatee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegatee"))? - }, - proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::ProxyAdded { - delegator: { - let val = *vals - .get(&Some("delegator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegator"))? - }, - delegatee: { - let val = *vals - .get(&Some("delegatee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegatee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegatee"))? - }, - proxy_type: { - let val = *vals - .get(&Some("proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proxy_type".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - }; - } - if value.name() == "ProxyRemoved" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Event::ProxyRemoved { - delegator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegator"))? - }, - delegatee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegatee"))? - }, - proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::ProxyRemoved { - delegator: { - let val = *vals - .get(&Some("delegator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegator"))? - }, - delegatee: { - let val = *vals - .get(&Some("delegatee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegatee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegatee"))? - }, - proxy_type: { - let val = *vals - .get(&Some("proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proxy_type".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "ProxyExecuted", - "PureCreated", - "Announced", - "ProxyAdded", - "ProxyRemoved", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::ProxyExecuted { result } => { - ::subxt::ext::scale_encode::Variant { - name: "ProxyExecuted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PureCreated { - pure, - who, - proxy_type, - disambiguation_index, - } => { - ::subxt::ext::scale_encode::Variant { - name: "PureCreated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("pure"), - pure as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("disambiguation_index"), - disambiguation_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Announced { real, proxy, call_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "Announced", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("real"), - real as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy"), - proxy as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ProxyAdded { - delegator, - delegatee, - proxy_type, - delay, - } => { - ::subxt::ext::scale_encode::Variant { - name: "ProxyAdded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegator"), - delegator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delegatee"), - delegatee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ProxyRemoved { - delegator, - delegatee, - proxy_type, - delay, - } => { - ::subxt::ext::scale_encode::Variant { - name: "ProxyRemoved", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegator"), - delegator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delegatee"), - delegatee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::ProxyExecuted { result: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ProxyExecuted", - "result", - &__self_0, - ) - } - Event::PureCreated { - pure: __self_0, - who: __self_1, - proxy_type: __self_2, - disambiguation_index: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "PureCreated", - "pure", - __self_0, - "who", - __self_1, - "proxy_type", - __self_2, - "disambiguation_index", - &__self_3, - ) - } - Event::Announced { - real: __self_0, - proxy: __self_1, - call_hash: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Announced", - "real", - __self_0, - "proxy", - __self_1, - "call_hash", - &__self_2, - ) - } - Event::ProxyAdded { - delegator: __self_0, - delegatee: __self_1, - proxy_type: __self_2, - delay: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "ProxyAdded", - "delegator", - __self_0, - "delegatee", - __self_1, - "proxy_type", - __self_2, - "delay", - &__self_3, - ) - } - Event::ProxyRemoved { - delegator: __self_0, - delegatee: __self_1, - proxy_type: __self_2, - delay: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "ProxyRemoved", - "delegator", - __self_0, - "delegatee", - __self_1, - "proxy_type", - __self_2, - "delay", - &__self_3, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Announcement<_0, _1, _2> { - pub real: _0, - pub call_hash: _1, - pub height: _2, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Decode - for Announcement<_0, _1, _2> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Announcement::<_0, _1, _2> { - real: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Announcement::real`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_hash: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Announcement::call_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - height: { - let __codec_res_edqy = <_2 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Announcement::height`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Encode - for Announcement<_0, _1, _2> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.real), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.height), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.real, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.height, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::EncodeLike - for Announcement<_0, _1, _2> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2>( - ::core::marker::PhantomData<(_0, _1, _2)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1, _2> ::subxt::ext::scale_decode::IntoVisitor - for Announcement<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Announcement<_0, _1, _2>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Announcement { - real: { - let val = *vals - .get(&Some("real")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "real".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - height: { - let val = *vals - .get(&Some("height")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "height".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("height"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Announcement { - real: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("real"))? - }, - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - height: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("height"))? - }, - }) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::DecodeAsFields - for Announcement<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsType - for Announcement<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Announcement { real, call_hash, height } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("real"), - real as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("height"), - height as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsFields - for Announcement<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Announcement { real, call_hash, height } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("real"), - real as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("height"), - height as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - > ::core::fmt::Debug for Announcement<_0, _1, _2> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Announcement", - "real", - &self.real, - "call_hash", - &self.call_hash, - "height", - &&self.height, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProxyDefinition<_0, _1, _2> { - pub delegate: _0, - pub proxy_type: _1, - pub delay: _2, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Decode - for ProxyDefinition<_0, _1, _2> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ProxyDefinition::<_0, _1, _2> { - delegate: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProxyDefinition::delegate`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proxy_type: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProxyDefinition::proxy_type`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - delay: { - let __codec_res_edqy = <_2 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ProxyDefinition::delay`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::Encode - for ProxyDefinition<_0, _1, _2> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delegate), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proxy_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.delay), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.delegate, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proxy_type, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.delay, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1, _2> ::subxt::ext::codec::EncodeLike - for ProxyDefinition<_0, _1, _2> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2>( - ::core::marker::PhantomData<(_0, _1, _2)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1, _2> ::subxt::ext::scale_decode::IntoVisitor - for ProxyDefinition<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ProxyDefinition<_0, _1, _2>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ProxyDefinition { - delegate: { - let val = *vals - .get(&Some("delegate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delegate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - proxy_type: { - let val = *vals - .get(&Some("proxy_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proxy_type".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = *vals - .get(&Some("delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "delay".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(ProxyDefinition { - delegate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delegate"))? - }, - proxy_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proxy_type"))? - }, - delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("delay"))? - }, - }) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_decode::DecodeAsFields - for ProxyDefinition<_0, _1, _2> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsType - for ProxyDefinition<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProxyDefinition { delegate, proxy_type, delay } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegate"), - delegate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1, _2> ::subxt::ext::scale_encode::EncodeAsFields - for ProxyDefinition<_0, _1, _2> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ProxyDefinition { delegate, proxy_type, delay } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("delegate"), - delegate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proxy_type"), - proxy_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("delay"), - delay as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - > ::core::fmt::Debug for ProxyDefinition<_0, _1, _2> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ProxyDefinition", - "delegate", - &self.delegate, - "proxy_type", - &self.proxy_type, - "delay", - &&self.delay, - ) - } - } - } - pub mod pallet_referenda { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - submit { - proposal_origin: ::std::boxed::Box< - runtime_types::polkadot_runtime::OriginCaller, - >, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - enactment_moment: runtime_types::frame_support::traits::schedule::DispatchTime< - ::core::primitive::u32, - >, - }, - #[codec(index = 1)] - place_decision_deposit { index: ::core::primitive::u32 }, - #[codec(index = 2)] - refund_decision_deposit { index: ::core::primitive::u32 }, - #[codec(index = 3)] - cancel { index: ::core::primitive::u32 }, - #[codec(index = 4)] - kill { index: ::core::primitive::u32 }, - #[codec(index = 5)] - nudge_referendum { index: ::core::primitive::u32 }, - #[codec(index = 6)] - one_fewer_deciding { track: ::core::primitive::u16 }, - #[codec(index = 7)] - refund_submission_deposit { index: ::core::primitive::u32 }, - #[codec(index = 8)] - set_metadata { - index: ::core::primitive::u32, - maybe_hash: ::core::option::Option<::subxt::utils::H256>, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::submit { - proposal_origin: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::OriginCaller, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::submit::proposal_origin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::submit::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - enactment_moment: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::submit::enactment_moment`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::place_decision_deposit { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::place_decision_deposit::index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::refund_decision_deposit { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::refund_decision_deposit::index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::cancel { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::cancel::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::kill { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::kill::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::nudge_referendum { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::nudge_referendum::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::one_fewer_deciding { - track: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::one_fewer_deciding::track`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::refund_submission_deposit { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::refund_submission_deposit::index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_metadata { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_metadata::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_hash: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::H256, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_metadata::maybe_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::submit { - ref proposal_origin, - ref proposal, - ref enactment_moment, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(enactment_moment), - ) - } - Call::place_decision_deposit { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Call::refund_decision_deposit { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Call::cancel { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Call::kill { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Call::nudge_referendum { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Call::one_fewer_deciding { ref track } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(track), - ) - } - Call::refund_submission_deposit { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Call::set_metadata { ref index, ref maybe_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maybe_hash), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::submit { - ref proposal_origin, - ref proposal, - ref enactment_moment, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proposal, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - enactment_moment, - __codec_dest_edqy, - ); - } - Call::place_decision_deposit { ref index } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Call::refund_decision_deposit { ref index } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Call::cancel { ref index } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Call::kill { ref index } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Call::nudge_referendum { ref index } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Call::one_fewer_deciding { ref track } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - track, - __codec_dest_edqy, - ); - } - Call::refund_submission_deposit { ref index } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Call::set_metadata { ref index, ref maybe_hash } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - maybe_hash, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "submit" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::submit { - proposal_origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_origin"))? - }, - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - enactment_moment: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("enactment_moment"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::submit { - proposal_origin: { - let val = *vals - .get(&Some("proposal_origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_origin".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_origin"))? - }, - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - enactment_moment: { - let val = *vals - .get(&Some("enactment_moment")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "enactment_moment".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("enactment_moment"))? - }, - }) - }; - } - if value.name() == "place_decision_deposit" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::place_decision_deposit { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::place_decision_deposit { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "refund_decision_deposit" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::refund_decision_deposit { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::refund_decision_deposit { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "cancel" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::cancel { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::cancel { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "kill" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::kill { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::kill { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "nudge_referendum" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::nudge_referendum { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::nudge_referendum { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "one_fewer_deciding" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::one_fewer_deciding { - track: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("track"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::one_fewer_deciding { - track: { - let val = *vals - .get(&Some("track")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "track".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("track"))? - }, - }) - }; - } - if value.name() == "refund_submission_deposit" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::refund_submission_deposit { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::refund_submission_deposit { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "set_metadata" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::set_metadata { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - maybe_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("maybe_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_metadata { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - maybe_hash: { - let val = *vals - .get(&Some("maybe_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("maybe_hash"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "submit", - "place_decision_deposit", - "refund_decision_deposit", - "cancel", - "kill", - "nudge_referendum", - "one_fewer_deciding", - "refund_submission_deposit", - "set_metadata", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::submit { - proposal_origin, - proposal, - enactment_moment, - } => { - ::subxt::ext::scale_encode::Variant { - name: "submit", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_origin"), - proposal_origin - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("enactment_moment"), - enactment_moment - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::place_decision_deposit { index } => { - ::subxt::ext::scale_encode::Variant { - name: "place_decision_deposit", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::refund_decision_deposit { index } => { - ::subxt::ext::scale_encode::Variant { - name: "refund_decision_deposit", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::cancel { index } => { - ::subxt::ext::scale_encode::Variant { - name: "cancel", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::kill { index } => { - ::subxt::ext::scale_encode::Variant { - name: "kill", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::nudge_referendum { index } => { - ::subxt::ext::scale_encode::Variant { - name: "nudge_referendum", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::one_fewer_deciding { track } => { - ::subxt::ext::scale_encode::Variant { - name: "one_fewer_deciding", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("track"), - track as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::refund_submission_deposit { index } => { - ::subxt::ext::scale_encode::Variant { - name: "refund_submission_deposit", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_metadata { index, maybe_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "set_metadata", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_hash"), - maybe_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::submit { - proposal_origin: __self_0, - proposal: __self_1, - enactment_moment: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "submit", - "proposal_origin", - __self_0, - "proposal", - __self_1, - "enactment_moment", - &__self_2, - ) - } - Call::place_decision_deposit { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "place_decision_deposit", - "index", - &__self_0, - ) - } - Call::refund_decision_deposit { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "refund_decision_deposit", - "index", - &__self_0, - ) - } - Call::cancel { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "cancel", - "index", - &__self_0, - ) - } - Call::kill { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "kill", - "index", - &__self_0, - ) - } - Call::nudge_referendum { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "nudge_referendum", - "index", - &__self_0, - ) - } - Call::one_fewer_deciding { track: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "one_fewer_deciding", - "track", - &__self_0, - ) - } - Call::refund_submission_deposit { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "refund_submission_deposit", - "index", - &__self_0, - ) - } - Call::set_metadata { - index: __self_0, - maybe_hash: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "set_metadata", - "index", - __self_0, - "maybe_hash", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - NotOngoing, - #[codec(index = 1)] - HasDeposit, - #[codec(index = 2)] - BadTrack, - #[codec(index = 3)] - Full, - #[codec(index = 4)] - QueueEmpty, - #[codec(index = 5)] - BadReferendum, - #[codec(index = 6)] - NothingToDo, - #[codec(index = 7)] - NoTrack, - #[codec(index = 8)] - Unfinished, - #[codec(index = 9)] - NoPermission, - #[codec(index = 10)] - NoDeposit, - #[codec(index = 11)] - BadStatus, - #[codec(index = 12)] - PreimageNotExist, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotOngoing) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::HasDeposit) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::BadTrack) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Full) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::QueueEmpty) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::BadReferendum) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NothingToDo) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoTrack) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Unfinished) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoPermission) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoDeposit) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::BadStatus) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::PreimageNotExist) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::NotOngoing => 0_usize, - Error::HasDeposit => 0_usize, - Error::BadTrack => 0_usize, - Error::Full => 0_usize, - Error::QueueEmpty => 0_usize, - Error::BadReferendum => 0_usize, - Error::NothingToDo => 0_usize, - Error::NoTrack => 0_usize, - Error::Unfinished => 0_usize, - Error::NoPermission => 0_usize, - Error::NoDeposit => 0_usize, - Error::BadStatus => 0_usize, - Error::PreimageNotExist => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::NotOngoing => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::HasDeposit => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::BadTrack => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::Full => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::QueueEmpty => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::BadReferendum => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::NothingToDo => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::NoTrack => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::Unfinished => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::NoPermission => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::NoDeposit => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Error::BadStatus => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - Error::PreimageNotExist => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NotOngoing" { - return Ok(Error::NotOngoing); - } - if value.name() == "HasDeposit" { - return Ok(Error::HasDeposit); - } - if value.name() == "BadTrack" { - return Ok(Error::BadTrack); - } - if value.name() == "Full" { - return Ok(Error::Full); - } - if value.name() == "QueueEmpty" { - return Ok(Error::QueueEmpty); - } - if value.name() == "BadReferendum" { - return Ok(Error::BadReferendum); - } - if value.name() == "NothingToDo" { - return Ok(Error::NothingToDo); - } - if value.name() == "NoTrack" { - return Ok(Error::NoTrack); - } - if value.name() == "Unfinished" { - return Ok(Error::Unfinished); - } - if value.name() == "NoPermission" { - return Ok(Error::NoPermission); - } - if value.name() == "NoDeposit" { - return Ok(Error::NoDeposit); - } - if value.name() == "BadStatus" { - return Ok(Error::BadStatus); - } - if value.name() == "PreimageNotExist" { - return Ok(Error::PreimageNotExist); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "NotOngoing", - "HasDeposit", - "BadTrack", - "Full", - "QueueEmpty", - "BadReferendum", - "NothingToDo", - "NoTrack", - "Unfinished", - "NoPermission", - "NoDeposit", - "BadStatus", - "PreimageNotExist", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NotOngoing => { - ::subxt::ext::scale_encode::Variant { - name: "NotOngoing", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HasDeposit => { - ::subxt::ext::scale_encode::Variant { - name: "HasDeposit", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BadTrack => { - ::subxt::ext::scale_encode::Variant { - name: "BadTrack", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Full => { - ::subxt::ext::scale_encode::Variant { - name: "Full", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::QueueEmpty => { - ::subxt::ext::scale_encode::Variant { - name: "QueueEmpty", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BadReferendum => { - ::subxt::ext::scale_encode::Variant { - name: "BadReferendum", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NothingToDo => { - ::subxt::ext::scale_encode::Variant { - name: "NothingToDo", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoTrack => { - ::subxt::ext::scale_encode::Variant { - name: "NoTrack", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unfinished => { - ::subxt::ext::scale_encode::Variant { - name: "Unfinished", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoPermission => { - ::subxt::ext::scale_encode::Variant { - name: "NoPermission", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoDeposit => { - ::subxt::ext::scale_encode::Variant { - name: "NoDeposit", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BadStatus => { - ::subxt::ext::scale_encode::Variant { - name: "BadStatus", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PreimageNotExist => { - ::subxt::ext::scale_encode::Variant { - name: "PreimageNotExist", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::NotOngoing => "NotOngoing", - Error::HasDeposit => "HasDeposit", - Error::BadTrack => "BadTrack", - Error::Full => "Full", - Error::QueueEmpty => "QueueEmpty", - Error::BadReferendum => "BadReferendum", - Error::NothingToDo => "NothingToDo", - Error::NoTrack => "NoTrack", - Error::Unfinished => "Unfinished", - Error::NoPermission => "NoPermission", - Error::NoDeposit => "NoDeposit", - Error::BadStatus => "BadStatus", - Error::PreimageNotExist => "PreimageNotExist", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - Submitted { - index: ::core::primitive::u32, - track: ::core::primitive::u16, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - #[codec(index = 1)] - DecisionDepositPlaced { - index: ::core::primitive::u32, - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 2)] - DecisionDepositRefunded { - index: ::core::primitive::u32, - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 3)] - DepositSlashed { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 4)] - DecisionStarted { - index: ::core::primitive::u32, - track: ::core::primitive::u16, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, - >, - tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - }, - #[codec(index = 5)] - ConfirmStarted { index: ::core::primitive::u32 }, - #[codec(index = 6)] - ConfirmAborted { index: ::core::primitive::u32 }, - #[codec(index = 7)] - Confirmed { - index: ::core::primitive::u32, - tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - }, - #[codec(index = 8)] - Approved { index: ::core::primitive::u32 }, - #[codec(index = 9)] - Rejected { - index: ::core::primitive::u32, - tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - }, - #[codec(index = 10)] - TimedOut { - index: ::core::primitive::u32, - tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - }, - #[codec(index = 11)] - Cancelled { - index: ::core::primitive::u32, - tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - }, - #[codec(index = 12)] - Killed { - index: ::core::primitive::u32, - tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - }, - #[codec(index = 13)] - SubmissionDepositRefunded { - index: ::core::primitive::u32, - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 14)] - MetadataSet { - index: ::core::primitive::u32, - hash: ::subxt::utils::H256, - }, - #[codec(index = 15)] - MetadataCleared { - index: ::core::primitive::u32, - hash: ::subxt::utils::H256, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Submitted { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Submitted::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - track: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Submitted::track`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Submitted::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::DecisionDepositPlaced { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::DecisionDepositPlaced::index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::DecisionDepositPlaced::who`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::DecisionDepositPlaced::amount`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::DecisionDepositRefunded { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::DecisionDepositRefunded::index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::DecisionDepositRefunded::who`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::DecisionDepositRefunded::amount`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::DepositSlashed { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::DepositSlashed::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::DepositSlashed::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::DecisionStarted { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::DecisionStarted::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - track: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::DecisionStarted::track`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::DecisionStarted::proposal`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tally: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::DecisionStarted::tally`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ConfirmStarted { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ConfirmStarted::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ConfirmAborted { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ConfirmAborted::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Confirmed { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Confirmed::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tally: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Confirmed::tally`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Approved { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Approved::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Rejected { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Rejected::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tally: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Rejected::tally`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::TimedOut { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::TimedOut::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tally: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::TimedOut::tally`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Cancelled { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Cancelled::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tally: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Cancelled::tally`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Killed { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Killed::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tally: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Killed::tally`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::SubmissionDepositRefunded { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::SubmissionDepositRefunded::index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::SubmissionDepositRefunded::who`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::SubmissionDepositRefunded::amount`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::MetadataSet { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::MetadataSet::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::MetadataSet::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::MetadataCleared { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::MetadataCleared::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::MetadataCleared::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::Submitted { ref index, ref track, ref proposal } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(track), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal), - ) - } - Event::DecisionDepositPlaced { - ref index, - ref who, - ref amount, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::DecisionDepositRefunded { - ref index, - ref who, - ref amount, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::DepositSlashed { ref who, ref amount } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::DecisionStarted { - ref index, - ref track, - ref proposal, - ref tally, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(track), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(tally), - ) - } - Event::ConfirmStarted { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Event::ConfirmAborted { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Event::Confirmed { ref index, ref tally } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(tally), - ) - } - Event::Approved { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Event::Rejected { ref index, ref tally } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(tally), - ) - } - Event::TimedOut { ref index, ref tally } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(tally), - ) - } - Event::Cancelled { ref index, ref tally } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(tally), - ) - } - Event::Killed { ref index, ref tally } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(tally), - ) - } - Event::SubmissionDepositRefunded { - ref index, - ref who, - ref amount, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::MetadataSet { ref index, ref hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - } - Event::MetadataCleared { ref index, ref hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::Submitted { ref index, ref track, ref proposal } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - track, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proposal, - __codec_dest_edqy, - ); - } - Event::DecisionDepositPlaced { - ref index, - ref who, - ref amount, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::DecisionDepositRefunded { - ref index, - ref who, - ref amount, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::DepositSlashed { ref who, ref amount } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::DecisionStarted { - ref index, - ref track, - ref proposal, - ref tally, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - track, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proposal, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - tally, - __codec_dest_edqy, - ); - } - Event::ConfirmStarted { ref index } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Event::ConfirmAborted { ref index } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Event::Confirmed { ref index, ref tally } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - tally, - __codec_dest_edqy, - ); - } - Event::Approved { ref index } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Event::Rejected { ref index, ref tally } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - tally, - __codec_dest_edqy, - ); - } - Event::TimedOut { ref index, ref tally } => { - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - tally, - __codec_dest_edqy, - ); - } - Event::Cancelled { ref index, ref tally } => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - tally, - __codec_dest_edqy, - ); - } - Event::Killed { ref index, ref tally } => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - tally, - __codec_dest_edqy, - ); - } - Event::SubmissionDepositRefunded { - ref index, - ref who, - ref amount, - } => { - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::MetadataSet { ref index, ref hash } => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - } - Event::MetadataCleared { ref index, ref hash } => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Submitted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::Submitted { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - track: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("track"))? - }, - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Submitted { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - track: { - let val = *vals - .get(&Some("track")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "track".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("track"))? - }, - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - }) - }; - } - if value.name() == "DecisionDepositPlaced" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::DecisionDepositPlaced { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::DecisionDepositPlaced { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "DecisionDepositRefunded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::DecisionDepositRefunded { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::DecisionDepositRefunded { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "DepositSlashed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::DepositSlashed { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::DepositSlashed { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "DecisionStarted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Event::DecisionStarted { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - track: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("track"))? - }, - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - tally: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::DecisionStarted { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - track: { - let val = *vals - .get(&Some("track")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "track".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("track"))? - }, - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - tally: { - let val = *vals - .get(&Some("tally")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tally".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - }; - } - if value.name() == "ConfirmStarted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::ConfirmStarted { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::ConfirmStarted { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "ConfirmAborted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::ConfirmAborted { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::ConfirmAborted { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "Confirmed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Confirmed { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Confirmed { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = *vals - .get(&Some("tally")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tally".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - }; - } - if value.name() == "Approved" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Approved { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Approved { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "Rejected" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Rejected { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Rejected { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = *vals - .get(&Some("tally")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tally".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - }; - } - if value.name() == "TimedOut" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::TimedOut { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::TimedOut { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = *vals - .get(&Some("tally")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tally".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - }; - } - if value.name() == "Cancelled" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Cancelled { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Cancelled { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = *vals - .get(&Some("tally")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tally".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - }; - } - if value.name() == "Killed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Killed { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Killed { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - tally: { - let val = *vals - .get(&Some("tally")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tally".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - }) - }; - } - if value.name() == "SubmissionDepositRefunded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::SubmissionDepositRefunded { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::SubmissionDepositRefunded { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "MetadataSet" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::MetadataSet { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::MetadataSet { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - }; - } - if value.name() == "MetadataCleared" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::MetadataCleared { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::MetadataCleared { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Submitted", - "DecisionDepositPlaced", - "DecisionDepositRefunded", - "DepositSlashed", - "DecisionStarted", - "ConfirmStarted", - "ConfirmAborted", - "Confirmed", - "Approved", - "Rejected", - "TimedOut", - "Cancelled", - "Killed", - "SubmissionDepositRefunded", - "MetadataSet", - "MetadataCleared", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Submitted { index, track, proposal } => { - ::subxt::ext::scale_encode::Variant { - name: "Submitted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("track"), - track as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DecisionDepositPlaced { index, who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "DecisionDepositPlaced", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DecisionDepositRefunded { index, who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "DecisionDepositRefunded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DepositSlashed { who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "DepositSlashed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DecisionStarted { index, track, proposal, tally } => { - ::subxt::ext::scale_encode::Variant { - name: "DecisionStarted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("track"), - track as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ConfirmStarted { index } => { - ::subxt::ext::scale_encode::Variant { - name: "ConfirmStarted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ConfirmAborted { index } => { - ::subxt::ext::scale_encode::Variant { - name: "ConfirmAborted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Confirmed { index, tally } => { - ::subxt::ext::scale_encode::Variant { - name: "Confirmed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Approved { index } => { - ::subxt::ext::scale_encode::Variant { - name: "Approved", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Rejected { index, tally } => { - ::subxt::ext::scale_encode::Variant { - name: "Rejected", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TimedOut { index, tally } => { - ::subxt::ext::scale_encode::Variant { - name: "TimedOut", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Cancelled { index, tally } => { - ::subxt::ext::scale_encode::Variant { - name: "Cancelled", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Killed { index, tally } => { - ::subxt::ext::scale_encode::Variant { - name: "Killed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SubmissionDepositRefunded { index, who, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "SubmissionDepositRefunded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MetadataSet { index, hash } => { - ::subxt::ext::scale_encode::Variant { - name: "MetadataSet", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MetadataCleared { index, hash } => { - ::subxt::ext::scale_encode::Variant { - name: "MetadataCleared", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::Submitted { - index: __self_0, - track: __self_1, - proposal: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Submitted", - "index", - __self_0, - "track", - __self_1, - "proposal", - &__self_2, - ) - } - Event::DecisionDepositPlaced { - index: __self_0, - who: __self_1, - amount: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "DecisionDepositPlaced", - "index", - __self_0, - "who", - __self_1, - "amount", - &__self_2, - ) - } - Event::DecisionDepositRefunded { - index: __self_0, - who: __self_1, - amount: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "DecisionDepositRefunded", - "index", - __self_0, - "who", - __self_1, - "amount", - &__self_2, - ) - } - Event::DepositSlashed { - who: __self_0, - amount: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "DepositSlashed", - "who", - __self_0, - "amount", - &__self_1, - ) - } - Event::DecisionStarted { - index: __self_0, - track: __self_1, - proposal: __self_2, - tally: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "DecisionStarted", - "index", - __self_0, - "track", - __self_1, - "proposal", - __self_2, - "tally", - &__self_3, - ) - } - Event::ConfirmStarted { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ConfirmStarted", - "index", - &__self_0, - ) - } - Event::ConfirmAborted { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ConfirmAborted", - "index", - &__self_0, - ) - } - Event::Confirmed { index: __self_0, tally: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Confirmed", - "index", - __self_0, - "tally", - &__self_1, - ) - } - Event::Approved { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Approved", - "index", - &__self_0, - ) - } - Event::Rejected { index: __self_0, tally: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Rejected", - "index", - __self_0, - "tally", - &__self_1, - ) - } - Event::TimedOut { index: __self_0, tally: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "TimedOut", - "index", - __self_0, - "tally", - &__self_1, - ) - } - Event::Cancelled { index: __self_0, tally: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Cancelled", - "index", - __self_0, - "tally", - &__self_1, - ) - } - Event::Killed { index: __self_0, tally: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Killed", - "index", - __self_0, - "tally", - &__self_1, - ) - } - Event::SubmissionDepositRefunded { - index: __self_0, - who: __self_1, - amount: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SubmissionDepositRefunded", - "index", - __self_0, - "who", - __self_1, - "amount", - &__self_2, - ) - } - Event::MetadataSet { index: __self_0, hash: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MetadataSet", - "index", - __self_0, - "hash", - &__self_1, - ) - } - Event::MetadataCleared { - index: __self_0, - hash: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MetadataCleared", - "index", - __self_0, - "hash", - &__self_1, - ) - } - } - } - } - } - pub mod types { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Curve { - #[codec(index = 0)] - LinearDecreasing { - length: runtime_types::sp_arithmetic::per_things::Perbill, - floor: runtime_types::sp_arithmetic::per_things::Perbill, - ceil: runtime_types::sp_arithmetic::per_things::Perbill, - }, - #[codec(index = 1)] - SteppedDecreasing { - begin: runtime_types::sp_arithmetic::per_things::Perbill, - end: runtime_types::sp_arithmetic::per_things::Perbill, - step: runtime_types::sp_arithmetic::per_things::Perbill, - period: runtime_types::sp_arithmetic::per_things::Perbill, - }, - #[codec(index = 2)] - Reciprocal { - factor: runtime_types::sp_arithmetic::fixed_point::FixedI64, - x_offset: runtime_types::sp_arithmetic::fixed_point::FixedI64, - y_offset: runtime_types::sp_arithmetic::fixed_point::FixedI64, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Curve { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Curve`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Curve::LinearDecreasing { - length: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Curve::LinearDecreasing::length`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - floor: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Curve::LinearDecreasing::floor`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ceil: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Curve::LinearDecreasing::ceil`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Curve::SteppedDecreasing { - begin: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Curve::SteppedDecreasing::begin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - end: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Curve::SteppedDecreasing::end`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - step: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Curve::SteppedDecreasing::step`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - period: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Curve::SteppedDecreasing::period`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Curve::Reciprocal { - factor: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Curve::Reciprocal::factor`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - x_offset: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Curve::Reciprocal::x_offset`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - y_offset: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Curve::Reciprocal::y_offset`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Curve`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Curve { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Curve::LinearDecreasing { - ref length, - ref floor, - ref ceil, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(length), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(floor), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(ceil), - ) - } - Curve::SteppedDecreasing { - ref begin, - ref end, - ref step, - ref period, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(begin), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(end)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(step), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(period), - ) - } - Curve::Reciprocal { - ref factor, - ref x_offset, - ref y_offset, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(factor), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(x_offset), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(y_offset), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Curve::LinearDecreasing { - ref length, - ref floor, - ref ceil, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - length, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - floor, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ceil, - __codec_dest_edqy, - ); - } - Curve::SteppedDecreasing { - ref begin, - ref end, - ref step, - ref period, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - begin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - end, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - step, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - period, - __codec_dest_edqy, - ); - } - Curve::Reciprocal { - ref factor, - ref x_offset, - ref y_offset, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - factor, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - x_offset, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - y_offset, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Curve {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Curve { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Curve; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "LinearDecreasing" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Curve::LinearDecreasing { - length: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("length"))? - }, - floor: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("floor"))? - }, - ceil: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ceil"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Curve::LinearDecreasing { - length: { - let val = *vals - .get(&Some("length")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "length".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("length"))? - }, - floor: { - let val = *vals - .get(&Some("floor")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "floor".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("floor"))? - }, - ceil: { - let val = *vals - .get(&Some("ceil")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ceil".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ceil"))? - }, - }) - }; - } - if value.name() == "SteppedDecreasing" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Curve::SteppedDecreasing { - begin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("begin"))? - }, - end: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - step: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("step"))? - }, - period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("period"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Curve::SteppedDecreasing { - begin: { - let val = *vals - .get(&Some("begin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "begin".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("begin"))? - }, - end: { - let val = *vals - .get(&Some("end")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "end".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - step: { - let val = *vals - .get(&Some("step")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "step".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("step"))? - }, - period: { - let val = *vals - .get(&Some("period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "period".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("period"))? - }, - }) - }; - } - if value.name() == "Reciprocal" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Curve::Reciprocal { - factor: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("factor"))? - }, - x_offset: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("x_offset"))? - }, - y_offset: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("y_offset"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Curve::Reciprocal { - factor: { - let val = *vals - .get(&Some("factor")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "factor".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("factor"))? - }, - x_offset: { - let val = *vals - .get(&Some("x_offset")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "x_offset".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("x_offset"))? - }, - y_offset: { - let val = *vals - .get(&Some("y_offset")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "y_offset".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("y_offset"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "LinearDecreasing", - "SteppedDecreasing", - "Reciprocal", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Curve { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::LinearDecreasing { length, floor, ceil } => { - ::subxt::ext::scale_encode::Variant { - name: "LinearDecreasing", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("length"), - length as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("floor"), - floor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ceil"), - ceil as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SteppedDecreasing { begin, end, step, period } => { - ::subxt::ext::scale_encode::Variant { - name: "SteppedDecreasing", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("begin"), - begin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("end"), - end as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("step"), - step as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("period"), - period as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Reciprocal { factor, x_offset, y_offset } => { - ::subxt::ext::scale_encode::Variant { - name: "Reciprocal", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("factor"), - factor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("x_offset"), - x_offset as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("y_offset"), - y_offset as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Curve { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Curve::LinearDecreasing { - length: __self_0, - floor: __self_1, - ceil: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "LinearDecreasing", - "length", - __self_0, - "floor", - __self_1, - "ceil", - &__self_2, - ) - } - Curve::SteppedDecreasing { - begin: __self_0, - end: __self_1, - step: __self_2, - period: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "SteppedDecreasing", - "begin", - __self_0, - "end", - __self_1, - "step", - __self_2, - "period", - &__self_3, - ) - } - Curve::Reciprocal { - factor: __self_0, - x_offset: __self_1, - y_offset: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Reciprocal", - "factor", - __self_0, - "x_offset", - __self_1, - "y_offset", - &__self_2, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DecidingStatus<_0> { - pub since: _0, - pub confirming: ::core::option::Option<_0>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for DecidingStatus<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(DecidingStatus::<_0> { - since: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DecidingStatus::since`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - confirming: { - let __codec_res_edqy = <::core::option::Option< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DecidingStatus::confirming`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for DecidingStatus<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.since), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.confirming), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.since, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.confirming, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for DecidingStatus<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for DecidingStatus<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DecidingStatus<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DecidingStatus { - since: { - let val = *vals - .get(&Some("since")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "since".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("since"))? - }, - confirming: { - let val = *vals - .get(&Some("confirming")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "confirming".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("confirming"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(DecidingStatus { - since: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("since"))? - }, - confirming: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("confirming"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for DecidingStatus<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for DecidingStatus<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DecidingStatus { since, confirming } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("since"), - since as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("confirming"), - confirming as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for DecidingStatus<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DecidingStatus { since, confirming } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("since"), - since as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("confirming"), - confirming as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for DecidingStatus<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "DecidingStatus", - "since", - &self.since, - "confirming", - &&self.confirming, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Deposit<_0, _1> { - pub who: _0, - pub amount: _1, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for Deposit<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Deposit::<_0, _1> { - who: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Deposit::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Deposit::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for Deposit<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike for Deposit<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>( - ::core::marker::PhantomData<(_0, _1)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for Deposit<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Deposit<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Deposit { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Deposit { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for Deposit<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for Deposit<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Deposit { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for Deposit<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Deposit { who, amount } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - > ::core::fmt::Debug for Deposit<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Deposit", - "who", - &self.who, - "amount", - &&self.amount, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ReferendumInfo<_0, _1, _2, _3, _4, _5, _6, _7> { - #[codec(index = 0)] - Ongoing( - runtime_types::pallet_referenda::types::ReferendumStatus< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - >, - ), - #[codec(index = 1)] - Approved( - _2, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - ), - #[codec(index = 2)] - Rejected( - _2, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - ), - #[codec(index = 3)] - Cancelled( - _2, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - ), - #[codec(index = 4)] - TimedOut( - _2, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - ), - #[codec(index = 5)] - Killed(_2), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2, _3, _4, _5, _6, _7> ::subxt::ext::codec::Decode - for ReferendumInfo<_0, _1, _2, _3, _4, _5, _6, _7> - where - runtime_types::pallet_referenda::types::ReferendumStatus< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_referenda::types::ReferendumStatus< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - >: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `ReferendumInfo`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ReferendumInfo::< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - >::Ongoing({ - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumInfo::Ongoing.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ReferendumInfo::< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - >::Approved( - { - let __codec_res_edqy = <_2 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumInfo::Approved.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumInfo::Approved.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumInfo::Approved.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ReferendumInfo::< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - >::Rejected( - { - let __codec_res_edqy = <_2 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumInfo::Rejected.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumInfo::Rejected.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumInfo::Rejected.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ReferendumInfo::< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - >::Cancelled( - { - let __codec_res_edqy = <_2 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumInfo::Cancelled.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumInfo::Cancelled.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumInfo::Cancelled.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ReferendumInfo::< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - >::TimedOut( - { - let __codec_res_edqy = <_2 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumInfo::TimedOut.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumInfo::TimedOut.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumInfo::TimedOut.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ReferendumInfo::< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - >::Killed({ - let __codec_res_edqy = <_2 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumInfo::Killed.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `ReferendumInfo`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2, _3, _4, _5, _6, _7> ::subxt::ext::codec::Encode - for ReferendumInfo<_0, _1, _2, _3, _4, _5, _6, _7> - where - runtime_types::pallet_referenda::types::ReferendumStatus< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_referenda::types::ReferendumStatus< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - >: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - ReferendumInfo::Ongoing(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - ReferendumInfo::Approved(ref aa, ref ba, ref ca) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - } - ReferendumInfo::Rejected(ref aa, ref ba, ref ca) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - } - ReferendumInfo::Cancelled(ref aa, ref ba, ref ca) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - } - ReferendumInfo::TimedOut(ref aa, ref ba, ref ca) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - } - ReferendumInfo::Killed(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - ReferendumInfo::Ongoing(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - ReferendumInfo::Approved(ref aa, ref ba, ref ca) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - } - ReferendumInfo::Rejected(ref aa, ref ba, ref ca) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - } - ReferendumInfo::Cancelled(ref aa, ref ba, ref ca) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - } - ReferendumInfo::TimedOut(ref aa, ref ba, ref ca) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - } - ReferendumInfo::Killed(ref aa) => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - > ::subxt::ext::codec::EncodeLike - for ReferendumInfo<_0, _1, _2, _3, _4, _5, _6, _7> - where - runtime_types::pallet_referenda::types::ReferendumStatus< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_referenda::types::ReferendumStatus< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - >: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2, _3, _4, _5, _6, _7>( - ::core::marker::PhantomData<(_0, _1, _2, _3, _4, _5, _6, _7)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - > ::subxt::ext::scale_decode::IntoVisitor - for ReferendumInfo<_0, _1, _2, _3, _4, _5, _6, _7> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _3: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_3 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _4: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_4 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _5: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_5 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _6: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_6 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _7: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_7 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2, _3, _4, _5, _6, _7>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - > ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2, _3, _4, _5, _6, _7> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _3: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_3 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _4: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_4 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _5: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_5 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _6: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_6 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _7: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_7 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReferendumInfo< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - >; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Ongoing" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - ReferendumInfo::Ongoing({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Approved" { - let fields = value.fields(); - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - return Ok( - ReferendumInfo::Approved( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ); - } - if value.name() == "Rejected" { - let fields = value.fields(); - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - return Ok( - ReferendumInfo::Rejected( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ); - } - if value.name() == "Cancelled" { - let fields = value.fields(); - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - return Ok( - ReferendumInfo::Cancelled( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ); - } - if value.name() == "TimedOut" { - let fields = value.fields(); - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - return Ok( - ReferendumInfo::TimedOut( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ); - } - if value.name() == "Killed" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - ReferendumInfo::Killed({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Ongoing", - "Approved", - "Rejected", - "Cancelled", - "TimedOut", - "Killed", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - > ::subxt::ext::scale_encode::EncodeAsType - for ReferendumInfo<_0, _1, _2, _3, _4, _5, _6, _7> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - _3: ::subxt::ext::scale_encode::EncodeAsType, - _4: ::subxt::ext::scale_encode::EncodeAsType, - _5: ::subxt::ext::scale_encode::EncodeAsType, - _6: ::subxt::ext::scale_encode::EncodeAsType, - _7: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Ongoing(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Ongoing", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Approved(_0, _1, _2) => { - ::subxt::ext::scale_encode::Variant { - name: "Approved", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Rejected(_0, _1, _2) => { - ::subxt::ext::scale_encode::Variant { - name: "Rejected", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Cancelled(_0, _1, _2) => { - ::subxt::ext::scale_encode::Variant { - name: "Cancelled", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TimedOut(_0, _1, _2) => { - ::subxt::ext::scale_encode::Variant { - name: "TimedOut", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Killed(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Killed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - _3: ::core::fmt::Debug, - _4: ::core::fmt::Debug, - _5: ::core::fmt::Debug, - _6: ::core::fmt::Debug, - _7: ::core::fmt::Debug, - > ::core::fmt::Debug - for ReferendumInfo<_0, _1, _2, _3, _4, _5, _6, _7> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - ReferendumInfo::Ongoing(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Ongoing", - &__self_0, - ) - } - ReferendumInfo::Approved(__self_0, __self_1, __self_2) => { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "Approved", - __self_0, - __self_1, - &__self_2, - ) - } - ReferendumInfo::Rejected(__self_0, __self_1, __self_2) => { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "Rejected", - __self_0, - __self_1, - &__self_2, - ) - } - ReferendumInfo::Cancelled(__self_0, __self_1, __self_2) => { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "Cancelled", - __self_0, - __self_1, - &__self_2, - ) - } - ReferendumInfo::TimedOut(__self_0, __self_1, __self_2) => { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "TimedOut", - __self_0, - __self_1, - &__self_2, - ) - } - ReferendumInfo::Killed(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Killed", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReferendumStatus<_0, _1, _2, _3, _4, _5, _6, _7> { - pub track: _0, - pub origin: _1, - pub proposal: _3, - pub enactment: runtime_types::frame_support::traits::schedule::DispatchTime< - _2, - >, - pub submitted: _2, - pub submission_deposit: runtime_types::pallet_referenda::types::Deposit< - _6, - _4, - >, - pub decision_deposit: ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - pub deciding: ::core::option::Option< - runtime_types::pallet_referenda::types::DecidingStatus<_2>, - >, - pub tally: _5, - pub in_queue: ::core::primitive::bool, - pub alarm: ::core::option::Option<(_2, _7)>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2, _3, _4, _5, _6, _7> ::subxt::ext::codec::Decode - for ReferendumStatus<_0, _1, _2, _3, _4, _5, _6, _7> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _3: ::subxt::ext::codec::Decode, - _3: ::subxt::ext::codec::Decode, - runtime_types::frame_support::traits::schedule::DispatchTime< - _2, - >: ::subxt::ext::codec::Decode, - runtime_types::frame_support::traits::schedule::DispatchTime< - _2, - >: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - runtime_types::pallet_referenda::types::Deposit< - _6, - _4, - >: ::subxt::ext::codec::Decode, - runtime_types::pallet_referenda::types::Deposit< - _6, - _4, - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::DecidingStatus<_2>, - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - runtime_types::pallet_referenda::types::DecidingStatus<_2>, - >: ::subxt::ext::codec::Decode, - _5: ::subxt::ext::codec::Decode, - _5: ::subxt::ext::codec::Decode, - ::core::option::Option< - (_2, _7), - >: ::subxt::ext::codec::Decode, - ::core::option::Option< - (_2, _7), - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ReferendumStatus::< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - > { - track: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumStatus::track`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - origin: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumStatus::origin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposal: { - let __codec_res_edqy = <_3 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumStatus::proposal`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - enactment: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumStatus::enactment`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - submitted: { - let __codec_res_edqy = <_2 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumStatus::submitted`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - submission_deposit: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ReferendumStatus::submission_deposit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - decision_deposit: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ReferendumStatus::decision_deposit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deciding: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::pallet_referenda::types::DecidingStatus<_2>, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumStatus::deciding`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tally: { - let __codec_res_edqy = <_5 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumStatus::tally`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - in_queue: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumStatus::in_queue`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - alarm: { - let __codec_res_edqy = <::core::option::Option< - (_2, _7), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReferendumStatus::alarm`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2, _3, _4, _5, _6, _7> ::subxt::ext::codec::Encode - for ReferendumStatus<_0, _1, _2, _3, _4, _5, _6, _7> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - runtime_types::frame_support::traits::schedule::DispatchTime< - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::frame_support::traits::schedule::DispatchTime< - _2, - >: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - runtime_types::pallet_referenda::types::Deposit< - _6, - _4, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_referenda::types::Deposit< - _6, - _4, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::DecidingStatus<_2>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::DecidingStatus<_2>, - >: ::subxt::ext::codec::Encode, - _5: ::subxt::ext::codec::Encode, - _5: ::subxt::ext::codec::Encode, - ::core::option::Option< - (_2, _7), - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - (_2, _7), - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.track), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposal), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.enactment), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.submitted), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.submission_deposit, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.decision_deposit, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deciding), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.tally), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.in_queue), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.alarm), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.track, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proposal, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.enactment, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.submitted, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.submission_deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.decision_deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deciding, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.tally, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.in_queue, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.alarm, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - > ::subxt::ext::codec::EncodeLike - for ReferendumStatus<_0, _1, _2, _3, _4, _5, _6, _7> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - runtime_types::frame_support::traits::schedule::DispatchTime< - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::frame_support::traits::schedule::DispatchTime< - _2, - >: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - runtime_types::pallet_referenda::types::Deposit< - _6, - _4, - >: ::subxt::ext::codec::Encode, - runtime_types::pallet_referenda::types::Deposit< - _6, - _4, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::DecidingStatus<_2>, - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - runtime_types::pallet_referenda::types::DecidingStatus<_2>, - >: ::subxt::ext::codec::Encode, - _5: ::subxt::ext::codec::Encode, - _5: ::subxt::ext::codec::Encode, - ::core::option::Option< - (_2, _7), - >: ::subxt::ext::codec::Encode, - ::core::option::Option< - (_2, _7), - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2, _3, _4, _5, _6, _7>( - ::core::marker::PhantomData<(_0, _1, _2, _3, _4, _5, _6, _7)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - > ::subxt::ext::scale_decode::IntoVisitor - for ReferendumStatus<_0, _1, _2, _3, _4, _5, _6, _7> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _3: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_3 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _4: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_4 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _5: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_5 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _6: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_6 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _7: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_7 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2, _3, _4, _5, _6, _7>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - > ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2, _3, _4, _5, _6, _7> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _3: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_3 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _4: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_4 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _5: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_5 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _6: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_6 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _7: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_7 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReferendumStatus< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - >; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ReferendumStatus { - track: { - let val = *vals - .get(&Some("track")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "track".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("track"))? - }, - origin: { - let val = *vals - .get(&Some("origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "origin".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - proposal: { - let val = *vals - .get(&Some("proposal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - enactment: { - let val = *vals - .get(&Some("enactment")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "enactment".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("enactment"))? - }, - submitted: { - let val = *vals - .get(&Some("submitted")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "submitted".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("submitted"))? - }, - submission_deposit: { - let val = *vals - .get(&Some("submission_deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "submission_deposit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("submission_deposit"))? - }, - decision_deposit: { - let val = *vals - .get(&Some("decision_deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "decision_deposit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("decision_deposit"))? - }, - deciding: { - let val = *vals - .get(&Some("deciding")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deciding".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deciding"))? - }, - tally: { - let val = *vals - .get(&Some("tally")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tally".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - in_queue: { - let val = *vals - .get(&Some("in_queue")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "in_queue".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("in_queue"))? - }, - alarm: { - let val = *vals - .get(&Some("alarm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "alarm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("alarm"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 11usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 11usize, - }), - ); - } - let vals = value; - Ok(ReferendumStatus { - track: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("track"))? - }, - origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - proposal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal"))? - }, - enactment: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("enactment"))? - }, - submitted: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("submitted"))? - }, - submission_deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("submission_deposit"))? - }, - decision_deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("decision_deposit"))? - }, - deciding: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deciding"))? - }, - tally: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tally"))? - }, - in_queue: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("in_queue"))? - }, - alarm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("alarm"))? - }, - }) - } - } - impl< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - > ::subxt::ext::scale_decode::DecodeAsFields - for ReferendumStatus<_0, _1, _2, _3, _4, _5, _6, _7> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _3: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_3 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _4: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_4 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _5: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_5 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _6: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_6 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _7: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_7 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - > ::subxt::ext::scale_encode::EncodeAsType - for ReferendumStatus<_0, _1, _2, _3, _4, _5, _6, _7> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - _3: ::subxt::ext::scale_encode::EncodeAsType, - _4: ::subxt::ext::scale_encode::EncodeAsType, - _5: ::subxt::ext::scale_encode::EncodeAsType, - _6: ::subxt::ext::scale_encode::EncodeAsType, - _7: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReferendumStatus { - track, - origin, - proposal, - enactment, - submitted, - submission_deposit, - decision_deposit, - deciding, - tally, - in_queue, - alarm, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("track"), - track as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("enactment"), - enactment as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("submitted"), - submitted as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("submission_deposit"), - submission_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("decision_deposit"), - decision_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deciding"), - deciding as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("in_queue"), - in_queue as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("alarm"), - alarm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - > ::subxt::ext::scale_encode::EncodeAsFields - for ReferendumStatus<_0, _1, _2, _3, _4, _5, _6, _7> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - _3: ::subxt::ext::scale_encode::EncodeAsType, - _4: ::subxt::ext::scale_encode::EncodeAsType, - _5: ::subxt::ext::scale_encode::EncodeAsType, - _6: ::subxt::ext::scale_encode::EncodeAsType, - _7: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReferendumStatus { - track, - origin, - proposal, - enactment, - submitted, - submission_deposit, - decision_deposit, - deciding, - tally, - in_queue, - alarm, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("track"), - track as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposal"), - proposal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("enactment"), - enactment as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("submitted"), - submitted as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("submission_deposit"), - submission_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("decision_deposit"), - decision_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deciding"), - deciding as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tally"), - tally as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("in_queue"), - in_queue as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("alarm"), - alarm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - _3: ::core::fmt::Debug, - _4: ::core::fmt::Debug, - _5: ::core::fmt::Debug, - _6: ::core::fmt::Debug, - _7: ::core::fmt::Debug, - > ::core::fmt::Debug - for ReferendumStatus<_0, _1, _2, _3, _4, _5, _6, _7> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "track", - "origin", - "proposal", - "enactment", - "submitted", - "submission_deposit", - "decision_deposit", - "deciding", - "tally", - "in_queue", - "alarm", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.track, - &self.origin, - &self.proposal, - &self.enactment, - &self.submitted, - &self.submission_deposit, - &self.decision_deposit, - &self.deciding, - &self.tally, - &self.in_queue, - &&self.alarm, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "ReferendumStatus", - names, - values, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TrackInfo<_0, _1> { - pub name: ::std::string::String, - pub max_deciding: ::core::primitive::u32, - 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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for TrackInfo<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(TrackInfo::<_0, _1> { - name: { - let __codec_res_edqy = <::std::string::String as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TrackInfo::name`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_deciding: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TrackInfo::max_deciding`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - decision_deposit: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TrackInfo::decision_deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - prepare_period: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TrackInfo::prepare_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - decision_period: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TrackInfo::decision_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - confirm_period: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TrackInfo::confirm_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - min_enactment_period: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `TrackInfo::min_enactment_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - min_approval: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TrackInfo::min_approval`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - min_support: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `TrackInfo::min_support`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for TrackInfo<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.name), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_deciding), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.decision_deposit, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.prepare_period), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.decision_period, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.confirm_period), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.min_enactment_period, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.min_approval), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.min_support), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.name, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_deciding, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.decision_deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.prepare_period, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.decision_period, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.confirm_period, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.min_enactment_period, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.min_approval, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.min_support, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for TrackInfo<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>( - ::core::marker::PhantomData<(_0, _1)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for TrackInfo<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = TrackInfo<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(TrackInfo { - name: { - let val = *vals - .get(&Some("name")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "name".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("name"))? - }, - max_deciding: { - let val = *vals - .get(&Some("max_deciding")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_deciding".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_deciding"))? - }, - decision_deposit: { - let val = *vals - .get(&Some("decision_deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "decision_deposit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("decision_deposit"))? - }, - prepare_period: { - let val = *vals - .get(&Some("prepare_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prepare_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("prepare_period"))? - }, - decision_period: { - let val = *vals - .get(&Some("decision_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "decision_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("decision_period"))? - }, - confirm_period: { - let val = *vals - .get(&Some("confirm_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "confirm_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("confirm_period"))? - }, - min_enactment_period: { - let val = *vals - .get(&Some("min_enactment_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "min_enactment_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("min_enactment_period"))? - }, - min_approval: { - let val = *vals - .get(&Some("min_approval")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "min_approval".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("min_approval"))? - }, - min_support: { - let val = *vals - .get(&Some("min_support")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "min_support".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("min_support"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 9usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 9usize, - }), - ); - } - let vals = value; - Ok(TrackInfo { - name: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("name"))? - }, - max_deciding: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_deciding"))? - }, - decision_deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("decision_deposit"))? - }, - prepare_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("prepare_period"))? - }, - decision_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("decision_period"))? - }, - confirm_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("confirm_period"))? - }, - min_enactment_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("min_enactment_period"))? - }, - min_approval: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("min_approval"))? - }, - min_support: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("min_support"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for TrackInfo<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for TrackInfo<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TrackInfo { - name, - max_deciding, - decision_deposit, - prepare_period, - decision_period, - confirm_period, - min_enactment_period, - min_approval, - min_support, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("name"), - name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_deciding"), - max_deciding - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("decision_deposit"), - decision_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prepare_period"), - prepare_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("decision_period"), - decision_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("confirm_period"), - confirm_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_enactment_period"), - min_enactment_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_approval"), - min_approval - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_support"), - min_support as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for TrackInfo<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let TrackInfo { - name, - max_deciding, - decision_deposit, - prepare_period, - decision_period, - confirm_period, - min_enactment_period, - min_approval, - min_support, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("name"), - name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_deciding"), - max_deciding - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("decision_deposit"), - decision_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prepare_period"), - prepare_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("decision_period"), - decision_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("confirm_period"), - confirm_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_enactment_period"), - min_enactment_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_approval"), - min_approval - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_support"), - min_support as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - > ::core::fmt::Debug for TrackInfo<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "name", - "max_deciding", - "decision_deposit", - "prepare_period", - "decision_period", - "confirm_period", - "min_enactment_period", - "min_approval", - "min_support", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.name, - &self.max_deciding, - &self.decision_deposit, - &self.prepare_period, - &self.decision_period, - &self.confirm_period, - &self.min_enactment_period, - &self.min_approval, - &&self.min_support, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "TrackInfo", - names, - values, - ) - } - } - } - } - pub mod pallet_scheduler { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - 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)] - cancel { - when: ::core::primitive::u32, - index: ::core::primitive::u32, - }, - #[codec(index = 2)] - 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)] - cancel_named { id: [::core::primitive::u8; 32usize] }, - #[codec(index = 4)] - 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)] - 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, - >, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::schedule { - when: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::schedule::when`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_periodic: { - let __codec_res_edqy = <::core::option::Option< - (::core::primitive::u32, ::core::primitive::u32), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::schedule::maybe_periodic`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - priority: { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::schedule::priority`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::schedule::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::cancel { - when: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::cancel::when`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::cancel::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::schedule_named { - id: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::schedule_named::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - when: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::schedule_named::when`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_periodic: { - let __codec_res_edqy = <::core::option::Option< - (::core::primitive::u32, ::core::primitive::u32), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::schedule_named::maybe_periodic`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - priority: { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::schedule_named::priority`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::schedule_named::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::cancel_named { - id: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::cancel_named::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::schedule_after { - after: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::schedule_after::after`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_periodic: { - let __codec_res_edqy = <::core::option::Option< - (::core::primitive::u32, ::core::primitive::u32), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::schedule_after::maybe_periodic`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - priority: { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::schedule_after::priority`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::schedule_after::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::schedule_named_after { - id: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::schedule_named_after::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - after: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::schedule_named_after::after`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_periodic: { - let __codec_res_edqy = <::core::option::Option< - (::core::primitive::u32, ::core::primitive::u32), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::schedule_named_after::maybe_periodic`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - priority: { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::schedule_named_after::priority`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::schedule_named_after::call`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::schedule { - ref when, - ref maybe_periodic, - ref priority, - ref call, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(when), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maybe_periodic), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(priority), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call), - ) - } - Call::cancel { ref when, ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(when), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Call::schedule_named { - ref id, - ref when, - ref maybe_periodic, - ref priority, - ref call, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(when), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maybe_periodic), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(priority), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call), - ) - } - Call::cancel_named { ref id } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - } - Call::schedule_after { - ref after, - ref maybe_periodic, - ref priority, - ref call, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(after), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maybe_periodic), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(priority), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call), - ) - } - Call::schedule_named_after { - ref id, - ref after, - ref maybe_periodic, - ref priority, - ref call, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(after), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maybe_periodic), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(priority), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::schedule { - ref when, - ref maybe_periodic, - ref priority, - ref call, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - when, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - maybe_periodic, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - priority, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call, - __codec_dest_edqy, - ); - } - Call::cancel { ref when, ref index } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - when, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Call::schedule_named { - ref id, - ref when, - ref maybe_periodic, - ref priority, - ref call, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - when, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - maybe_periodic, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - priority, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call, - __codec_dest_edqy, - ); - } - Call::cancel_named { ref id } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - } - Call::schedule_after { - ref after, - ref maybe_periodic, - ref priority, - ref call, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - after, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - maybe_periodic, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - priority, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call, - __codec_dest_edqy, - ); - } - Call::schedule_named_after { - ref id, - ref after, - ref maybe_periodic, - ref priority, - ref call, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - after, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - maybe_periodic, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - priority, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "schedule" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Call::schedule { - when: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - maybe_periodic: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - priority: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::schedule { - when: { - let val = *vals - .get(&Some("when")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "when".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - maybe_periodic: { - let val = *vals - .get(&Some("maybe_periodic")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_periodic".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - priority: { - let val = *vals - .get(&Some("priority")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "priority".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - }; - } - if value.name() == "cancel" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::cancel { - when: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::cancel { - when: { - let val = *vals - .get(&Some("when")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "when".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "schedule_named" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Call::schedule_named { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - when: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - maybe_periodic: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - priority: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::schedule_named { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - when: { - let val = *vals - .get(&Some("when")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "when".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - maybe_periodic: { - let val = *vals - .get(&Some("maybe_periodic")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_periodic".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - priority: { - let val = *vals - .get(&Some("priority")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "priority".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - }; - } - if value.name() == "cancel_named" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::cancel_named { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::cancel_named { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - }; - } - if value.name() == "schedule_after" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Call::schedule_after { - after: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("after"))? - }, - maybe_periodic: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - priority: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::schedule_after { - after: { - let val = *vals - .get(&Some("after")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "after".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("after"))? - }, - maybe_periodic: { - let val = *vals - .get(&Some("maybe_periodic")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_periodic".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - priority: { - let val = *vals - .get(&Some("priority")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "priority".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - }; - } - if value.name() == "schedule_named_after" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Call::schedule_named_after { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - after: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("after"))? - }, - maybe_periodic: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - priority: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::schedule_named_after { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - after: { - let val = *vals - .get(&Some("after")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "after".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("after"))? - }, - maybe_periodic: { - let val = *vals - .get(&Some("maybe_periodic")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_periodic".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - priority: { - let val = *vals - .get(&Some("priority")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "priority".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "schedule", - "cancel", - "schedule_named", - "cancel_named", - "schedule_after", - "schedule_named_after", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::schedule { when, maybe_periodic, priority, call } => { - ::subxt::ext::scale_encode::Variant { - name: "schedule", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("when"), - when as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_periodic"), - maybe_periodic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("priority"), - priority as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::cancel { when, index } => { - ::subxt::ext::scale_encode::Variant { - name: "cancel", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("when"), - when as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::schedule_named { - id, - when, - maybe_periodic, - priority, - call, - } => { - ::subxt::ext::scale_encode::Variant { - name: "schedule_named", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("when"), - when as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_periodic"), - maybe_periodic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("priority"), - priority as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::cancel_named { id } => { - ::subxt::ext::scale_encode::Variant { - name: "cancel_named", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::schedule_after { - after, - maybe_periodic, - priority, - call, - } => { - ::subxt::ext::scale_encode::Variant { - name: "schedule_after", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("after"), - after as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_periodic"), - maybe_periodic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("priority"), - priority as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::schedule_named_after { - id, - after, - maybe_periodic, - priority, - call, - } => { - ::subxt::ext::scale_encode::Variant { - name: "schedule_named_after", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("after"), - after as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_periodic"), - maybe_periodic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("priority"), - priority as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::schedule { - when: __self_0, - maybe_periodic: __self_1, - priority: __self_2, - call: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "schedule", - "when", - __self_0, - "maybe_periodic", - __self_1, - "priority", - __self_2, - "call", - &__self_3, - ) - } - Call::cancel { when: __self_0, index: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "cancel", - "when", - __self_0, - "index", - &__self_1, - ) - } - Call::schedule_named { - id: __self_0, - when: __self_1, - maybe_periodic: __self_2, - priority: __self_3, - call: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "schedule_named", - "id", - __self_0, - "when", - __self_1, - "maybe_periodic", - __self_2, - "priority", - __self_3, - "call", - &__self_4, - ) - } - Call::cancel_named { id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "cancel_named", - "id", - &__self_0, - ) - } - Call::schedule_after { - after: __self_0, - maybe_periodic: __self_1, - priority: __self_2, - call: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "schedule_after", - "after", - __self_0, - "maybe_periodic", - __self_1, - "priority", - __self_2, - "call", - &__self_3, - ) - } - Call::schedule_named_after { - id: __self_0, - after: __self_1, - maybe_periodic: __self_2, - priority: __self_3, - call: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "schedule_named_after", - "id", - __self_0, - "after", - __self_1, - "maybe_periodic", - __self_2, - "priority", - __self_3, - "call", - &__self_4, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - FailedToSchedule, - #[codec(index = 1)] - NotFound, - #[codec(index = 2)] - TargetBlockNumberInPast, - #[codec(index = 3)] - RescheduleNoChange, - #[codec(index = 4)] - Named, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::FailedToSchedule) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotFound) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TargetBlockNumberInPast) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::RescheduleNoChange) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Named) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::FailedToSchedule => 0_usize, - Error::NotFound => 0_usize, - Error::TargetBlockNumberInPast => 0_usize, - Error::RescheduleNoChange => 0_usize, - Error::Named => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::FailedToSchedule => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::NotFound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::TargetBlockNumberInPast => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::RescheduleNoChange => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::Named => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "FailedToSchedule" { - return Ok(Error::FailedToSchedule); - } - if value.name() == "NotFound" { - return Ok(Error::NotFound); - } - if value.name() == "TargetBlockNumberInPast" { - return Ok(Error::TargetBlockNumberInPast); - } - if value.name() == "RescheduleNoChange" { - return Ok(Error::RescheduleNoChange); - } - if value.name() == "Named" { - return Ok(Error::Named); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "FailedToSchedule", - "NotFound", - "TargetBlockNumberInPast", - "RescheduleNoChange", - "Named", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::FailedToSchedule => { - ::subxt::ext::scale_encode::Variant { - name: "FailedToSchedule", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotFound => { - ::subxt::ext::scale_encode::Variant { - name: "NotFound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TargetBlockNumberInPast => { - ::subxt::ext::scale_encode::Variant { - name: "TargetBlockNumberInPast", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::RescheduleNoChange => { - ::subxt::ext::scale_encode::Variant { - name: "RescheduleNoChange", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Named => { - ::subxt::ext::scale_encode::Variant { - name: "Named", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::FailedToSchedule => "FailedToSchedule", - Error::NotFound => "NotFound", - Error::TargetBlockNumberInPast => "TargetBlockNumberInPast", - Error::RescheduleNoChange => "RescheduleNoChange", - Error::Named => "Named", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - Scheduled { - when: ::core::primitive::u32, - index: ::core::primitive::u32, - }, - #[codec(index = 1)] - Canceled { - when: ::core::primitive::u32, - index: ::core::primitive::u32, - }, - #[codec(index = 2)] - 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)] - CallUnavailable { - task: (::core::primitive::u32, ::core::primitive::u32), - id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - }, - #[codec(index = 4)] - PeriodicFailed { - task: (::core::primitive::u32, ::core::primitive::u32), - id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - }, - #[codec(index = 5)] - PermanentlyOverweight { - task: (::core::primitive::u32, ::core::primitive::u32), - id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Scheduled { - when: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Scheduled::when`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Scheduled::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Canceled { - when: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Canceled::when`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Canceled::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Dispatched { - task: { - let __codec_res_edqy = <( - ::core::primitive::u32, - ::core::primitive::u32, - ) as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Dispatched::task`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - id: { - let __codec_res_edqy = <::core::option::Option< - [::core::primitive::u8; 32usize], - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Dispatched::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Dispatched::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::CallUnavailable { - task: { - let __codec_res_edqy = <( - ::core::primitive::u32, - ::core::primitive::u32, - ) as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::CallUnavailable::task`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - id: { - let __codec_res_edqy = <::core::option::Option< - [::core::primitive::u8; 32usize], - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::CallUnavailable::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::PeriodicFailed { - task: { - let __codec_res_edqy = <( - ::core::primitive::u32, - ::core::primitive::u32, - ) as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PeriodicFailed::task`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - id: { - let __codec_res_edqy = <::core::option::Option< - [::core::primitive::u8; 32usize], - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PeriodicFailed::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::PermanentlyOverweight { - task: { - let __codec_res_edqy = <( - ::core::primitive::u32, - ::core::primitive::u32, - ) as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::PermanentlyOverweight::task`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - id: { - let __codec_res_edqy = <::core::option::Option< - [::core::primitive::u8; 32usize], - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::PermanentlyOverweight::id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::Scheduled { ref when, ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(when), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Event::Canceled { ref when, ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(when), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Event::Dispatched { ref task, ref id, ref result } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(task), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(result), - ) - } - Event::CallUnavailable { ref task, ref id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(task), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - } - Event::PeriodicFailed { ref task, ref id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(task), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - } - Event::PermanentlyOverweight { ref task, ref id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(task), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::Scheduled { ref when, ref index } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - when, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Event::Canceled { ref when, ref index } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - when, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Event::Dispatched { ref task, ref id, ref result } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - task, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - result, - __codec_dest_edqy, - ); - } - Event::CallUnavailable { ref task, ref id } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - task, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - } - Event::PeriodicFailed { ref task, ref id } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - task, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - } - Event::PermanentlyOverweight { ref task, ref id } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - task, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Scheduled" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Scheduled { - when: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Scheduled { - when: { - let val = *vals - .get(&Some("when")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "when".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "Canceled" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Canceled { - when: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Canceled { - when: { - let val = *vals - .get(&Some("when")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "when".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("when"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "Dispatched" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::Dispatched { - task: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("task"))? - }, - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Dispatched { - task: { - let val = *vals - .get(&Some("task")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "task".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("task"))? - }, - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - }; - } - if value.name() == "CallUnavailable" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::CallUnavailable { - task: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("task"))? - }, - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::CallUnavailable { - task: { - let val = *vals - .get(&Some("task")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "task".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("task"))? - }, - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - }; - } - if value.name() == "PeriodicFailed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::PeriodicFailed { - task: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("task"))? - }, - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::PeriodicFailed { - task: { - let val = *vals - .get(&Some("task")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "task".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("task"))? - }, - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - }; - } - if value.name() == "PermanentlyOverweight" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::PermanentlyOverweight { - task: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("task"))? - }, - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::PermanentlyOverweight { - task: { - let val = *vals - .get(&Some("task")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "task".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("task"))? - }, - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Scheduled", - "Canceled", - "Dispatched", - "CallUnavailable", - "PeriodicFailed", - "PermanentlyOverweight", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Scheduled { when, index } => { - ::subxt::ext::scale_encode::Variant { - name: "Scheduled", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("when"), - when as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Canceled { when, index } => { - ::subxt::ext::scale_encode::Variant { - name: "Canceled", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("when"), - when as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Dispatched { task, id, result } => { - ::subxt::ext::scale_encode::Variant { - name: "Dispatched", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("task"), - task as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CallUnavailable { task, id } => { - ::subxt::ext::scale_encode::Variant { - name: "CallUnavailable", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("task"), - task as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PeriodicFailed { task, id } => { - ::subxt::ext::scale_encode::Variant { - name: "PeriodicFailed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("task"), - task as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PermanentlyOverweight { task, id } => { - ::subxt::ext::scale_encode::Variant { - name: "PermanentlyOverweight", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("task"), - task as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::Scheduled { when: __self_0, index: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Scheduled", - "when", - __self_0, - "index", - &__self_1, - ) - } - Event::Canceled { when: __self_0, index: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Canceled", - "when", - __self_0, - "index", - &__self_1, - ) - } - Event::Dispatched { - task: __self_0, - id: __self_1, - result: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Dispatched", - "task", - __self_0, - "id", - __self_1, - "result", - &__self_2, - ) - } - Event::CallUnavailable { task: __self_0, id: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "CallUnavailable", - "task", - __self_0, - "id", - &__self_1, - ) - } - Event::PeriodicFailed { task: __self_0, id: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PeriodicFailed", - "task", - __self_0, - "id", - &__self_1, - ) - } - Event::PermanentlyOverweight { - task: __self_0, - id: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PermanentlyOverweight", - "task", - __self_0, - "id", - &__self_1, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct 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>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2, _3, _4> ::subxt::ext::codec::Decode - for Scheduled<_0, _1, _2, _3, _4> - where - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - ::core::option::Option<(_2, _2)>: ::subxt::ext::codec::Decode, - ::core::option::Option<(_2, _2)>: ::subxt::ext::codec::Decode, - _3: ::subxt::ext::codec::Decode, - _3: ::subxt::ext::codec::Decode, - ::core::marker::PhantomData<_4>: Default, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Scheduled::<_0, _1, _2, _3, _4> { - maybe_id: { - let __codec_res_edqy = <::core::option::Option< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Scheduled::maybe_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - priority: { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Scheduled::priority`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Scheduled::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_periodic: { - let __codec_res_edqy = <::core::option::Option< - (_2, _2), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Scheduled::maybe_periodic`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - origin: { - let __codec_res_edqy = <_3 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Scheduled::origin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - __subxt_unused_type_params: ::core::default::Default::default(), - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2, _3, _4> ::subxt::ext::codec::Encode - for Scheduled<_0, _1, _2, _3, _4> - where - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - ::core::option::Option<(_2, _2)>: ::subxt::ext::codec::Encode, - ::core::option::Option<(_2, _2)>: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.maybe_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.priority), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.call), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.maybe_periodic), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.origin), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.maybe_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.priority, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.call, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.maybe_periodic, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.origin, - __codec_dest_edqy, - ); - let _ = &self.__subxt_unused_type_params; - } - } - #[automatically_derived] - impl<_0, _1, _2, _3, _4> ::subxt::ext::codec::EncodeLike - for Scheduled<_0, _1, _2, _3, _4> - where - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - ::core::option::Option<(_2, _2)>: ::subxt::ext::codec::Encode, - ::core::option::Option<(_2, _2)>: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2, _3, _4>( - ::core::marker::PhantomData<(_0, _1, _2, _3, _4)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1, _2, _3, _4> ::subxt::ext::scale_decode::IntoVisitor - for Scheduled<_0, _1, _2, _3, _4> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _3: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_3 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _4: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_4 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2, _3, _4>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1, _2, _3, _4> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2, _3, _4> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _3: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_3 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _4: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_4 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Scheduled<_0, _1, _2, _3, _4>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Scheduled { - maybe_id: { - let val = *vals - .get(&Some("maybe_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("maybe_id"))? - }, - priority: { - let val = *vals - .get(&Some("priority")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "priority".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - maybe_periodic: { - let val = *vals - .get(&Some("maybe_periodic")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_periodic".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - origin: { - let val = *vals - .get(&Some("origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "origin".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - __subxt_unused_type_params: ::core::default::Default::default(), - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(Scheduled { - maybe_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("maybe_id"))? - }, - priority: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("priority"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - maybe_periodic: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_periodic"))? - }, - origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - __subxt_unused_type_params: ::core::default::Default::default(), - }) - } - } - impl<_0, _1, _2, _3, _4> ::subxt::ext::scale_decode::DecodeAsFields - for Scheduled<_0, _1, _2, _3, _4> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _3: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_3 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _4: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_4 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1, _2, _3, _4> ::subxt::ext::scale_encode::EncodeAsType - for Scheduled<_0, _1, _2, _3, _4> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - _3: ::subxt::ext::scale_encode::EncodeAsType, - _4: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Scheduled { - maybe_id, - priority, - call, - maybe_periodic, - origin, - __subxt_unused_type_params, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("maybe_id"), - maybe_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("priority"), - priority as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_periodic"), - maybe_periodic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1, _2, _3, _4> ::subxt::ext::scale_encode::EncodeAsFields - for Scheduled<_0, _1, _2, _3, _4> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - _3: ::subxt::ext::scale_encode::EncodeAsType, - _4: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Scheduled { - maybe_id, - priority, - call, - maybe_periodic, - origin, - __subxt_unused_type_params, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("maybe_id"), - maybe_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("priority"), - priority as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_periodic"), - maybe_periodic - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - _3: ::core::fmt::Debug, - _4: ::core::fmt::Debug, - > ::core::fmt::Debug for Scheduled<_0, _1, _2, _3, _4> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "maybe_id", - "priority", - "call", - "maybe_periodic", - "origin", - "__subxt_unused_type_params", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.maybe_id, - &self.priority, - &self.call, - &self.maybe_periodic, - &self.origin, - &&self.__subxt_unused_type_params, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "Scheduled", - names, - values, - ) - } - } - } - pub mod pallet_session { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - set_keys { - keys: runtime_types::polkadot_runtime::SessionKeys, - proof: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 1)] - purge_keys, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_keys { - keys: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_keys::keys`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proof: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_keys::proof`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::purge_keys) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::set_keys { ref keys, ref proof } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(keys), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proof), - ) - } - Call::purge_keys => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::set_keys { ref keys, ref proof } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - keys, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proof, - __codec_dest_edqy, - ); - } - Call::purge_keys => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "set_keys" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::set_keys { - keys: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("keys"))? - }, - proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proof"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_keys { - keys: { - let val = *vals - .get(&Some("keys")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "keys".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("keys"))? - }, - proof: { - let val = *vals - .get(&Some("proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proof".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proof"))? - }, - }) - }; - } - if value.name() == "purge_keys" { - return Ok(Call::purge_keys); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["set_keys", "purge_keys"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::set_keys { keys, proof } => { - ::subxt::ext::scale_encode::Variant { - name: "set_keys", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("keys"), - keys as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proof"), - proof as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::purge_keys => { - ::subxt::ext::scale_encode::Variant { - name: "purge_keys", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::set_keys { keys: __self_0, proof: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "set_keys", - "keys", - __self_0, - "proof", - &__self_1, - ) - } - Call::purge_keys => { - ::core::fmt::Formatter::write_str(f, "purge_keys") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - InvalidProof, - #[codec(index = 1)] - NoAssociatedValidatorId, - #[codec(index = 2)] - DuplicatedKey, - #[codec(index = 3)] - NoKeys, - #[codec(index = 4)] - NoAccount, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidProof) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoAssociatedValidatorId) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::DuplicatedKey) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoKeys) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoAccount) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::InvalidProof => 0_usize, - Error::NoAssociatedValidatorId => 0_usize, - Error::DuplicatedKey => 0_usize, - Error::NoKeys => 0_usize, - Error::NoAccount => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::InvalidProof => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::NoAssociatedValidatorId => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::DuplicatedKey => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::NoKeys => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::NoAccount => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "InvalidProof" { - return Ok(Error::InvalidProof); - } - if value.name() == "NoAssociatedValidatorId" { - return Ok(Error::NoAssociatedValidatorId); - } - if value.name() == "DuplicatedKey" { - return Ok(Error::DuplicatedKey); - } - if value.name() == "NoKeys" { - return Ok(Error::NoKeys); - } - if value.name() == "NoAccount" { - return Ok(Error::NoAccount); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "InvalidProof", - "NoAssociatedValidatorId", - "DuplicatedKey", - "NoKeys", - "NoAccount", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::InvalidProof => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidProof", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoAssociatedValidatorId => { - ::subxt::ext::scale_encode::Variant { - name: "NoAssociatedValidatorId", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DuplicatedKey => { - ::subxt::ext::scale_encode::Variant { - name: "DuplicatedKey", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoKeys => { - ::subxt::ext::scale_encode::Variant { - name: "NoKeys", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoAccount => { - ::subxt::ext::scale_encode::Variant { - name: "NoAccount", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::InvalidProof => "InvalidProof", - Error::NoAssociatedValidatorId => "NoAssociatedValidatorId", - Error::DuplicatedKey => "DuplicatedKey", - Error::NoKeys => "NoKeys", - Error::NoAccount => "NoAccount", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - NewSession { session_index: ::core::primitive::u32 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::NewSession { - session_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::NewSession::session_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::NewSession { ref session_index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(session_index), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::NewSession { ref session_index } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - session_index, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NewSession" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::NewSession { - session_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("session_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::NewSession { - session_index: { - let val = *vals - .get(&Some("session_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "session_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("session_index"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["NewSession"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NewSession { session_index } => { - ::subxt::ext::scale_encode::Variant { - name: "NewSession", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("session_index"), - session_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::NewSession { session_index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "NewSession", - "session_index", - &__self_0, - ) - } - } - } - } - } - } - pub mod pallet_staking { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - bond { - #[codec(compact)] - value: ::core::primitive::u128, - payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::AccountId32, - >, - }, - #[codec(index = 1)] - bond_extra { - #[codec(compact)] - max_additional: ::core::primitive::u128, - }, - #[codec(index = 2)] - unbond { #[codec(compact)] value: ::core::primitive::u128 }, - #[codec(index = 3)] - withdraw_unbonded { - num_slashing_spans: ::core::primitive::u32, - }, - #[codec(index = 4)] - validate { - prefs: runtime_types::pallet_staking::ValidatorPrefs, - }, - #[codec(index = 5)] - nominate { - targets: ::std::vec::Vec< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - >, - }, - #[codec(index = 6)] - chill, - #[codec(index = 7)] - set_payee { - payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::AccountId32, - >, - }, - #[codec(index = 8)] - set_controller, - #[codec(index = 9)] - set_validator_count { - #[codec(compact)] - new: ::core::primitive::u32, - }, - #[codec(index = 10)] - increase_validator_count { - #[codec(compact)] - additional: ::core::primitive::u32, - }, - #[codec(index = 11)] - scale_validator_count { - factor: runtime_types::sp_arithmetic::per_things::Percent, - }, - #[codec(index = 12)] - force_no_eras, - #[codec(index = 13)] - force_new_era, - #[codec(index = 14)] - set_invulnerables { - invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, - }, - #[codec(index = 15)] - force_unstake { - stash: ::subxt::utils::AccountId32, - num_slashing_spans: ::core::primitive::u32, - }, - #[codec(index = 16)] - force_new_era_always, - #[codec(index = 17)] - cancel_deferred_slash { - era: ::core::primitive::u32, - slash_indices: ::std::vec::Vec<::core::primitive::u32>, - }, - #[codec(index = 18)] - payout_stakers { - validator_stash: ::subxt::utils::AccountId32, - era: ::core::primitive::u32, - }, - #[codec(index = 19)] - rebond { #[codec(compact)] value: ::core::primitive::u128 }, - #[codec(index = 20)] - reap_stash { - stash: ::subxt::utils::AccountId32, - num_slashing_spans: ::core::primitive::u32, - }, - #[codec(index = 21)] - kick { - who: ::std::vec::Vec< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - >, - }, - #[codec(index = 22)] - 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)] - chill_other { controller: ::subxt::utils::AccountId32 }, - #[codec(index = 24)] - force_apply_min_commission { - validator_stash: ::subxt::utils::AccountId32, - }, - #[codec(index = 25)] - set_min_commission { - new: runtime_types::sp_arithmetic::per_things::Perbill, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::bond { - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::bond::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - payee: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::bond::payee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::bond_extra { - max_additional: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::bond_extra::max_additional`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::unbond { - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::unbond::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::withdraw_unbonded { - num_slashing_spans: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::withdraw_unbonded::num_slashing_spans`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::validate { - prefs: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::validate::prefs`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::nominate { - targets: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::nominate::targets`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::chill) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_payee { - payee: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_payee::payee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_controller) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_validator_count { - new: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_validator_count::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::increase_validator_count { - additional: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::increase_validator_count::additional`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::scale_validator_count { - factor: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::scale_validator_count::factor`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_no_eras) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_new_era) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_invulnerables { - invulnerables: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_invulnerables::invulnerables`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_unstake { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_unstake::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - num_slashing_spans: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_unstake::num_slashing_spans`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_new_era_always) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::cancel_deferred_slash { - era: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::cancel_deferred_slash::era`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - slash_indices: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::cancel_deferred_slash::slash_indices`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::payout_stakers { - validator_stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::payout_stakers::validator_stash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - era: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::payout_stakers::era`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::rebond { - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::rebond::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::reap_stash { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::reap_stash::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - num_slashing_spans: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::reap_stash::num_slashing_spans`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::kick { - who: { - let __codec_res_edqy = <::std::vec::Vec< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::kick::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 22u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_staking_configs { - min_nominator_bond: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_staking_configs::min_nominator_bond`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - min_validator_bond: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_staking_configs::min_validator_bond`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_nominator_count: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_staking_configs::max_nominator_count`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_validator_count: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_staking_configs::max_validator_count`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - chill_threshold: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_staking_configs::chill_threshold`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - min_commission: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_staking_configs::min_commission`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 23u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::chill_other { - controller: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::chill_other::controller`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 24u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_apply_min_commission { - validator_stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_apply_min_commission::validator_stash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 25u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_min_commission { - new: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_min_commission::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::bond { ref value, ref payee } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(payee), - ) - } - Call::bond_extra { ref max_additional } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(max_additional), - ), - ) - } - Call::unbond { ref value } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - ), - ) - } - Call::withdraw_unbonded { ref num_slashing_spans } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(num_slashing_spans), - ) - } - Call::validate { ref prefs } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(prefs), - ) - } - Call::nominate { ref targets } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(targets), - ) - } - Call::chill => 0_usize, - Call::set_payee { ref payee } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(payee), - ) - } - Call::set_controller => 0_usize, - Call::set_validator_count { ref new } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(new), - ), - ) - } - Call::increase_validator_count { ref additional } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(additional), - ), - ) - } - Call::scale_validator_count { ref factor } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(factor), - ) - } - Call::force_no_eras => 0_usize, - Call::force_new_era => 0_usize, - Call::set_invulnerables { ref invulnerables } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(invulnerables), - ) - } - Call::force_unstake { - ref stash, - ref num_slashing_spans, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(num_slashing_spans), - ) - } - Call::force_new_era_always => 0_usize, - Call::cancel_deferred_slash { - ref era, - ref slash_indices, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(era)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(slash_indices), - ) - } - Call::payout_stakers { ref validator_stash, ref era } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(validator_stash), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(era)) - } - Call::rebond { ref value } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - ), - ) - } - Call::reap_stash { ref stash, ref num_slashing_spans } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(num_slashing_spans), - ) - } - Call::kick { ref who } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - } - Call::set_staking_configs { - ref min_nominator_bond, - ref min_validator_bond, - ref max_nominator_count, - ref max_validator_count, - ref chill_threshold, - ref min_commission, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(min_nominator_bond), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(min_validator_bond), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(max_nominator_count), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(max_validator_count), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(chill_threshold), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(min_commission), - ) - } - Call::chill_other { ref controller } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(controller), - ) - } - Call::force_apply_min_commission { ref validator_stash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(validator_stash), - ) - } - Call::set_min_commission { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::bond { ref value, ref payee } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - payee, - __codec_dest_edqy, - ); - } - Call::bond_extra { ref max_additional } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(max_additional), - __codec_dest_edqy, - ); - } - } - Call::unbond { ref value } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - __codec_dest_edqy, - ); - } - } - Call::withdraw_unbonded { ref num_slashing_spans } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - num_slashing_spans, - __codec_dest_edqy, - ); - } - Call::validate { ref prefs } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - prefs, - __codec_dest_edqy, - ); - } - Call::nominate { ref targets } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - targets, - __codec_dest_edqy, - ); - } - Call::chill => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Call::set_payee { ref payee } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - payee, - __codec_dest_edqy, - ); - } - Call::set_controller => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Call::set_validator_count { ref new } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(new), - __codec_dest_edqy, - ); - } - } - Call::increase_validator_count { ref additional } => { - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(additional), - __codec_dest_edqy, - ); - } - } - Call::scale_validator_count { ref factor } => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - factor, - __codec_dest_edqy, - ); - } - Call::force_no_eras => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - Call::force_new_era => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - } - Call::set_invulnerables { ref invulnerables } => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - invulnerables, - __codec_dest_edqy, - ); - } - Call::force_unstake { - ref stash, - ref num_slashing_spans, - } => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - num_slashing_spans, - __codec_dest_edqy, - ); - } - Call::force_new_era_always => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - } - Call::cancel_deferred_slash { - ref era, - ref slash_indices, - } => { - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - era, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - slash_indices, - __codec_dest_edqy, - ); - } - Call::payout_stakers { ref validator_stash, ref era } => { - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - validator_stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - era, - __codec_dest_edqy, - ); - } - Call::rebond { ref value } => { - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - __codec_dest_edqy, - ); - } - } - Call::reap_stash { ref stash, ref num_slashing_spans } => { - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - num_slashing_spans, - __codec_dest_edqy, - ); - } - Call::kick { ref who } => { - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - } - Call::set_staking_configs { - ref min_nominator_bond, - ref min_validator_bond, - ref max_nominator_count, - ref max_validator_count, - ref chill_threshold, - ref min_commission, - } => { - __codec_dest_edqy.push_byte(22u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - min_nominator_bond, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - min_validator_bond, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - max_nominator_count, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - max_validator_count, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - chill_threshold, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - min_commission, - __codec_dest_edqy, - ); - } - Call::chill_other { ref controller } => { - __codec_dest_edqy.push_byte(23u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - controller, - __codec_dest_edqy, - ); - } - Call::force_apply_min_commission { - ref validator_stash, - } => { - __codec_dest_edqy.push_byte(24u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - validator_stash, - __codec_dest_edqy, - ); - } - Call::set_min_commission { ref new } => { - __codec_dest_edqy.push_byte(25u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "bond" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::bond { - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - payee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("payee"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::bond { - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - payee: { - let val = *vals - .get(&Some("payee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "payee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("payee"))? - }, - }) - }; - } - if value.name() == "bond_extra" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::bond_extra { - max_additional: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_additional"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::bond_extra { - max_additional: { - let val = *vals - .get(&Some("max_additional")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_additional".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_additional"))? - }, - }) - }; - } - if value.name() == "unbond" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::unbond { - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::unbond { - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - }; - } - if value.name() == "withdraw_unbonded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::withdraw_unbonded { - num_slashing_spans: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::withdraw_unbonded { - num_slashing_spans: { - let val = *vals - .get(&Some("num_slashing_spans")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "num_slashing_spans".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - }; - } - if value.name() == "validate" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::validate { - prefs: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prefs"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::validate { - prefs: { - let val = *vals - .get(&Some("prefs")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prefs".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prefs"))? - }, - }) - }; - } - if value.name() == "nominate" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::nominate { - targets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("targets"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::nominate { - targets: { - let val = *vals - .get(&Some("targets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "targets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("targets"))? - }, - }) - }; - } - if value.name() == "chill" { - return Ok(Call::chill); - } - if value.name() == "set_payee" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_payee { - payee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("payee"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_payee { - payee: { - let val = *vals - .get(&Some("payee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "payee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("payee"))? - }, - }) - }; - } - if value.name() == "set_controller" { - return Ok(Call::set_controller); - } - if value.name() == "set_validator_count" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_validator_count { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_validator_count { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "increase_validator_count" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::increase_validator_count { - additional: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("additional"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::increase_validator_count { - additional: { - let val = *vals - .get(&Some("additional")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "additional".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("additional"))? - }, - }) - }; - } - if value.name() == "scale_validator_count" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::scale_validator_count { - factor: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("factor"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::scale_validator_count { - factor: { - let val = *vals - .get(&Some("factor")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "factor".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("factor"))? - }, - }) - }; - } - if value.name() == "force_no_eras" { - return Ok(Call::force_no_eras); - } - if value.name() == "force_new_era" { - return Ok(Call::force_new_era); - } - if value.name() == "set_invulnerables" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_invulnerables { - invulnerables: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("invulnerables"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_invulnerables { - invulnerables: { - let val = *vals - .get(&Some("invulnerables")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "invulnerables".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("invulnerables"))? - }, - }) - }; - } - if value.name() == "force_unstake" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::force_unstake { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - num_slashing_spans: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_unstake { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - num_slashing_spans: { - let val = *vals - .get(&Some("num_slashing_spans")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "num_slashing_spans".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - }; - } - if value.name() == "force_new_era_always" { - return Ok(Call::force_new_era_always); - } - if value.name() == "cancel_deferred_slash" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::cancel_deferred_slash { - era: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - slash_indices: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("slash_indices"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::cancel_deferred_slash { - era: { - let val = *vals - .get(&Some("era")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "era".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - slash_indices: { - let val = *vals - .get(&Some("slash_indices")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "slash_indices".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("slash_indices"))? - }, - }) - }; - } - if value.name() == "payout_stakers" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::payout_stakers { - validator_stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_stash"))? - }, - era: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::payout_stakers { - validator_stash: { - let val = *vals - .get(&Some("validator_stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator_stash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_stash"))? - }, - era: { - let val = *vals - .get(&Some("era")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "era".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - }) - }; - } - if value.name() == "rebond" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::rebond { - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::rebond { - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - }; - } - if value.name() == "reap_stash" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::reap_stash { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - num_slashing_spans: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::reap_stash { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - num_slashing_spans: { - let val = *vals - .get(&Some("num_slashing_spans")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "num_slashing_spans".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("num_slashing_spans"))? - }, - }) - }; - } - if value.name() == "kick" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::kick { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::kick { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - }; - } - if value.name() == "set_staking_configs" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = fields; - Ok(Call::set_staking_configs { - min_nominator_bond: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("min_nominator_bond"))? - }, - min_validator_bond: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("min_validator_bond"))? - }, - max_nominator_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_nominator_count"))? - }, - max_validator_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_validator_count"))? - }, - chill_threshold: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("chill_threshold"))? - }, - min_commission: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("min_commission"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_staking_configs { - min_nominator_bond: { - let val = *vals - .get(&Some("min_nominator_bond")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "min_nominator_bond".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("min_nominator_bond"))? - }, - min_validator_bond: { - let val = *vals - .get(&Some("min_validator_bond")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "min_validator_bond".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("min_validator_bond"))? - }, - max_nominator_count: { - let val = *vals - .get(&Some("max_nominator_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_nominator_count".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_nominator_count"))? - }, - max_validator_count: { - let val = *vals - .get(&Some("max_validator_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_validator_count".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_validator_count"))? - }, - chill_threshold: { - let val = *vals - .get(&Some("chill_threshold")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "chill_threshold".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("chill_threshold"))? - }, - min_commission: { - let val = *vals - .get(&Some("min_commission")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "min_commission".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("min_commission"))? - }, - }) - }; - } - if value.name() == "chill_other" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::chill_other { - controller: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("controller"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::chill_other { - controller: { - let val = *vals - .get(&Some("controller")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "controller".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("controller"))? - }, - }) - }; - } - if value.name() == "force_apply_min_commission" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::force_apply_min_commission { - validator_stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_stash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_apply_min_commission { - validator_stash: { - let val = *vals - .get(&Some("validator_stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator_stash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_stash"))? - }, - }) - }; - } - if value.name() == "set_min_commission" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_min_commission { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_min_commission { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "bond", - "bond_extra", - "unbond", - "withdraw_unbonded", - "validate", - "nominate", - "chill", - "set_payee", - "set_controller", - "set_validator_count", - "increase_validator_count", - "scale_validator_count", - "force_no_eras", - "force_new_era", - "set_invulnerables", - "force_unstake", - "force_new_era_always", - "cancel_deferred_slash", - "payout_stakers", - "rebond", - "reap_stash", - "kick", - "set_staking_configs", - "chill_other", - "force_apply_min_commission", - "set_min_commission", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::bond { value, payee } => { - ::subxt::ext::scale_encode::Variant { - name: "bond", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("payee"), - payee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::bond_extra { max_additional } => { - ::subxt::ext::scale_encode::Variant { - name: "bond_extra", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("max_additional"), - max_additional - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::unbond { value } => { - ::subxt::ext::scale_encode::Variant { - name: "unbond", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::withdraw_unbonded { num_slashing_spans } => { - ::subxt::ext::scale_encode::Variant { - name: "withdraw_unbonded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("num_slashing_spans"), - num_slashing_spans - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::validate { prefs } => { - ::subxt::ext::scale_encode::Variant { - name: "validate", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("prefs"), - prefs as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::nominate { targets } => { - ::subxt::ext::scale_encode::Variant { - name: "nominate", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("targets"), - targets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::chill => { - ::subxt::ext::scale_encode::Variant { - name: "chill", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_payee { payee } => { - ::subxt::ext::scale_encode::Variant { - name: "set_payee", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("payee"), - payee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_controller => { - ::subxt::ext::scale_encode::Variant { - name: "set_controller", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_validator_count { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_validator_count", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::increase_validator_count { additional } => { - ::subxt::ext::scale_encode::Variant { - name: "increase_validator_count", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("additional"), - additional as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::scale_validator_count { factor } => { - ::subxt::ext::scale_encode::Variant { - name: "scale_validator_count", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("factor"), - factor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_no_eras => { - ::subxt::ext::scale_encode::Variant { - name: "force_no_eras", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_new_era => { - ::subxt::ext::scale_encode::Variant { - name: "force_new_era", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_invulnerables { invulnerables } => { - ::subxt::ext::scale_encode::Variant { - name: "set_invulnerables", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("invulnerables"), - invulnerables - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_unstake { stash, num_slashing_spans } => { - ::subxt::ext::scale_encode::Variant { - name: "force_unstake", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("num_slashing_spans"), - num_slashing_spans - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_new_era_always => { - ::subxt::ext::scale_encode::Variant { - name: "force_new_era_always", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::cancel_deferred_slash { era, slash_indices } => { - ::subxt::ext::scale_encode::Variant { - name: "cancel_deferred_slash", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("era"), - era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slash_indices"), - slash_indices - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::payout_stakers { validator_stash, era } => { - ::subxt::ext::scale_encode::Variant { - name: "payout_stakers", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validator_stash"), - validator_stash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("era"), - era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::rebond { value } => { - ::subxt::ext::scale_encode::Variant { - name: "rebond", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::reap_stash { stash, num_slashing_spans } => { - ::subxt::ext::scale_encode::Variant { - name: "reap_stash", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("num_slashing_spans"), - num_slashing_spans - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::kick { who } => { - ::subxt::ext::scale_encode::Variant { - name: "kick", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_staking_configs { - min_nominator_bond, - min_validator_bond, - max_nominator_count, - max_validator_count, - chill_threshold, - min_commission, - } => { - ::subxt::ext::scale_encode::Variant { - name: "set_staking_configs", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("min_nominator_bond"), - min_nominator_bond - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_validator_bond"), - min_validator_bond - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_nominator_count"), - max_nominator_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_validator_count"), - max_validator_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("chill_threshold"), - chill_threshold - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_commission"), - min_commission - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::chill_other { controller } => { - ::subxt::ext::scale_encode::Variant { - name: "chill_other", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("controller"), - controller as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_apply_min_commission { validator_stash } => { - ::subxt::ext::scale_encode::Variant { - name: "force_apply_min_commission", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validator_stash"), - validator_stash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_min_commission { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_min_commission", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::bond { value: __self_0, payee: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "bond", - "value", - __self_0, - "payee", - &__self_1, - ) - } - Call::bond_extra { max_additional: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "bond_extra", - "max_additional", - &__self_0, - ) - } - Call::unbond { value: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "unbond", - "value", - &__self_0, - ) - } - Call::withdraw_unbonded { num_slashing_spans: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "withdraw_unbonded", - "num_slashing_spans", - &__self_0, - ) - } - Call::validate { prefs: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "validate", - "prefs", - &__self_0, - ) - } - Call::nominate { targets: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "nominate", - "targets", - &__self_0, - ) - } - Call::chill => ::core::fmt::Formatter::write_str(f, "chill"), - Call::set_payee { payee: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_payee", - "payee", - &__self_0, - ) - } - Call::set_controller => { - ::core::fmt::Formatter::write_str(f, "set_controller") - } - Call::set_validator_count { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_validator_count", - "new", - &__self_0, - ) - } - Call::increase_validator_count { additional: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "increase_validator_count", - "additional", - &__self_0, - ) - } - Call::scale_validator_count { factor: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "scale_validator_count", - "factor", - &__self_0, - ) - } - Call::force_no_eras => { - ::core::fmt::Formatter::write_str(f, "force_no_eras") - } - Call::force_new_era => { - ::core::fmt::Formatter::write_str(f, "force_new_era") - } - Call::set_invulnerables { invulnerables: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_invulnerables", - "invulnerables", - &__self_0, - ) - } - Call::force_unstake { - stash: __self_0, - num_slashing_spans: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "force_unstake", - "stash", - __self_0, - "num_slashing_spans", - &__self_1, - ) - } - Call::force_new_era_always => { - ::core::fmt::Formatter::write_str(f, "force_new_era_always") - } - Call::cancel_deferred_slash { - era: __self_0, - slash_indices: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "cancel_deferred_slash", - "era", - __self_0, - "slash_indices", - &__self_1, - ) - } - Call::payout_stakers { - validator_stash: __self_0, - era: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "payout_stakers", - "validator_stash", - __self_0, - "era", - &__self_1, - ) - } - Call::rebond { value: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "rebond", - "value", - &__self_0, - ) - } - Call::reap_stash { - stash: __self_0, - num_slashing_spans: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "reap_stash", - "stash", - __self_0, - "num_slashing_spans", - &__self_1, - ) - } - Call::kick { who: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "kick", - "who", - &__self_0, - ) - } - Call::set_staking_configs { - min_nominator_bond: __self_0, - min_validator_bond: __self_1, - max_nominator_count: __self_2, - max_validator_count: __self_3, - chill_threshold: __self_4, - min_commission: __self_5, - } => { - let names: &'static _ = &[ - "min_nominator_bond", - "min_validator_bond", - "max_nominator_count", - "max_validator_count", - "chill_threshold", - "min_commission", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - &__self_5, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "set_staking_configs", - names, - values, - ) - } - Call::chill_other { controller: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "chill_other", - "controller", - &__self_0, - ) - } - Call::force_apply_min_commission { - validator_stash: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "force_apply_min_commission", - "validator_stash", - &__self_0, - ) - } - Call::set_min_commission { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_min_commission", - "new", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ConfigOp<_0> { - #[codec(index = 0)] - Noop, - #[codec(index = 1)] - Set(_0), - #[codec(index = 2)] - Remove, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for ConfigOp<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `ConfigOp`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ConfigOp::<_0>::Noop) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ConfigOp::< - _0, - >::Set({ - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ConfigOp::Set.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ConfigOp::<_0>::Remove) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `ConfigOp`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for ConfigOp<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - ConfigOp::Noop => 0_usize, - ConfigOp::Set(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - ConfigOp::Remove => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - ConfigOp::Noop => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - ConfigOp::Set(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - ConfigOp::Remove => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for ConfigOp<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for ConfigOp<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ConfigOp<_0>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Noop" { - return Ok(ConfigOp::Noop); - } - if value.name() == "Set" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - ConfigOp::Set({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Remove" { - return Ok(ConfigOp::Remove); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Noop", "Set", "Remove"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for ConfigOp<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Noop => { - ::subxt::ext::scale_encode::Variant { - name: "Noop", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Set(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Set", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Remove => { - ::subxt::ext::scale_encode::Variant { - name: "Remove", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for ConfigOp<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - ConfigOp::Noop => { - ::core::fmt::Formatter::write_str(f, "Noop") - } - ConfigOp::Set(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Set", - &__self_0, - ) - } - ConfigOp::Remove => { - ::core::fmt::Formatter::write_str(f, "Remove") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - NotController, - #[codec(index = 1)] - NotStash, - #[codec(index = 2)] - AlreadyBonded, - #[codec(index = 3)] - AlreadyPaired, - #[codec(index = 4)] - EmptyTargets, - #[codec(index = 5)] - DuplicateIndex, - #[codec(index = 6)] - InvalidSlashIndex, - #[codec(index = 7)] - InsufficientBond, - #[codec(index = 8)] - NoMoreChunks, - #[codec(index = 9)] - NoUnlockChunk, - #[codec(index = 10)] - FundedTarget, - #[codec(index = 11)] - InvalidEraToReward, - #[codec(index = 12)] - InvalidNumberOfNominations, - #[codec(index = 13)] - NotSortedAndUnique, - #[codec(index = 14)] - AlreadyClaimed, - #[codec(index = 15)] - IncorrectHistoryDepth, - #[codec(index = 16)] - IncorrectSlashingSpans, - #[codec(index = 17)] - BadState, - #[codec(index = 18)] - TooManyTargets, - #[codec(index = 19)] - BadTarget, - #[codec(index = 20)] - CannotChillOther, - #[codec(index = 21)] - TooManyNominators, - #[codec(index = 22)] - TooManyValidators, - #[codec(index = 23)] - CommissionTooLow, - #[codec(index = 24)] - BoundNotMet, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotController) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotStash) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyBonded) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyPaired) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::EmptyTargets) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::DuplicateIndex) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidSlashIndex) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InsufficientBond) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoMoreChunks) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoUnlockChunk) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::FundedTarget) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidEraToReward) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::InvalidNumberOfNominations, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotSortedAndUnique) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyClaimed) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::IncorrectHistoryDepth) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::IncorrectSlashingSpans) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::BadState) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyTargets) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::BadTarget) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CannotChillOther) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyNominators) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 22u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyValidators) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 23u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CommissionTooLow) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 24u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::BoundNotMet) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::NotController => 0_usize, - Error::NotStash => 0_usize, - Error::AlreadyBonded => 0_usize, - Error::AlreadyPaired => 0_usize, - Error::EmptyTargets => 0_usize, - Error::DuplicateIndex => 0_usize, - Error::InvalidSlashIndex => 0_usize, - Error::InsufficientBond => 0_usize, - Error::NoMoreChunks => 0_usize, - Error::NoUnlockChunk => 0_usize, - Error::FundedTarget => 0_usize, - Error::InvalidEraToReward => 0_usize, - Error::InvalidNumberOfNominations => 0_usize, - Error::NotSortedAndUnique => 0_usize, - Error::AlreadyClaimed => 0_usize, - Error::IncorrectHistoryDepth => 0_usize, - Error::IncorrectSlashingSpans => 0_usize, - Error::BadState => 0_usize, - Error::TooManyTargets => 0_usize, - Error::BadTarget => 0_usize, - Error::CannotChillOther => 0_usize, - Error::TooManyNominators => 0_usize, - Error::TooManyValidators => 0_usize, - Error::CommissionTooLow => 0_usize, - Error::BoundNotMet => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::NotController => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::NotStash => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::AlreadyBonded => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::AlreadyPaired => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::EmptyTargets => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::DuplicateIndex => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::InvalidSlashIndex => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::InsufficientBond => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::NoMoreChunks => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::NoUnlockChunk => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::FundedTarget => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Error::InvalidEraToReward => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - Error::InvalidNumberOfNominations => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - Error::NotSortedAndUnique => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - } - Error::AlreadyClaimed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - } - Error::IncorrectHistoryDepth => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - } - Error::IncorrectSlashingSpans => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - } - Error::BadState => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - } - Error::TooManyTargets => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - } - Error::BadTarget => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - } - Error::CannotChillOther => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - } - Error::TooManyNominators => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - } - Error::TooManyValidators => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(22u8 as ::core::primitive::u8); - } - Error::CommissionTooLow => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(23u8 as ::core::primitive::u8); - } - Error::BoundNotMet => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(24u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NotController" { - return Ok(Error::NotController); - } - if value.name() == "NotStash" { - return Ok(Error::NotStash); - } - if value.name() == "AlreadyBonded" { - return Ok(Error::AlreadyBonded); - } - if value.name() == "AlreadyPaired" { - return Ok(Error::AlreadyPaired); - } - if value.name() == "EmptyTargets" { - return Ok(Error::EmptyTargets); - } - if value.name() == "DuplicateIndex" { - return Ok(Error::DuplicateIndex); - } - if value.name() == "InvalidSlashIndex" { - return Ok(Error::InvalidSlashIndex); - } - if value.name() == "InsufficientBond" { - return Ok(Error::InsufficientBond); - } - if value.name() == "NoMoreChunks" { - return Ok(Error::NoMoreChunks); - } - if value.name() == "NoUnlockChunk" { - return Ok(Error::NoUnlockChunk); - } - if value.name() == "FundedTarget" { - return Ok(Error::FundedTarget); - } - if value.name() == "InvalidEraToReward" { - return Ok(Error::InvalidEraToReward); - } - if value.name() == "InvalidNumberOfNominations" { - return Ok(Error::InvalidNumberOfNominations); - } - if value.name() == "NotSortedAndUnique" { - return Ok(Error::NotSortedAndUnique); - } - if value.name() == "AlreadyClaimed" { - return Ok(Error::AlreadyClaimed); - } - if value.name() == "IncorrectHistoryDepth" { - return Ok(Error::IncorrectHistoryDepth); - } - if value.name() == "IncorrectSlashingSpans" { - return Ok(Error::IncorrectSlashingSpans); - } - if value.name() == "BadState" { - return Ok(Error::BadState); - } - if value.name() == "TooManyTargets" { - return Ok(Error::TooManyTargets); - } - if value.name() == "BadTarget" { - return Ok(Error::BadTarget); - } - if value.name() == "CannotChillOther" { - return Ok(Error::CannotChillOther); - } - if value.name() == "TooManyNominators" { - return Ok(Error::TooManyNominators); - } - if value.name() == "TooManyValidators" { - return Ok(Error::TooManyValidators); - } - if value.name() == "CommissionTooLow" { - return Ok(Error::CommissionTooLow); - } - if value.name() == "BoundNotMet" { - return Ok(Error::BoundNotMet); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "NotController", - "NotStash", - "AlreadyBonded", - "AlreadyPaired", - "EmptyTargets", - "DuplicateIndex", - "InvalidSlashIndex", - "InsufficientBond", - "NoMoreChunks", - "NoUnlockChunk", - "FundedTarget", - "InvalidEraToReward", - "InvalidNumberOfNominations", - "NotSortedAndUnique", - "AlreadyClaimed", - "IncorrectHistoryDepth", - "IncorrectSlashingSpans", - "BadState", - "TooManyTargets", - "BadTarget", - "CannotChillOther", - "TooManyNominators", - "TooManyValidators", - "CommissionTooLow", - "BoundNotMet", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NotController => { - ::subxt::ext::scale_encode::Variant { - name: "NotController", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotStash => { - ::subxt::ext::scale_encode::Variant { - name: "NotStash", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyBonded => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyBonded", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyPaired => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyPaired", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::EmptyTargets => { - ::subxt::ext::scale_encode::Variant { - name: "EmptyTargets", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DuplicateIndex => { - ::subxt::ext::scale_encode::Variant { - name: "DuplicateIndex", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidSlashIndex => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidSlashIndex", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InsufficientBond => { - ::subxt::ext::scale_encode::Variant { - name: "InsufficientBond", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoMoreChunks => { - ::subxt::ext::scale_encode::Variant { - name: "NoMoreChunks", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoUnlockChunk => { - ::subxt::ext::scale_encode::Variant { - name: "NoUnlockChunk", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FundedTarget => { - ::subxt::ext::scale_encode::Variant { - name: "FundedTarget", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidEraToReward => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidEraToReward", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidNumberOfNominations => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidNumberOfNominations", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotSortedAndUnique => { - ::subxt::ext::scale_encode::Variant { - name: "NotSortedAndUnique", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyClaimed => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyClaimed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::IncorrectHistoryDepth => { - ::subxt::ext::scale_encode::Variant { - name: "IncorrectHistoryDepth", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::IncorrectSlashingSpans => { - ::subxt::ext::scale_encode::Variant { - name: "IncorrectSlashingSpans", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BadState => { - ::subxt::ext::scale_encode::Variant { - name: "BadState", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyTargets => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyTargets", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BadTarget => { - ::subxt::ext::scale_encode::Variant { - name: "BadTarget", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CannotChillOther => { - ::subxt::ext::scale_encode::Variant { - name: "CannotChillOther", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyNominators => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyNominators", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyValidators => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyValidators", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CommissionTooLow => { - ::subxt::ext::scale_encode::Variant { - name: "CommissionTooLow", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BoundNotMet => { - ::subxt::ext::scale_encode::Variant { - name: "BoundNotMet", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::NotController => "NotController", - Error::NotStash => "NotStash", - Error::AlreadyBonded => "AlreadyBonded", - Error::AlreadyPaired => "AlreadyPaired", - Error::EmptyTargets => "EmptyTargets", - Error::DuplicateIndex => "DuplicateIndex", - Error::InvalidSlashIndex => "InvalidSlashIndex", - Error::InsufficientBond => "InsufficientBond", - Error::NoMoreChunks => "NoMoreChunks", - Error::NoUnlockChunk => "NoUnlockChunk", - Error::FundedTarget => "FundedTarget", - Error::InvalidEraToReward => "InvalidEraToReward", - Error::InvalidNumberOfNominations => { - "InvalidNumberOfNominations" - } - Error::NotSortedAndUnique => "NotSortedAndUnique", - Error::AlreadyClaimed => "AlreadyClaimed", - Error::IncorrectHistoryDepth => "IncorrectHistoryDepth", - Error::IncorrectSlashingSpans => "IncorrectSlashingSpans", - Error::BadState => "BadState", - Error::TooManyTargets => "TooManyTargets", - Error::BadTarget => "BadTarget", - Error::CannotChillOther => "CannotChillOther", - Error::TooManyNominators => "TooManyNominators", - Error::TooManyValidators => "TooManyValidators", - Error::CommissionTooLow => "CommissionTooLow", - Error::BoundNotMet => "BoundNotMet", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - EraPaid { - era_index: ::core::primitive::u32, - validator_payout: ::core::primitive::u128, - remainder: ::core::primitive::u128, - }, - #[codec(index = 1)] - Rewarded { - stash: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 2)] - Slashed { - staker: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 3)] - SlashReported { - validator: ::subxt::utils::AccountId32, - fraction: runtime_types::sp_arithmetic::per_things::Perbill, - slash_era: ::core::primitive::u32, - }, - #[codec(index = 4)] - OldSlashingReportDiscarded { - session_index: ::core::primitive::u32, - }, - #[codec(index = 5)] - StakersElected, - #[codec(index = 6)] - Bonded { - stash: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 7)] - Unbonded { - stash: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 8)] - Withdrawn { - stash: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 9)] - Kicked { - nominator: ::subxt::utils::AccountId32, - stash: ::subxt::utils::AccountId32, - }, - #[codec(index = 10)] - StakingElectionFailed, - #[codec(index = 11)] - Chilled { stash: ::subxt::utils::AccountId32 }, - #[codec(index = 12)] - PayoutStarted { - era_index: ::core::primitive::u32, - validator_stash: ::subxt::utils::AccountId32, - }, - #[codec(index = 13)] - ValidatorPrefsSet { - stash: ::subxt::utils::AccountId32, - prefs: runtime_types::pallet_staking::ValidatorPrefs, - }, - #[codec(index = 14)] - ForceEra { mode: runtime_types::pallet_staking::Forcing }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::EraPaid { - era_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::EraPaid::era_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validator_payout: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::EraPaid::validator_payout`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - remainder: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::EraPaid::remainder`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Rewarded { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Rewarded::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Rewarded::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Slashed { - staker: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Slashed::staker`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Slashed::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::SlashReported { - validator: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::SlashReported::validator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fraction: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::SlashReported::fraction`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - slash_era: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::SlashReported::slash_era`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::OldSlashingReportDiscarded { - session_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::OldSlashingReportDiscarded::session_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::StakersElected) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Bonded { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Bonded::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Bonded::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Unbonded { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Unbonded::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Unbonded::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Withdrawn { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Withdrawn::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Withdrawn::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Kicked { - nominator: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Kicked::nominator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Kicked::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::StakingElectionFailed) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Chilled { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Chilled::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::PayoutStarted { - era_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::PayoutStarted::era_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validator_stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::PayoutStarted::validator_stash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ValidatorPrefsSet { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::ValidatorPrefsSet::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - prefs: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::ValidatorPrefsSet::prefs`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ForceEra { - mode: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ForceEra::mode`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::EraPaid { - ref era_index, - ref validator_payout, - ref remainder, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(era_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(validator_payout), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(remainder), - ) - } - Event::Rewarded { ref stash, ref amount } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Slashed { ref staker, ref amount } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(staker), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::SlashReported { - ref validator, - ref fraction, - ref slash_era, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(validator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(fraction), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(slash_era), - ) - } - Event::OldSlashingReportDiscarded { ref session_index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(session_index), - ) - } - Event::StakersElected => 0_usize, - Event::Bonded { ref stash, ref amount } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Unbonded { ref stash, ref amount } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Withdrawn { ref stash, ref amount } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Kicked { ref nominator, ref stash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(nominator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(stash), - ) - } - Event::StakingElectionFailed => 0_usize, - Event::Chilled { ref stash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(stash), - ) - } - Event::PayoutStarted { - ref era_index, - ref validator_stash, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(era_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(validator_stash), - ) - } - Event::ValidatorPrefsSet { ref stash, ref prefs } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(prefs), - ) - } - Event::ForceEra { ref mode } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(mode), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::EraPaid { - ref era_index, - ref validator_payout, - ref remainder, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - era_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - validator_payout, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - remainder, - __codec_dest_edqy, - ); - } - Event::Rewarded { ref stash, ref amount } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Slashed { ref staker, ref amount } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - staker, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::SlashReported { - ref validator, - ref fraction, - ref slash_era, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - validator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - fraction, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - slash_era, - __codec_dest_edqy, - ); - } - Event::OldSlashingReportDiscarded { ref session_index } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - session_index, - __codec_dest_edqy, - ); - } - Event::StakersElected => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Event::Bonded { ref stash, ref amount } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Unbonded { ref stash, ref amount } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Withdrawn { ref stash, ref amount } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Kicked { ref nominator, ref stash } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - nominator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - stash, - __codec_dest_edqy, - ); - } - Event::StakingElectionFailed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Event::Chilled { ref stash } => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - stash, - __codec_dest_edqy, - ); - } - Event::PayoutStarted { - ref era_index, - ref validator_stash, - } => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - era_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - validator_stash, - __codec_dest_edqy, - ); - } - Event::ValidatorPrefsSet { ref stash, ref prefs } => { - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - stash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - prefs, - __codec_dest_edqy, - ); - } - Event::ForceEra { ref mode } => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - mode, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "EraPaid" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::EraPaid { - era_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("era_index"))? - }, - validator_payout: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_payout"))? - }, - remainder: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("remainder"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::EraPaid { - era_index: { - let val = *vals - .get(&Some("era_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "era_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("era_index"))? - }, - validator_payout: { - let val = *vals - .get(&Some("validator_payout")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator_payout".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_payout"))? - }, - remainder: { - let val = *vals - .get(&Some("remainder")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "remainder".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("remainder"))? - }, - }) - }; - } - if value.name() == "Rewarded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Rewarded { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Rewarded { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Slashed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Slashed { - staker: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("staker"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Slashed { - staker: { - let val = *vals - .get(&Some("staker")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "staker".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("staker"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "SlashReported" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::SlashReported { - validator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("validator"))? - }, - fraction: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fraction"))? - }, - slash_era: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("slash_era"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::SlashReported { - validator: { - let val = *vals - .get(&Some("validator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("validator"))? - }, - fraction: { - let val = *vals - .get(&Some("fraction")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fraction".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fraction"))? - }, - slash_era: { - let val = *vals - .get(&Some("slash_era")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "slash_era".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("slash_era"))? - }, - }) - }; - } - if value.name() == "OldSlashingReportDiscarded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::OldSlashingReportDiscarded { - session_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("session_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::OldSlashingReportDiscarded { - session_index: { - let val = *vals - .get(&Some("session_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "session_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("session_index"))? - }, - }) - }; - } - if value.name() == "StakersElected" { - return Ok(Event::StakersElected); - } - if value.name() == "Bonded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Bonded { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Bonded { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Unbonded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Unbonded { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Unbonded { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Withdrawn" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Withdrawn { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Withdrawn { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Kicked" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Kicked { - nominator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Kicked { - nominator: { - let val = *vals - .get(&Some("nominator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nominator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nominator"))? - }, - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - }) - }; - } - if value.name() == "StakingElectionFailed" { - return Ok(Event::StakingElectionFailed); - } - if value.name() == "Chilled" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Chilled { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Chilled { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - }) - }; - } - if value.name() == "PayoutStarted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::PayoutStarted { - era_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("era_index"))? - }, - validator_stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_stash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::PayoutStarted { - era_index: { - let val = *vals - .get(&Some("era_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "era_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("era_index"))? - }, - validator_stash: { - let val = *vals - .get(&Some("validator_stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator_stash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_stash"))? - }, - }) - }; - } - if value.name() == "ValidatorPrefsSet" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::ValidatorPrefsSet { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - prefs: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prefs"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::ValidatorPrefsSet { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - prefs: { - let val = *vals - .get(&Some("prefs")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prefs".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prefs"))? - }, - }) - }; - } - if value.name() == "ForceEra" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::ForceEra { - mode: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("mode"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::ForceEra { - mode: { - let val = *vals - .get(&Some("mode")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "mode".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("mode"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "EraPaid", - "Rewarded", - "Slashed", - "SlashReported", - "OldSlashingReportDiscarded", - "StakersElected", - "Bonded", - "Unbonded", - "Withdrawn", - "Kicked", - "StakingElectionFailed", - "Chilled", - "PayoutStarted", - "ValidatorPrefsSet", - "ForceEra", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::EraPaid { era_index, validator_payout, remainder } => { - ::subxt::ext::scale_encode::Variant { - name: "EraPaid", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("era_index"), - era_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_payout"), - validator_payout - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("remainder"), - remainder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Rewarded { stash, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Rewarded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Slashed { staker, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Slashed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("staker"), - staker as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SlashReported { validator, fraction, slash_era } => { - ::subxt::ext::scale_encode::Variant { - name: "SlashReported", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validator"), - validator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fraction"), - fraction as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slash_era"), - slash_era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OldSlashingReportDiscarded { session_index } => { - ::subxt::ext::scale_encode::Variant { - name: "OldSlashingReportDiscarded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("session_index"), - session_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::StakersElected => { - ::subxt::ext::scale_encode::Variant { - name: "StakersElected", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Bonded { stash, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Bonded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unbonded { stash, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Unbonded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Withdrawn { stash, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Withdrawn", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Kicked { nominator, stash } => { - ::subxt::ext::scale_encode::Variant { - name: "Kicked", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("nominator"), - nominator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::StakingElectionFailed => { - ::subxt::ext::scale_encode::Variant { - name: "StakingElectionFailed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Chilled { stash } => { - ::subxt::ext::scale_encode::Variant { - name: "Chilled", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PayoutStarted { era_index, validator_stash } => { - ::subxt::ext::scale_encode::Variant { - name: "PayoutStarted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("era_index"), - era_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_stash"), - validator_stash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ValidatorPrefsSet { stash, prefs } => { - ::subxt::ext::scale_encode::Variant { - name: "ValidatorPrefsSet", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prefs"), - prefs as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ForceEra { mode } => { - ::subxt::ext::scale_encode::Variant { - name: "ForceEra", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("mode"), - mode as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::EraPaid { - era_index: __self_0, - validator_payout: __self_1, - remainder: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "EraPaid", - "era_index", - __self_0, - "validator_payout", - __self_1, - "remainder", - &__self_2, - ) - } - Event::Rewarded { stash: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Rewarded", - "stash", - __self_0, - "amount", - &__self_1, - ) - } - Event::Slashed { staker: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Slashed", - "staker", - __self_0, - "amount", - &__self_1, - ) - } - Event::SlashReported { - validator: __self_0, - fraction: __self_1, - slash_era: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SlashReported", - "validator", - __self_0, - "fraction", - __self_1, - "slash_era", - &__self_2, - ) - } - Event::OldSlashingReportDiscarded { - session_index: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "OldSlashingReportDiscarded", - "session_index", - &__self_0, - ) - } - Event::StakersElected => { - ::core::fmt::Formatter::write_str(f, "StakersElected") - } - Event::Bonded { stash: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Bonded", - "stash", - __self_0, - "amount", - &__self_1, - ) - } - Event::Unbonded { stash: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Unbonded", - "stash", - __self_0, - "amount", - &__self_1, - ) - } - Event::Withdrawn { stash: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Withdrawn", - "stash", - __self_0, - "amount", - &__self_1, - ) - } - Event::Kicked { nominator: __self_0, stash: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Kicked", - "nominator", - __self_0, - "stash", - &__self_1, - ) - } - Event::StakingElectionFailed => { - ::core::fmt::Formatter::write_str( - f, - "StakingElectionFailed", - ) - } - Event::Chilled { stash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Chilled", - "stash", - &__self_0, - ) - } - Event::PayoutStarted { - era_index: __self_0, - validator_stash: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PayoutStarted", - "era_index", - __self_0, - "validator_stash", - &__self_1, - ) - } - Event::ValidatorPrefsSet { - stash: __self_0, - prefs: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ValidatorPrefsSet", - "stash", - __self_0, - "prefs", - &__self_1, - ) - } - Event::ForceEra { mode: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ForceEra", - "mode", - &__self_0, - ) - } - } - } - } - } - } - pub mod slashing { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SlashingSpans { - pub span_index: ::core::primitive::u32, - pub last_start: ::core::primitive::u32, - pub last_nonzero_slash: ::core::primitive::u32, - pub prior: ::std::vec::Vec<::core::primitive::u32>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SlashingSpans { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SlashingSpans { - span_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SlashingSpans::span_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - last_start: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SlashingSpans::last_start`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - last_nonzero_slash: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SlashingSpans::last_nonzero_slash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - prior: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SlashingSpans::prior`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SlashingSpans { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.span_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.last_start), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.last_nonzero_slash, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.prior), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.span_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.last_start, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.last_nonzero_slash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.prior, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SlashingSpans {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SlashingSpans { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SlashingSpans; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SlashingSpans { - span_index: { - let val = *vals - .get(&Some("span_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "span_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("span_index"))? - }, - last_start: { - let val = *vals - .get(&Some("last_start")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "last_start".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("last_start"))? - }, - last_nonzero_slash: { - let val = *vals - .get(&Some("last_nonzero_slash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "last_nonzero_slash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("last_nonzero_slash"))? - }, - prior: { - let val = *vals - .get(&Some("prior")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "prior".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("prior"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(SlashingSpans { - span_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("span_index"))? - }, - last_start: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("last_start"))? - }, - last_nonzero_slash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("last_nonzero_slash"))? - }, - prior: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("prior"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SlashingSpans { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SlashingSpans { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SlashingSpans { - span_index, - last_start, - last_nonzero_slash, - prior, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("span_index"), - span_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_start"), - last_start as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_nonzero_slash"), - last_nonzero_slash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prior"), - prior as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SlashingSpans { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SlashingSpans { - span_index, - last_start, - last_nonzero_slash, - prior, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("span_index"), - span_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_start"), - last_start as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_nonzero_slash"), - last_nonzero_slash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("prior"), - prior as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SlashingSpans { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "SlashingSpans", - "span_index", - &self.span_index, - "last_start", - &self.last_start, - "last_nonzero_slash", - &self.last_nonzero_slash, - "prior", - &&self.prior, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SpanRecord<_0> { - pub slashed: _0, - pub paid_out: _0, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for SpanRecord<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SpanRecord::<_0> { - slashed: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SpanRecord::slashed`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - paid_out: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SpanRecord::paid_out`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for SpanRecord<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.slashed), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.paid_out), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.slashed, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.paid_out, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for SpanRecord<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for SpanRecord<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SpanRecord<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SpanRecord { - slashed: { - let val = *vals - .get(&Some("slashed")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "slashed".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("slashed"))? - }, - paid_out: { - let val = *vals - .get(&Some("paid_out")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "paid_out".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("paid_out"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SpanRecord { - slashed: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("slashed"))? - }, - paid_out: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("paid_out"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for SpanRecord<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for SpanRecord<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SpanRecord { slashed, paid_out } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("slashed"), - slashed as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("paid_out"), - paid_out as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for SpanRecord<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SpanRecord { slashed, paid_out } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("slashed"), - slashed as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("paid_out"), - paid_out as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for SpanRecord<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SpanRecord", - "slashed", - &self.slashed, - "paid_out", - &&self.paid_out, - ) - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ActiveEraInfo { - pub index: ::core::primitive::u32, - pub start: ::core::option::Option<::core::primitive::u64>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ActiveEraInfo { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ActiveEraInfo { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ActiveEraInfo::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - start: { - let __codec_res_edqy = <::core::option::Option< - ::core::primitive::u64, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ActiveEraInfo::start`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ActiveEraInfo { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.start), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.start, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ActiveEraInfo {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ActiveEraInfo { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ActiveEraInfo; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ActiveEraInfo { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - start: { - let val = *vals - .get(&Some("start")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "start".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("start"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ActiveEraInfo { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - start: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("start"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ActiveEraInfo { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ActiveEraInfo { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ActiveEraInfo { index, start } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("start"), - start as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ActiveEraInfo { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ActiveEraInfo { index, start } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("start"), - start as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ActiveEraInfo { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ActiveEraInfo", - "index", - &self.index, - "start", - &&self.start, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct EraRewardPoints<_0> { - pub total: ::core::primitive::u32, - pub individual: ::subxt::utils::KeyedVec<_0, ::core::primitive::u32>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for EraRewardPoints<_0> - where - ::subxt::utils::KeyedVec< - _0, - ::core::primitive::u32, - >: ::subxt::ext::codec::Decode, - ::subxt::utils::KeyedVec< - _0, - ::core::primitive::u32, - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(EraRewardPoints::<_0> { - total: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `EraRewardPoints::total`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - individual: { - let __codec_res_edqy = <::subxt::utils::KeyedVec< - _0, - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `EraRewardPoints::individual`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for EraRewardPoints<_0> - where - ::subxt::utils::KeyedVec< - _0, - ::core::primitive::u32, - >: ::subxt::ext::codec::Encode, - ::subxt::utils::KeyedVec< - _0, - ::core::primitive::u32, - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.total), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.individual), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.total, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.individual, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for EraRewardPoints<_0> - where - ::subxt::utils::KeyedVec< - _0, - ::core::primitive::u32, - >: ::subxt::ext::codec::Encode, - ::subxt::utils::KeyedVec< - _0, - ::core::primitive::u32, - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for EraRewardPoints<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = EraRewardPoints<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(EraRewardPoints { - total: { - let val = *vals - .get(&Some("total")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "total".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("total"))? - }, - individual: { - let val = *vals - .get(&Some("individual")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "individual".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("individual"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(EraRewardPoints { - total: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("total"))? - }, - individual: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("individual"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for EraRewardPoints<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for EraRewardPoints<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EraRewardPoints { total, individual } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("total"), - total as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("individual"), - individual as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for EraRewardPoints<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EraRewardPoints { total, individual } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("total"), - total as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("individual"), - individual as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for EraRewardPoints<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "EraRewardPoints", - "total", - &self.total, - "individual", - &&self.individual, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Exposure<_0, _1> { - #[codec(compact)] - pub total: _1, - #[codec(compact)] - pub own: _1, - pub others: ::std::vec::Vec< - runtime_types::pallet_staking::IndividualExposure<_0, _1>, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for Exposure<_0, _1> - where - ::std::vec::Vec< - runtime_types::pallet_staking::IndividualExposure<_0, _1>, - >: ::subxt::ext::codec::Decode, - ::std::vec::Vec< - runtime_types::pallet_staking::IndividualExposure<_0, _1>, - >: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::HasCompact, - _1: ::subxt::ext::codec::HasCompact, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Exposure::<_0, _1> { - total: { - let __codec_res_edqy = <<_1 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Exposure::total`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - own: { - let __codec_res_edqy = <<_1 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Exposure::own`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - others: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::pallet_staking::IndividualExposure<_0, _1>, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Exposure::others`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for Exposure<_0, _1> - where - ::std::vec::Vec< - runtime_types::pallet_staking::IndividualExposure<_0, _1>, - >: ::subxt::ext::codec::Encode, - ::std::vec::Vec< - runtime_types::pallet_staking::IndividualExposure<_0, _1>, - >: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::HasCompact, - _1: ::subxt::ext::codec::HasCompact, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<_1 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - _1, - >>::RefType::from(&self.total), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<_1 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - _1, - >>::RefType::from(&self.own), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.others), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<_1 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - _1, - >>::RefType::from(&self.total), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<_1 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - _1, - >>::RefType::from(&self.own), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.others, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike for Exposure<_0, _1> - where - ::std::vec::Vec< - runtime_types::pallet_staking::IndividualExposure<_0, _1>, - >: ::subxt::ext::codec::Encode, - ::std::vec::Vec< - runtime_types::pallet_staking::IndividualExposure<_0, _1>, - >: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::HasCompact, - _1: ::subxt::ext::codec::HasCompact, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for Exposure<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Exposure<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Exposure { - total: { - let val = *vals - .get(&Some("total")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "total".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("total"))? - }, - own: { - let val = *vals - .get(&Some("own")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "own".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("own"))? - }, - others: { - let val = *vals - .get(&Some("others")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "others".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("others"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Exposure { - total: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("total"))? - }, - own: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("own"))? - }, - others: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("others"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for Exposure<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for Exposure<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Exposure { total, own, others } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("total"), - total as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("own"), - own as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("others"), - others as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for Exposure<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Exposure { total, own, others } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("total"), - total as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("own"), - own as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("others"), - others as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for Exposure<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Exposure", - "total", - &self.total, - "own", - &self.own, - "others", - &&self.others, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Forcing { - #[codec(index = 0)] - NotForcing, - #[codec(index = 1)] - ForceNew, - #[codec(index = 2)] - ForceNone, - #[codec(index = 3)] - ForceAlways, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Forcing { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Forcing`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Forcing::NotForcing) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Forcing::ForceNew) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Forcing::ForceNone) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Forcing::ForceAlways) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Forcing`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Forcing { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Forcing::NotForcing => 0_usize, - Forcing::ForceNew => 0_usize, - Forcing::ForceNone => 0_usize, - Forcing::ForceAlways => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Forcing::NotForcing => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Forcing::ForceNew => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Forcing::ForceNone => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Forcing::ForceAlways => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Forcing {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Forcing { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Forcing; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NotForcing" { - return Ok(Forcing::NotForcing); - } - if value.name() == "ForceNew" { - return Ok(Forcing::ForceNew); - } - if value.name() == "ForceNone" { - return Ok(Forcing::ForceNone); - } - if value.name() == "ForceAlways" { - return Ok(Forcing::ForceAlways); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "NotForcing", - "ForceNew", - "ForceNone", - "ForceAlways", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Forcing { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NotForcing => { - ::subxt::ext::scale_encode::Variant { - name: "NotForcing", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ForceNew => { - ::subxt::ext::scale_encode::Variant { - name: "ForceNew", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ForceNone => { - ::subxt::ext::scale_encode::Variant { - name: "ForceNone", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ForceAlways => { - ::subxt::ext::scale_encode::Variant { - name: "ForceAlways", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Forcing { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Forcing::NotForcing => "NotForcing", - Forcing::ForceNew => "ForceNew", - Forcing::ForceNone => "ForceNone", - Forcing::ForceAlways => "ForceAlways", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IndividualExposure<_0, _1> { - pub who: _0, - #[codec(compact)] - pub value: _1, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode - for IndividualExposure<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::HasCompact, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(IndividualExposure::<_0, _1> { - who: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IndividualExposure::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <<_1 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IndividualExposure::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode - for IndividualExposure<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::HasCompact, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<_1 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - _1, - >>::RefType::from(&self.value), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<_1 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - _1, - >>::RefType::from(&self.value), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for IndividualExposure<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::HasCompact, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for IndividualExposure<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = IndividualExposure<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(IndividualExposure { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(IndividualExposure { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for IndividualExposure<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for IndividualExposure<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IndividualExposure { who, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for IndividualExposure<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IndividualExposure { who, value } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for IndividualExposure<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "IndividualExposure", - "who", - &self.who, - "value", - &&self.value, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Nominations { - pub targets: runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - pub submitted_in: ::core::primitive::u32, - pub suppressed: ::core::primitive::bool, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Nominations { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Nominations { - targets: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Nominations::targets`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - submitted_in: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Nominations::submitted_in`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - suppressed: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Nominations::suppressed`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Nominations { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.targets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.submitted_in), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.suppressed), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.targets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.submitted_in, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.suppressed, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Nominations {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Nominations { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Nominations; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Nominations { - targets: { - let val = *vals - .get(&Some("targets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "targets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("targets"))? - }, - submitted_in: { - let val = *vals - .get(&Some("submitted_in")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "submitted_in".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("submitted_in"))? - }, - suppressed: { - let val = *vals - .get(&Some("suppressed")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "suppressed".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("suppressed"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(Nominations { - targets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("targets"))? - }, - submitted_in: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("submitted_in"))? - }, - suppressed: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("suppressed"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Nominations { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Nominations { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Nominations { targets, submitted_in, suppressed } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("targets"), - targets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("submitted_in"), - submitted_in - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("suppressed"), - suppressed as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Nominations { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Nominations { targets, submitted_in, suppressed } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("targets"), - targets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("submitted_in"), - submitted_in - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("suppressed"), - suppressed as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Nominations { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Nominations", - "targets", - &self.targets, - "submitted_in", - &self.submitted_in, - "suppressed", - &&self.suppressed, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum RewardDestination<_0> { - #[codec(index = 0)] - Staked, - #[codec(index = 1)] - Stash, - #[codec(index = 2)] - Controller, - #[codec(index = 3)] - Account(_0), - #[codec(index = 4)] - None, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for RewardDestination<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `RewardDestination`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(RewardDestination::<_0>::Staked) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(RewardDestination::<_0>::Stash) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RewardDestination::<_0>::Controller, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RewardDestination::< - _0, - >::Account({ - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RewardDestination::Account.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(RewardDestination::<_0>::None) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `RewardDestination`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for RewardDestination<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - RewardDestination::Staked => 0_usize, - RewardDestination::Stash => 0_usize, - RewardDestination::Controller => 0_usize, - RewardDestination::Account(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RewardDestination::None => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - RewardDestination::Staked => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - RewardDestination::Stash => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - RewardDestination::Controller => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - RewardDestination::Account(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RewardDestination::None => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for RewardDestination<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for RewardDestination<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RewardDestination<_0>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Staked" { - return Ok(RewardDestination::Staked); - } - if value.name() == "Stash" { - return Ok(RewardDestination::Stash); - } - if value.name() == "Controller" { - return Ok(RewardDestination::Controller); - } - if value.name() == "Account" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RewardDestination::Account({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "None" { - return Ok(RewardDestination::None); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Staked", - "Stash", - "Controller", - "Account", - "None", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for RewardDestination<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Staked => { - ::subxt::ext::scale_encode::Variant { - name: "Staked", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Stash => { - ::subxt::ext::scale_encode::Variant { - name: "Stash", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Controller => { - ::subxt::ext::scale_encode::Variant { - name: "Controller", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Account(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Account", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::None => { - ::subxt::ext::scale_encode::Variant { - name: "None", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for RewardDestination<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - RewardDestination::Staked => { - ::core::fmt::Formatter::write_str(f, "Staked") - } - RewardDestination::Stash => { - ::core::fmt::Formatter::write_str(f, "Stash") - } - RewardDestination::Controller => { - ::core::fmt::Formatter::write_str(f, "Controller") - } - RewardDestination::Account(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Account", - &__self_0, - ) - } - RewardDestination::None => { - ::core::fmt::Formatter::write_str(f, "None") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct StakingLedger { - pub stash: ::subxt::utils::AccountId32, - #[codec(compact)] - pub total: ::core::primitive::u128, - #[codec(compact)] - pub active: ::core::primitive::u128, - pub unlocking: runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_staking::UnlockChunk< - ::core::primitive::u128, - >, - >, - pub claimed_rewards: runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u32, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for StakingLedger { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(StakingLedger { - stash: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `StakingLedger::stash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - total: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `StakingLedger::total`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - active: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `StakingLedger::active`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - unlocking: { - let __codec_res_edqy = , - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `StakingLedger::unlocking`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - claimed_rewards: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `StakingLedger::claimed_rewards`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for StakingLedger { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.stash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.total), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.active), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.unlocking), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.claimed_rewards, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.stash, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.total), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.active), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.unlocking, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.claimed_rewards, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for StakingLedger {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for StakingLedger { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = StakingLedger; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(StakingLedger { - stash: { - let val = *vals - .get(&Some("stash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - total: { - let val = *vals - .get(&Some("total")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "total".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("total"))? - }, - active: { - let val = *vals - .get(&Some("active")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "active".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("active"))? - }, - unlocking: { - let val = *vals - .get(&Some("unlocking")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "unlocking".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("unlocking"))? - }, - claimed_rewards: { - let val = *vals - .get(&Some("claimed_rewards")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "claimed_rewards".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("claimed_rewards"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(StakingLedger { - stash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stash"))? - }, - total: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("total"))? - }, - active: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("active"))? - }, - unlocking: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("unlocking"))? - }, - claimed_rewards: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("claimed_rewards"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for StakingLedger { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for StakingLedger { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let StakingLedger { - stash, - total, - active, - unlocking, - claimed_rewards, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("total"), - total as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("active"), - active as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("unlocking"), - unlocking as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("claimed_rewards"), - claimed_rewards - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for StakingLedger { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let StakingLedger { - stash, - total, - active, - unlocking, - claimed_rewards, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stash"), - stash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("total"), - total as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("active"), - active as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("unlocking"), - unlocking as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("claimed_rewards"), - claimed_rewards - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for StakingLedger { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "StakingLedger", - "stash", - &self.stash, - "total", - &self.total, - "active", - &self.active, - "unlocking", - &self.unlocking, - "claimed_rewards", - &&self.claimed_rewards, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnappliedSlash<_0, _1> { - pub validator: _0, - pub own: _1, - pub others: ::std::vec::Vec<(_0, _1)>, - pub reporters: ::std::vec::Vec<_0>, - pub payout: _1, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for UnappliedSlash<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - ::std::vec::Vec<(_0, _1)>: ::subxt::ext::codec::Decode, - ::std::vec::Vec<(_0, _1)>: ::subxt::ext::codec::Decode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Decode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(UnappliedSlash::<_0, _1> { - validator: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnappliedSlash::validator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - own: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnappliedSlash::own`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - others: { - let __codec_res_edqy = <::std::vec::Vec< - (_0, _1), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnappliedSlash::others`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - reporters: { - let __codec_res_edqy = <::std::vec::Vec< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnappliedSlash::reporters`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - payout: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnappliedSlash::payout`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for UnappliedSlash<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - ::std::vec::Vec<(_0, _1)>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<(_0, _1)>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.validator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.own), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.others), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.reporters), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.payout), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.validator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.own, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.others, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.reporters, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.payout, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for UnappliedSlash<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - ::std::vec::Vec<(_0, _1)>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<(_0, _1)>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for UnappliedSlash<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UnappliedSlash<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(UnappliedSlash { - validator: { - let val = *vals - .get(&Some("validator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("validator"))? - }, - own: { - let val = *vals - .get(&Some("own")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "own".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("own"))? - }, - others: { - let val = *vals - .get(&Some("others")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "others".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("others"))? - }, - reporters: { - let val = *vals - .get(&Some("reporters")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reporters".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reporters"))? - }, - payout: { - let val = *vals - .get(&Some("payout")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "payout".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(UnappliedSlash { - validator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("validator"))? - }, - own: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("own"))? - }, - others: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("others"))? - }, - reporters: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reporters"))? - }, - payout: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for UnappliedSlash<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for UnappliedSlash<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnappliedSlash { - validator, - own, - others, - reporters, - payout, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validator"), - validator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("own"), - own as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("others"), - others as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("reporters"), - reporters as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("payout"), - payout as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for UnappliedSlash<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnappliedSlash { - validator, - own, - others, - reporters, - payout, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validator"), - validator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("own"), - own as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("others"), - others as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("reporters"), - reporters as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("payout"), - payout as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for UnappliedSlash<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "UnappliedSlash", - "validator", - &self.validator, - "own", - &self.own, - "others", - &self.others, - "reporters", - &self.reporters, - "payout", - &&self.payout, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnlockChunk<_0> { - #[codec(compact)] - pub value: _0, - #[codec(compact)] - pub era: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for UnlockChunk<_0> - where - _0: ::subxt::ext::codec::HasCompact, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(UnlockChunk::<_0> { - value: { - let __codec_res_edqy = <<_0 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnlockChunk::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - era: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UnlockChunk::era`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for UnlockChunk<_0> - where - _0: ::subxt::ext::codec::HasCompact, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<_0 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - _0, - >>::RefType::from(&self.value), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.era), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<_0 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - _0, - >>::RefType::from(&self.value), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.era), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for UnlockChunk<_0> - where - _0: ::subxt::ext::codec::HasCompact, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor for UnlockChunk<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UnlockChunk<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(UnlockChunk { - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - era: { - let val = *vals - .get(&Some("era")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "era".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(UnlockChunk { - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - era: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("era"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for UnlockChunk<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for UnlockChunk<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnlockChunk { value, era } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("era"), - era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields for UnlockChunk<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UnlockChunk { value, era } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("era"), - era as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for UnlockChunk<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "UnlockChunk", - "value", - &self.value, - "era", - &&self.era, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ValidatorPrefs { - #[codec(compact)] - pub commission: runtime_types::sp_arithmetic::per_things::Perbill, - pub blocked: ::core::primitive::bool, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ValidatorPrefs { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ValidatorPrefs { - commission: { - let __codec_res_edqy = <::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ValidatorPrefs::commission`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - blocked: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ValidatorPrefs::blocked`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ValidatorPrefs { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::sp_arithmetic::per_things::Perbill, - >>::RefType::from(&self.commission), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.blocked), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::sp_arithmetic::per_things::Perbill, - >>::RefType::from(&self.commission), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.blocked, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ValidatorPrefs {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ValidatorPrefs { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ValidatorPrefs; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ValidatorPrefs { - commission: { - let val = *vals - .get(&Some("commission")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "commission".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("commission"))? - }, - blocked: { - let val = *vals - .get(&Some("blocked")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "blocked".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("blocked"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ValidatorPrefs { - commission: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("commission"))? - }, - blocked: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("blocked"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ValidatorPrefs { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ValidatorPrefs { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ValidatorPrefs { commission, blocked } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("commission"), - commission as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("blocked"), - blocked as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ValidatorPrefs { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ValidatorPrefs { commission, blocked } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("commission"), - commission as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("blocked"), - blocked as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ValidatorPrefs { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ValidatorPrefs", - "commission", - &self.commission, - "blocked", - &&self.blocked, - ) - } - } - } - pub mod pallet_timestamp { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - set { #[codec(compact)] now: ::core::primitive::u64 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set { - now: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set::now`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::set { ref now } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(now), - ), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::set { ref now } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(now), - __codec_dest_edqy, - ); - } - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "set" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set { - now: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("now"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set { - now: { - let val = *vals - .get(&Some("now")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "now".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("now"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["set"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::set { now } => { - ::subxt::ext::scale_encode::Variant { - name: "set", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("now"), - now as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::set { now: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set", - "now", - &__self_0, - ) - } - } - } - } - } - } - pub mod pallet_tips { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - report_awesome { - reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 1)] - retract_tip { hash: ::subxt::utils::H256 }, - #[codec(index = 2)] - tip_new { - reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - #[codec(compact)] - tip_value: ::core::primitive::u128, - }, - #[codec(index = 3)] - tip { - hash: ::subxt::utils::H256, - #[codec(compact)] - tip_value: ::core::primitive::u128, - }, - #[codec(index = 4)] - close_tip { hash: ::subxt::utils::H256 }, - #[codec(index = 5)] - slash_tip { hash: ::subxt::utils::H256 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::report_awesome { - reason: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::report_awesome::reason`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::report_awesome::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::retract_tip { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::retract_tip::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::tip_new { - reason: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::tip_new::reason`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::tip_new::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tip_value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::tip_new::tip_value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::tip { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::tip::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tip_value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::tip::tip_value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::close_tip { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::close_tip::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::slash_tip { - hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::slash_tip::hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::report_awesome { ref reason, ref who } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(reason), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - } - Call::retract_tip { ref hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - } - Call::tip_new { ref reason, ref who, ref tip_value } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(reason), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(tip_value), - ), - ) - } - Call::tip { ref hash, ref tip_value } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(tip_value), - ), - ) - } - Call::close_tip { ref hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - } - Call::slash_tip { ref hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(hash), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::report_awesome { ref reason, ref who } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - reason, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - } - Call::retract_tip { ref hash } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - } - Call::tip_new { ref reason, ref who, ref tip_value } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - reason, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(tip_value), - __codec_dest_edqy, - ); - } - } - Call::tip { ref hash, ref tip_value } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(tip_value), - __codec_dest_edqy, - ); - } - } - Call::close_tip { ref hash } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - } - Call::slash_tip { ref hash } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - hash, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "report_awesome" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::report_awesome { - reason: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reason"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::report_awesome { - reason: { - let val = *vals - .get(&Some("reason")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reason".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reason"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - }; - } - if value.name() == "retract_tip" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::retract_tip { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::retract_tip { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - }; - } - if value.name() == "tip_new" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::tip_new { - reason: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reason"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - tip_value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tip_value"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::tip_new { - reason: { - let val = *vals - .get(&Some("reason")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reason".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reason"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - tip_value: { - let val = *vals - .get(&Some("tip_value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tip_value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tip_value"))? - }, - }) - }; - } - if value.name() == "tip" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::tip { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - tip_value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tip_value"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::tip { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - tip_value: { - let val = *vals - .get(&Some("tip_value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tip_value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tip_value"))? - }, - }) - }; - } - if value.name() == "close_tip" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::close_tip { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::close_tip { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - }; - } - if value.name() == "slash_tip" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::slash_tip { - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::slash_tip { - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "report_awesome", - "retract_tip", - "tip_new", - "tip", - "close_tip", - "slash_tip", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::report_awesome { reason, who } => { - ::subxt::ext::scale_encode::Variant { - name: "report_awesome", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reason"), - reason as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::retract_tip { hash } => { - ::subxt::ext::scale_encode::Variant { - name: "retract_tip", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::tip_new { reason, who, tip_value } => { - ::subxt::ext::scale_encode::Variant { - name: "tip_new", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reason"), - reason as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tip_value"), - tip_value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::tip { hash, tip_value } => { - ::subxt::ext::scale_encode::Variant { - name: "tip", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tip_value"), - tip_value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::close_tip { hash } => { - ::subxt::ext::scale_encode::Variant { - name: "close_tip", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::slash_tip { hash } => { - ::subxt::ext::scale_encode::Variant { - name: "slash_tip", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::report_awesome { reason: __self_0, who: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "report_awesome", - "reason", - __self_0, - "who", - &__self_1, - ) - } - Call::retract_tip { hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "retract_tip", - "hash", - &__self_0, - ) - } - Call::tip_new { - reason: __self_0, - who: __self_1, - tip_value: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "tip_new", - "reason", - __self_0, - "who", - __self_1, - "tip_value", - &__self_2, - ) - } - Call::tip { hash: __self_0, tip_value: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "tip", - "hash", - __self_0, - "tip_value", - &__self_1, - ) - } - Call::close_tip { hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "close_tip", - "hash", - &__self_0, - ) - } - Call::slash_tip { hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "slash_tip", - "hash", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - ReasonTooBig, - #[codec(index = 1)] - AlreadyKnown, - #[codec(index = 2)] - UnknownTip, - #[codec(index = 3)] - NotFinder, - #[codec(index = 4)] - StillOpen, - #[codec(index = 5)] - Premature, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ReasonTooBig) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyKnown) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UnknownTip) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotFinder) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::StillOpen) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Premature) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::ReasonTooBig => 0_usize, - Error::AlreadyKnown => 0_usize, - Error::UnknownTip => 0_usize, - Error::NotFinder => 0_usize, - Error::StillOpen => 0_usize, - Error::Premature => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::ReasonTooBig => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::AlreadyKnown => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::UnknownTip => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::NotFinder => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::StillOpen => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::Premature => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "ReasonTooBig" { - return Ok(Error::ReasonTooBig); - } - if value.name() == "AlreadyKnown" { - return Ok(Error::AlreadyKnown); - } - if value.name() == "UnknownTip" { - return Ok(Error::UnknownTip); - } - if value.name() == "NotFinder" { - return Ok(Error::NotFinder); - } - if value.name() == "StillOpen" { - return Ok(Error::StillOpen); - } - if value.name() == "Premature" { - return Ok(Error::Premature); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "ReasonTooBig", - "AlreadyKnown", - "UnknownTip", - "NotFinder", - "StillOpen", - "Premature", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::ReasonTooBig => { - ::subxt::ext::scale_encode::Variant { - name: "ReasonTooBig", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyKnown => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyKnown", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnknownTip => { - ::subxt::ext::scale_encode::Variant { - name: "UnknownTip", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotFinder => { - ::subxt::ext::scale_encode::Variant { - name: "NotFinder", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::StillOpen => { - ::subxt::ext::scale_encode::Variant { - name: "StillOpen", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Premature => { - ::subxt::ext::scale_encode::Variant { - name: "Premature", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::ReasonTooBig => "ReasonTooBig", - Error::AlreadyKnown => "AlreadyKnown", - Error::UnknownTip => "UnknownTip", - Error::NotFinder => "NotFinder", - Error::StillOpen => "StillOpen", - Error::Premature => "Premature", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - NewTip { tip_hash: ::subxt::utils::H256 }, - #[codec(index = 1)] - TipClosing { tip_hash: ::subxt::utils::H256 }, - #[codec(index = 2)] - TipClosed { - tip_hash: ::subxt::utils::H256, - who: ::subxt::utils::AccountId32, - payout: ::core::primitive::u128, - }, - #[codec(index = 3)] - TipRetracted { tip_hash: ::subxt::utils::H256 }, - #[codec(index = 4)] - TipSlashed { - tip_hash: ::subxt::utils::H256, - finder: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::NewTip { - tip_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NewTip::tip_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::TipClosing { - tip_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::TipClosing::tip_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::TipClosed { - tip_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::TipClosed::tip_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::TipClosed::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - payout: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::TipClosed::payout`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::TipRetracted { - tip_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::TipRetracted::tip_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::TipSlashed { - tip_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::TipSlashed::tip_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - finder: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::TipSlashed::finder`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::TipSlashed::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::NewTip { ref tip_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(tip_hash), - ) - } - Event::TipClosing { ref tip_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(tip_hash), - ) - } - Event::TipClosed { ref tip_hash, ref who, ref payout } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(tip_hash), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(payout), - ) - } - Event::TipRetracted { ref tip_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(tip_hash), - ) - } - Event::TipSlashed { - ref tip_hash, - ref finder, - ref deposit, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(tip_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(finder), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(deposit), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::NewTip { ref tip_hash } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - tip_hash, - __codec_dest_edqy, - ); - } - Event::TipClosing { ref tip_hash } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - tip_hash, - __codec_dest_edqy, - ); - } - Event::TipClosed { ref tip_hash, ref who, ref payout } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - tip_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - payout, - __codec_dest_edqy, - ); - } - Event::TipRetracted { ref tip_hash } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - tip_hash, - __codec_dest_edqy, - ); - } - Event::TipSlashed { - ref tip_hash, - ref finder, - ref deposit, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - tip_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - finder, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - deposit, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NewTip" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::NewTip { - tip_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::NewTip { - tip_hash: { - let val = *vals - .get(&Some("tip_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tip_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - }) - }; - } - if value.name() == "TipClosing" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::TipClosing { - tip_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::TipClosing { - tip_hash: { - let val = *vals - .get(&Some("tip_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tip_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - }) - }; - } - if value.name() == "TipClosed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::TipClosed { - tip_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - payout: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::TipClosed { - tip_hash: { - let val = *vals - .get(&Some("tip_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tip_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - payout: { - let val = *vals - .get(&Some("payout")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "payout".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("payout"))? - }, - }) - }; - } - if value.name() == "TipRetracted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::TipRetracted { - tip_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::TipRetracted { - tip_hash: { - let val = *vals - .get(&Some("tip_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tip_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - }) - }; - } - if value.name() == "TipSlashed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::TipSlashed { - tip_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - finder: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("finder"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::TipSlashed { - tip_hash: { - let val = *vals - .get(&Some("tip_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tip_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tip_hash"))? - }, - finder: { - let val = *vals - .get(&Some("finder")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "finder".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("finder"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "NewTip", - "TipClosing", - "TipClosed", - "TipRetracted", - "TipSlashed", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NewTip { tip_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "NewTip", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("tip_hash"), - tip_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TipClosing { tip_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "TipClosing", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("tip_hash"), - tip_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TipClosed { tip_hash, who, payout } => { - ::subxt::ext::scale_encode::Variant { - name: "TipClosed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("tip_hash"), - tip_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("payout"), - payout as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TipRetracted { tip_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "TipRetracted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("tip_hash"), - tip_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TipSlashed { tip_hash, finder, deposit } => { - ::subxt::ext::scale_encode::Variant { - name: "TipSlashed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("tip_hash"), - tip_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("finder"), - finder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::NewTip { tip_hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "NewTip", - "tip_hash", - &__self_0, - ) - } - Event::TipClosing { tip_hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "TipClosing", - "tip_hash", - &__self_0, - ) - } - Event::TipClosed { - tip_hash: __self_0, - who: __self_1, - payout: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "TipClosed", - "tip_hash", - __self_0, - "who", - __self_1, - "payout", - &__self_2, - ) - } - Event::TipRetracted { tip_hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "TipRetracted", - "tip_hash", - &__self_0, - ) - } - Event::TipSlashed { - tip_hash: __self_0, - finder: __self_1, - deposit: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "TipSlashed", - "tip_hash", - __self_0, - "finder", - __self_1, - "deposit", - &__self_2, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct 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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2, _3> ::subxt::ext::codec::Decode - for OpenTip<_0, _1, _2, _3> - where - _3: ::subxt::ext::codec::Decode, - _3: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - ::core::option::Option<_2>: ::subxt::ext::codec::Decode, - ::core::option::Option<_2>: ::subxt::ext::codec::Decode, - ::std::vec::Vec<(_0, _1)>: ::subxt::ext::codec::Decode, - ::std::vec::Vec<(_0, _1)>: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(OpenTip::<_0, _1, _2, _3> { - reason: { - let __codec_res_edqy = <_3 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpenTip::reason`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpenTip::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - finder: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpenTip::finder`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpenTip::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - closes: { - let __codec_res_edqy = <::core::option::Option< - _2, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpenTip::closes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tips: { - let __codec_res_edqy = <::std::vec::Vec< - (_0, _1), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpenTip::tips`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - finders_fee: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpenTip::finders_fee`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2, _3> ::subxt::ext::codec::Encode - for OpenTip<_0, _1, _2, _3> - where - _3: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - ::core::option::Option<_2>: ::subxt::ext::codec::Encode, - ::core::option::Option<_2>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<(_0, _1)>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<(_0, _1)>: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.reason), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.who), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.finder), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deposit), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.closes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.tips), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.finders_fee), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.reason, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.finder, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.closes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.tips, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.finders_fee, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1, _2, _3> ::subxt::ext::codec::EncodeLike - for OpenTip<_0, _1, _2, _3> - where - _3: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - ::core::option::Option<_2>: ::subxt::ext::codec::Encode, - ::core::option::Option<_2>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<(_0, _1)>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<(_0, _1)>: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2, _3>( - ::core::marker::PhantomData<(_0, _1, _2, _3)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1, _2, _3> ::subxt::ext::scale_decode::IntoVisitor - for OpenTip<_0, _1, _2, _3> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _3: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_3 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2, _3>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1, _2, _3> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2, _3> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _3: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_3 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = OpenTip<_0, _1, _2, _3>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(OpenTip { - reason: { - let val = *vals - .get(&Some("reason")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reason".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reason"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - finder: { - let val = *vals - .get(&Some("finder")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "finder".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("finder"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - closes: { - let val = *vals - .get(&Some("closes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "closes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("closes"))? - }, - tips: { - let val = *vals - .get(&Some("tips")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tips".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tips"))? - }, - finders_fee: { - let val = *vals - .get(&Some("finders_fee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "finders_fee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("finders_fee"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 7usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 7usize, - }), - ); - } - let vals = value; - Ok(OpenTip { - reason: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reason"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - finder: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("finder"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - closes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("closes"))? - }, - tips: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tips"))? - }, - finders_fee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("finders_fee"))? - }, - }) - } - } - impl<_0, _1, _2, _3> ::subxt::ext::scale_decode::DecodeAsFields - for OpenTip<_0, _1, _2, _3> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _3: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_3 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1, _2, _3> ::subxt::ext::scale_encode::EncodeAsType - for OpenTip<_0, _1, _2, _3> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - _3: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OpenTip { - reason, - who, - finder, - deposit, - closes, - tips, - finders_fee, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reason"), - reason as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("finder"), - finder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("closes"), - closes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tips"), - tips as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("finders_fee"), - finders_fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1, _2, _3> ::subxt::ext::scale_encode::EncodeAsFields - for OpenTip<_0, _1, _2, _3> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - _3: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OpenTip { - reason, - who, - finder, - deposit, - closes, - tips, - finders_fee, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reason"), - reason as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("finder"), - finder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("closes"), - closes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tips"), - tips as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("finders_fee"), - finders_fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - _3: ::core::fmt::Debug, - > ::core::fmt::Debug for OpenTip<_0, _1, _2, _3> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "reason", - "who", - "finder", - "deposit", - "closes", - "tips", - "finders_fee", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.reason, - &self.who, - &self.finder, - &self.deposit, - &self.closes, - &self.tips, - &&self.finders_fee, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "OpenTip", - names, - values, - ) - } - } - } - pub mod pallet_transaction_payment { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - TransactionFeePaid { - who: ::subxt::utils::AccountId32, - actual_fee: ::core::primitive::u128, - tip: ::core::primitive::u128, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::TransactionFeePaid { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::TransactionFeePaid::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - actual_fee: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::TransactionFeePaid::actual_fee`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - tip: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::TransactionFeePaid::tip`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::TransactionFeePaid { - ref who, - ref actual_fee, - ref tip, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(actual_fee), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(tip)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::TransactionFeePaid { - ref who, - ref actual_fee, - ref tip, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - actual_fee, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - tip, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "TransactionFeePaid" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::TransactionFeePaid { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - actual_fee: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("actual_fee"))? - }, - tip: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("tip"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::TransactionFeePaid { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - actual_fee: { - let val = *vals - .get(&Some("actual_fee")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "actual_fee".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("actual_fee"))? - }, - tip: { - let val = *vals - .get(&Some("tip")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "tip".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("tip"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["TransactionFeePaid"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::TransactionFeePaid { who, actual_fee, tip } => { - ::subxt::ext::scale_encode::Variant { - name: "TransactionFeePaid", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("actual_fee"), - actual_fee as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("tip"), - tip as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::TransactionFeePaid { - who: __self_0, - actual_fee: __self_1, - tip: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "TransactionFeePaid", - "who", - __self_0, - "actual_fee", - __self_1, - "tip", - &__self_2, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ChargeTransactionPayment( - #[codec(compact)] - pub ::core::primitive::u128, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ChargeTransactionPayment { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - ChargeTransactionPayment({ - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ChargeTransactionPayment.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ChargeTransactionPayment { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint( - &{ - <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.0) - }, - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &{ - <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.0) - }, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode( - &{ - <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.0) - }, - ) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &{ - <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(&self.0) - }, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ChargeTransactionPayment {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ChargeTransactionPayment { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ChargeTransactionPayment; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - ChargeTransactionPayment({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ChargeTransactionPayment { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ChargeTransactionPayment { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ChargeTransactionPayment(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ChargeTransactionPayment { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ChargeTransactionPayment(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ChargeTransactionPayment { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ChargeTransactionPayment", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Releases { - #[codec(index = 0)] - V1Ancient, - #[codec(index = 1)] - V2, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Releases { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Releases`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Releases::V1Ancient) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Releases::V2) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Releases`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Releases { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Releases::V1Ancient => 0_usize, - Releases::V2 => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Releases::V1Ancient => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Releases::V2 => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Releases {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Releases { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Releases; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "V1Ancient" { - return Ok(Releases::V1Ancient); - } - if value.name() == "V2" { - return Ok(Releases::V2); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["V1Ancient", "V2"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Releases { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::V1Ancient => { - ::subxt::ext::scale_encode::Variant { - name: "V1Ancient", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::V2 => { - ::subxt::ext::scale_encode::Variant { - name: "V2", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Releases { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Releases::V1Ancient => "V1Ancient", - Releases::V2 => "V2", - }, - ) - } - } - } - pub mod pallet_treasury { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - propose_spend { - #[codec(compact)] - value: ::core::primitive::u128, - beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 1)] - reject_proposal { - #[codec(compact)] - proposal_id: ::core::primitive::u32, - }, - #[codec(index = 2)] - approve_proposal { - #[codec(compact)] - proposal_id: ::core::primitive::u32, - }, - #[codec(index = 3)] - spend { - #[codec(compact)] - amount: ::core::primitive::u128, - beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 4)] - remove_approval { - #[codec(compact)] - proposal_id: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::propose_spend { - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::propose_spend::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::propose_spend::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::reject_proposal { - proposal_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::reject_proposal::proposal_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::approve_proposal { - proposal_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::approve_proposal::proposal_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::spend { - amount: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::spend::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::spend::beneficiary`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::remove_approval { - proposal_id: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::remove_approval::proposal_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::propose_spend { ref value, ref beneficiary } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - } - Call::reject_proposal { ref proposal_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(proposal_id), - ), - ) - } - Call::approve_proposal { ref proposal_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(proposal_id), - ), - ) - } - Call::spend { ref amount, ref beneficiary } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(amount), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - } - Call::remove_approval { ref proposal_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(proposal_id), - ), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::propose_spend { ref value, ref beneficiary } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - } - Call::reject_proposal { ref proposal_id } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(proposal_id), - __codec_dest_edqy, - ); - } - } - Call::approve_proposal { ref proposal_id } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(proposal_id), - __codec_dest_edqy, - ); - } - } - Call::spend { ref amount, ref beneficiary } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(amount), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - } - Call::remove_approval { ref proposal_id } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(proposal_id), - __codec_dest_edqy, - ); - } - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "propose_spend" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::propose_spend { - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::propose_spend { - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - }; - } - if value.name() == "reject_proposal" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::reject_proposal { - proposal_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::reject_proposal { - proposal_id: { - let val = *vals - .get(&Some("proposal_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal_id"))? - }, - }) - }; - } - if value.name() == "approve_proposal" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::approve_proposal { - proposal_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::approve_proposal { - proposal_id: { - let val = *vals - .get(&Some("proposal_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal_id"))? - }, - }) - }; - } - if value.name() == "spend" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::spend { - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::spend { - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - }; - } - if value.name() == "remove_approval" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::remove_approval { - proposal_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposal_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::remove_approval { - proposal_id: { - let val = *vals - .get(&Some("proposal_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposal_id"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "propose_spend", - "reject_proposal", - "approve_proposal", - "spend", - "remove_approval", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::propose_spend { value, beneficiary } => { - ::subxt::ext::scale_encode::Variant { - name: "propose_spend", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::reject_proposal { proposal_id } => { - ::subxt::ext::scale_encode::Variant { - name: "reject_proposal", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_id"), - proposal_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::approve_proposal { proposal_id } => { - ::subxt::ext::scale_encode::Variant { - name: "approve_proposal", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_id"), - proposal_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::spend { amount, beneficiary } => { - ::subxt::ext::scale_encode::Variant { - name: "spend", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::remove_approval { proposal_id } => { - ::subxt::ext::scale_encode::Variant { - name: "remove_approval", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_id"), - proposal_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::propose_spend { - value: __self_0, - beneficiary: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "propose_spend", - "value", - __self_0, - "beneficiary", - &__self_1, - ) - } - Call::reject_proposal { proposal_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "reject_proposal", - "proposal_id", - &__self_0, - ) - } - Call::approve_proposal { proposal_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "approve_proposal", - "proposal_id", - &__self_0, - ) - } - Call::spend { amount: __self_0, beneficiary: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "spend", - "amount", - __self_0, - "beneficiary", - &__self_1, - ) - } - Call::remove_approval { proposal_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "remove_approval", - "proposal_id", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - InsufficientProposersBalance, - #[codec(index = 1)] - InvalidIndex, - #[codec(index = 2)] - TooManyApprovals, - #[codec(index = 3)] - InsufficientPermission, - #[codec(index = 4)] - ProposalNotApproved, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::InsufficientProposersBalance, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidIndex) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyApprovals) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InsufficientPermission) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ProposalNotApproved) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::InsufficientProposersBalance => 0_usize, - Error::InvalidIndex => 0_usize, - Error::TooManyApprovals => 0_usize, - Error::InsufficientPermission => 0_usize, - Error::ProposalNotApproved => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::InsufficientProposersBalance => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::InvalidIndex => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::TooManyApprovals => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::InsufficientPermission => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::ProposalNotApproved => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "InsufficientProposersBalance" { - return Ok(Error::InsufficientProposersBalance); - } - if value.name() == "InvalidIndex" { - return Ok(Error::InvalidIndex); - } - if value.name() == "TooManyApprovals" { - return Ok(Error::TooManyApprovals); - } - if value.name() == "InsufficientPermission" { - return Ok(Error::InsufficientPermission); - } - if value.name() == "ProposalNotApproved" { - return Ok(Error::ProposalNotApproved); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "InsufficientProposersBalance", - "InvalidIndex", - "TooManyApprovals", - "InsufficientPermission", - "ProposalNotApproved", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::InsufficientProposersBalance => { - ::subxt::ext::scale_encode::Variant { - name: "InsufficientProposersBalance", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidIndex => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidIndex", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyApprovals => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyApprovals", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InsufficientPermission => { - ::subxt::ext::scale_encode::Variant { - name: "InsufficientPermission", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ProposalNotApproved => { - ::subxt::ext::scale_encode::Variant { - name: "ProposalNotApproved", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::InsufficientProposersBalance => { - "InsufficientProposersBalance" - } - Error::InvalidIndex => "InvalidIndex", - Error::TooManyApprovals => "TooManyApprovals", - Error::InsufficientPermission => "InsufficientPermission", - Error::ProposalNotApproved => "ProposalNotApproved", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - Proposed { proposal_index: ::core::primitive::u32 }, - #[codec(index = 1)] - Spending { budget_remaining: ::core::primitive::u128 }, - #[codec(index = 2)] - Awarded { - proposal_index: ::core::primitive::u32, - award: ::core::primitive::u128, - account: ::subxt::utils::AccountId32, - }, - #[codec(index = 3)] - Rejected { - proposal_index: ::core::primitive::u32, - slashed: ::core::primitive::u128, - }, - #[codec(index = 4)] - Burnt { burnt_funds: ::core::primitive::u128 }, - #[codec(index = 5)] - Rollover { rollover_balance: ::core::primitive::u128 }, - #[codec(index = 6)] - Deposit { value: ::core::primitive::u128 }, - #[codec(index = 7)] - SpendApproved { - proposal_index: ::core::primitive::u32, - amount: ::core::primitive::u128, - beneficiary: ::subxt::utils::AccountId32, - }, - #[codec(index = 8)] - UpdatedInactive { - reactivated: ::core::primitive::u128, - deactivated: ::core::primitive::u128, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Proposed { - proposal_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::Proposed::proposal_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Spending { - budget_remaining: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::Spending::budget_remaining`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Awarded { - proposal_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Awarded::proposal_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - award: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Awarded::award`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Awarded::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Rejected { - proposal_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::Rejected::proposal_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - slashed: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Rejected::slashed`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Burnt { - burnt_funds: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Burnt::burnt_funds`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Rollover { - rollover_balance: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::Rollover::rollover_balance`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Deposit { - value: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Deposit::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::SpendApproved { - proposal_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::SpendApproved::proposal_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::SpendApproved::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::SpendApproved::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::UpdatedInactive { - reactivated: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::UpdatedInactive::reactivated`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deactivated: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::UpdatedInactive::deactivated`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::Proposed { ref proposal_index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_index), - ) - } - Event::Spending { ref budget_remaining } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(budget_remaining), - ) - } - Event::Awarded { - ref proposal_index, - ref award, - ref account, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(award), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(account), - ) - } - Event::Rejected { ref proposal_index, ref slashed } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(slashed), - ) - } - Event::Burnt { ref burnt_funds } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(burnt_funds), - ) - } - Event::Rollover { ref rollover_balance } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(rollover_balance), - ) - } - Event::Deposit { ref value } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(value), - ) - } - Event::SpendApproved { - ref proposal_index, - ref amount, - ref beneficiary, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(proposal_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - } - Event::UpdatedInactive { - ref reactivated, - ref deactivated, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(reactivated), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(deactivated), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::Proposed { ref proposal_index } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_index, - __codec_dest_edqy, - ); - } - Event::Spending { ref budget_remaining } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - budget_remaining, - __codec_dest_edqy, - ); - } - Event::Awarded { - ref proposal_index, - ref award, - ref account, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - award, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - account, - __codec_dest_edqy, - ); - } - Event::Rejected { ref proposal_index, ref slashed } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - slashed, - __codec_dest_edqy, - ); - } - Event::Burnt { ref burnt_funds } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - burnt_funds, - __codec_dest_edqy, - ); - } - Event::Rollover { ref rollover_balance } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - rollover_balance, - __codec_dest_edqy, - ); - } - Event::Deposit { ref value } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - value, - __codec_dest_edqy, - ); - } - Event::SpendApproved { - ref proposal_index, - ref amount, - ref beneficiary, - } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - proposal_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - } - Event::UpdatedInactive { - ref reactivated, - ref deactivated, - } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - reactivated, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - deactivated, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Proposed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Proposed { - proposal_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Proposed { - proposal_index: { - let val = *vals - .get(&Some("proposal_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - }) - }; - } - if value.name() == "Spending" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Spending { - budget_remaining: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("budget_remaining"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Spending { - budget_remaining: { - let val = *vals - .get(&Some("budget_remaining")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "budget_remaining".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("budget_remaining"))? - }, - }) - }; - } - if value.name() == "Awarded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::Awarded { - proposal_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - award: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("award"))? - }, - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Awarded { - proposal_index: { - let val = *vals - .get(&Some("proposal_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - award: { - let val = *vals - .get(&Some("award")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "award".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("award"))? - }, - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - }; - } - if value.name() == "Rejected" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Rejected { - proposal_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - slashed: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("slashed"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Rejected { - proposal_index: { - let val = *vals - .get(&Some("proposal_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - slashed: { - let val = *vals - .get(&Some("slashed")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "slashed".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("slashed"))? - }, - }) - }; - } - if value.name() == "Burnt" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Burnt { - burnt_funds: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("burnt_funds"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Burnt { - burnt_funds: { - let val = *vals - .get(&Some("burnt_funds")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "burnt_funds".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("burnt_funds"))? - }, - }) - }; - } - if value.name() == "Rollover" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Rollover { - rollover_balance: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("rollover_balance"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Rollover { - rollover_balance: { - let val = *vals - .get(&Some("rollover_balance")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "rollover_balance".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("rollover_balance"))? - }, - }) - }; - } - if value.name() == "Deposit" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Deposit { - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Deposit { - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - }) - }; - } - if value.name() == "SpendApproved" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::SpendApproved { - proposal_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::SpendApproved { - proposal_index: { - let val = *vals - .get(&Some("proposal_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposal_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposal_index"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - }; - } - if value.name() == "UpdatedInactive" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::UpdatedInactive { - reactivated: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reactivated"))? - }, - deactivated: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deactivated"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::UpdatedInactive { - reactivated: { - let val = *vals - .get(&Some("reactivated")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reactivated".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reactivated"))? - }, - deactivated: { - let val = *vals - .get(&Some("deactivated")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deactivated".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deactivated"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Proposed", - "Spending", - "Awarded", - "Rejected", - "Burnt", - "Rollover", - "Deposit", - "SpendApproved", - "UpdatedInactive", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Proposed { proposal_index } => { - ::subxt::ext::scale_encode::Variant { - name: "Proposed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Spending { budget_remaining } => { - ::subxt::ext::scale_encode::Variant { - name: "Spending", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("budget_remaining"), - budget_remaining - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Awarded { proposal_index, award, account } => { - ::subxt::ext::scale_encode::Variant { - name: "Awarded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("award"), - award as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Rejected { proposal_index, slashed } => { - ::subxt::ext::scale_encode::Variant { - name: "Rejected", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slashed"), - slashed as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Burnt { burnt_funds } => { - ::subxt::ext::scale_encode::Variant { - name: "Burnt", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("burnt_funds"), - burnt_funds as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Rollover { rollover_balance } => { - ::subxt::ext::scale_encode::Variant { - name: "Rollover", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("rollover_balance"), - rollover_balance - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Deposit { value } => { - ::subxt::ext::scale_encode::Variant { - name: "Deposit", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SpendApproved { - proposal_index, - amount, - beneficiary, - } => { - ::subxt::ext::scale_encode::Variant { - name: "SpendApproved", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposal_index"), - proposal_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UpdatedInactive { reactivated, deactivated } => { - ::subxt::ext::scale_encode::Variant { - name: "UpdatedInactive", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("reactivated"), - reactivated as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deactivated"), - deactivated as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::Proposed { proposal_index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Proposed", - "proposal_index", - &__self_0, - ) - } - Event::Spending { budget_remaining: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Spending", - "budget_remaining", - &__self_0, - ) - } - Event::Awarded { - proposal_index: __self_0, - award: __self_1, - account: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Awarded", - "proposal_index", - __self_0, - "award", - __self_1, - "account", - &__self_2, - ) - } - Event::Rejected { - proposal_index: __self_0, - slashed: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Rejected", - "proposal_index", - __self_0, - "slashed", - &__self_1, - ) - } - Event::Burnt { burnt_funds: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Burnt", - "burnt_funds", - &__self_0, - ) - } - Event::Rollover { rollover_balance: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Rollover", - "rollover_balance", - &__self_0, - ) - } - Event::Deposit { value: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Deposit", - "value", - &__self_0, - ) - } - Event::SpendApproved { - proposal_index: __self_0, - amount: __self_1, - beneficiary: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SpendApproved", - "proposal_index", - __self_0, - "amount", - __self_1, - "beneficiary", - &__self_2, - ) - } - Event::UpdatedInactive { - reactivated: __self_0, - deactivated: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "UpdatedInactive", - "reactivated", - __self_0, - "deactivated", - &__self_1, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Proposal<_0, _1> { - pub proposer: _0, - pub value: _1, - pub beneficiary: _0, - pub bond: _1, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for Proposal<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Proposal::<_0, _1> { - proposer: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proposal::proposer`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proposal::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proposal::beneficiary`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - bond: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Proposal::bond`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for Proposal<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proposer), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.value), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.beneficiary), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.bond), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.proposer, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.value, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.beneficiary, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.bond, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike for Proposal<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for Proposal<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Proposal<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Proposal { - proposer: { - let val = *vals - .get(&Some("proposer")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposer".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proposer"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - bond: { - let val = *vals - .get(&Some("bond")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bond".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bond"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(Proposal { - proposer: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proposer"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - bond: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bond"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for Proposal<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for Proposal<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Proposal { proposer, value, beneficiary, bond } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposer"), - proposer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bond"), - bond as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for Proposal<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Proposal { proposer, value, beneficiary, bond } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("proposer"), - proposer as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("bond"), - bond as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for Proposal<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Proposal", - "proposer", - &self.proposer, - "value", - &self.value, - "beneficiary", - &self.beneficiary, - "bond", - &&self.bond, - ) - } - } - } - pub mod pallet_utility { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - batch { - calls: ::std::vec::Vec< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - #[codec(index = 1)] - as_derivative { - index: ::core::primitive::u16, - call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - #[codec(index = 2)] - batch_all { - calls: ::std::vec::Vec< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - #[codec(index = 3)] - dispatch_as { - as_origin: ::std::boxed::Box< - runtime_types::polkadot_runtime::OriginCaller, - >, - call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - #[codec(index = 4)] - force_batch { - calls: ::std::vec::Vec< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - #[codec(index = 5)] - with_weight { - call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - weight: runtime_types::sp_weights::weight_v2::Weight, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::batch { - calls: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::batch::calls`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::as_derivative { - index: { - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::as_derivative::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::as_derivative::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::batch_all { - calls: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::batch_all::calls`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::dispatch_as { - as_origin: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::OriginCaller, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::dispatch_as::as_origin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::dispatch_as::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_batch { - calls: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_batch::calls`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::with_weight { - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::with_weight::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - weight: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::with_weight::weight`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::batch { ref calls } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(calls), - ) - } - Call::as_derivative { ref index, ref call } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call), - ) - } - Call::batch_all { ref calls } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(calls), - ) - } - Call::dispatch_as { ref as_origin, ref call } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(as_origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call), - ) - } - Call::force_batch { ref calls } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(calls), - ) - } - Call::with_weight { ref call, ref weight } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(weight), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::batch { ref calls } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - calls, - __codec_dest_edqy, - ); - } - Call::as_derivative { ref index, ref call } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call, - __codec_dest_edqy, - ); - } - Call::batch_all { ref calls } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - calls, - __codec_dest_edqy, - ); - } - Call::dispatch_as { ref as_origin, ref call } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - as_origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call, - __codec_dest_edqy, - ); - } - Call::force_batch { ref calls } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - calls, - __codec_dest_edqy, - ); - } - Call::with_weight { ref call, ref weight } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - call, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - weight, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "batch" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::batch { - calls: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("calls"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::batch { - calls: { - let val = *vals - .get(&Some("calls")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "calls".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("calls"))? - }, - }) - }; - } - if value.name() == "as_derivative" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::as_derivative { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::as_derivative { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - }; - } - if value.name() == "batch_all" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::batch_all { - calls: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("calls"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::batch_all { - calls: { - let val = *vals - .get(&Some("calls")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "calls".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("calls"))? - }, - }) - }; - } - if value.name() == "dispatch_as" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::dispatch_as { - as_origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("as_origin"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::dispatch_as { - as_origin: { - let val = *vals - .get(&Some("as_origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "as_origin".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("as_origin"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - }; - } - if value.name() == "force_batch" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::force_batch { - calls: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("calls"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_batch { - calls: { - let val = *vals - .get(&Some("calls")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "calls".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("calls"))? - }, - }) - }; - } - if value.name() == "with_weight" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::with_weight { - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("weight"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::with_weight { - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - weight: { - let val = *vals - .get(&Some("weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "weight".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("weight"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "batch", - "as_derivative", - "batch_all", - "dispatch_as", - "force_batch", - "with_weight", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::batch { calls } => { - ::subxt::ext::scale_encode::Variant { - name: "batch", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("calls"), - calls as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::as_derivative { index, call } => { - ::subxt::ext::scale_encode::Variant { - name: "as_derivative", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::batch_all { calls } => { - ::subxt::ext::scale_encode::Variant { - name: "batch_all", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("calls"), - calls as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::dispatch_as { as_origin, call } => { - ::subxt::ext::scale_encode::Variant { - name: "dispatch_as", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("as_origin"), - as_origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_batch { calls } => { - ::subxt::ext::scale_encode::Variant { - name: "force_batch", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("calls"), - calls as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::with_weight { call, weight } => { - ::subxt::ext::scale_encode::Variant { - name: "with_weight", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight"), - weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::batch { calls: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "batch", - "calls", - &__self_0, - ) - } - Call::as_derivative { index: __self_0, call: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "as_derivative", - "index", - __self_0, - "call", - &__self_1, - ) - } - Call::batch_all { calls: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "batch_all", - "calls", - &__self_0, - ) - } - Call::dispatch_as { - as_origin: __self_0, - call: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "dispatch_as", - "as_origin", - __self_0, - "call", - &__self_1, - ) - } - Call::force_batch { calls: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "force_batch", - "calls", - &__self_0, - ) - } - Call::with_weight { call: __self_0, weight: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "with_weight", - "call", - __self_0, - "weight", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - TooManyCalls, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyCalls) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::TooManyCalls => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::TooManyCalls => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "TooManyCalls" { - return Ok(Error::TooManyCalls); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["TooManyCalls"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::TooManyCalls => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyCalls", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "TooManyCalls") - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - BatchInterrupted { - index: ::core::primitive::u32, - error: runtime_types::sp_runtime::DispatchError, - }, - #[codec(index = 1)] - BatchCompleted, - #[codec(index = 2)] - BatchCompletedWithErrors, - #[codec(index = 3)] - ItemCompleted, - #[codec(index = 4)] - ItemFailed { error: runtime_types::sp_runtime::DispatchError }, - #[codec(index = 5)] - DispatchedAs { - result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::BatchInterrupted { - index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BatchInterrupted::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - error: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BatchInterrupted::error`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::BatchCompleted) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::BatchCompletedWithErrors) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ItemCompleted) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ItemFailed { - error: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ItemFailed::error`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::DispatchedAs { - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::DispatchedAs::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::BatchInterrupted { ref index, ref error } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(error), - ) - } - Event::BatchCompleted => 0_usize, - Event::BatchCompletedWithErrors => 0_usize, - Event::ItemCompleted => 0_usize, - Event::ItemFailed { ref error } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(error), - ) - } - Event::DispatchedAs { ref result } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(result), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::BatchInterrupted { ref index, ref error } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - error, - __codec_dest_edqy, - ); - } - Event::BatchCompleted => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Event::BatchCompletedWithErrors => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Event::ItemCompleted => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Event::ItemFailed { ref error } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - error, - __codec_dest_edqy, - ); - } - Event::DispatchedAs { ref result } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - result, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "BatchInterrupted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::BatchInterrupted { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - error: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("error"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::BatchInterrupted { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - error: { - let val = *vals - .get(&Some("error")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "error".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("error"))? - }, - }) - }; - } - if value.name() == "BatchCompleted" { - return Ok(Event::BatchCompleted); - } - if value.name() == "BatchCompletedWithErrors" { - return Ok(Event::BatchCompletedWithErrors); - } - if value.name() == "ItemCompleted" { - return Ok(Event::ItemCompleted); - } - if value.name() == "ItemFailed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::ItemFailed { - error: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("error"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::ItemFailed { - error: { - let val = *vals - .get(&Some("error")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "error".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("error"))? - }, - }) - }; - } - if value.name() == "DispatchedAs" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::DispatchedAs { - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::DispatchedAs { - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "BatchInterrupted", - "BatchCompleted", - "BatchCompletedWithErrors", - "ItemCompleted", - "ItemFailed", - "DispatchedAs", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::BatchInterrupted { index, error } => { - ::subxt::ext::scale_encode::Variant { - name: "BatchInterrupted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("error"), - error as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BatchCompleted => { - ::subxt::ext::scale_encode::Variant { - name: "BatchCompleted", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BatchCompletedWithErrors => { - ::subxt::ext::scale_encode::Variant { - name: "BatchCompletedWithErrors", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ItemCompleted => { - ::subxt::ext::scale_encode::Variant { - name: "ItemCompleted", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ItemFailed { error } => { - ::subxt::ext::scale_encode::Variant { - name: "ItemFailed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("error"), - error as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DispatchedAs { result } => { - ::subxt::ext::scale_encode::Variant { - name: "DispatchedAs", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::BatchInterrupted { - index: __self_0, - error: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "BatchInterrupted", - "index", - __self_0, - "error", - &__self_1, - ) - } - Event::BatchCompleted => { - ::core::fmt::Formatter::write_str(f, "BatchCompleted") - } - Event::BatchCompletedWithErrors => { - ::core::fmt::Formatter::write_str( - f, - "BatchCompletedWithErrors", - ) - } - Event::ItemCompleted => { - ::core::fmt::Formatter::write_str(f, "ItemCompleted") - } - Event::ItemFailed { error: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "ItemFailed", - "error", - &__self_0, - ) - } - Event::DispatchedAs { result: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "DispatchedAs", - "result", - &__self_0, - ) - } - } - } - } - } - } - pub mod pallet_vesting { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - vest, - #[codec(index = 1)] - vest_other { - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - }, - #[codec(index = 2)] - 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)] - 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)] - merge_schedules { - schedule1_index: ::core::primitive::u32, - schedule2_index: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::vest) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::vest_other { - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::vest_other::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::vested_transfer { - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::vested_transfer::target`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - schedule: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::vested_transfer::schedule`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_vested_transfer { - source: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_vested_transfer::source`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - target: { - let __codec_res_edqy = <::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_vested_transfer::target`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - schedule: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_vested_transfer::schedule`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::merge_schedules { - schedule1_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::merge_schedules::schedule1_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - schedule2_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::merge_schedules::schedule2_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::vest => 0_usize, - Call::vest_other { ref target } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(target), - ) - } - Call::vested_transfer { ref target, ref schedule } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(target), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(schedule), - ) - } - Call::force_vested_transfer { - ref source, - ref target, - ref schedule, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(source), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(target), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(schedule), - ) - } - Call::merge_schedules { - ref schedule1_index, - ref schedule2_index, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(schedule1_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(schedule2_index), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::vest => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Call::vest_other { ref target } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - target, - __codec_dest_edqy, - ); - } - Call::vested_transfer { ref target, ref schedule } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - target, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - schedule, - __codec_dest_edqy, - ); - } - Call::force_vested_transfer { - ref source, - ref target, - ref schedule, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - source, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - target, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - schedule, - __codec_dest_edqy, - ); - } - Call::merge_schedules { - ref schedule1_index, - ref schedule2_index, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - schedule1_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - schedule2_index, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "vest" { - return Ok(Call::vest); - } - if value.name() == "vest_other" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::vest_other { - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::vest_other { - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - }; - } - if value.name() == "vested_transfer" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::vested_transfer { - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - schedule: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("schedule"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::vested_transfer { - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - schedule: { - let val = *vals - .get(&Some("schedule")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "schedule".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("schedule"))? - }, - }) - }; - } - if value.name() == "force_vested_transfer" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::force_vested_transfer { - source: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("source"))? - }, - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - schedule: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("schedule"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_vested_transfer { - source: { - let val = *vals - .get(&Some("source")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "source".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("source"))? - }, - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - schedule: { - let val = *vals - .get(&Some("schedule")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "schedule".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("schedule"))? - }, - }) - }; - } - if value.name() == "merge_schedules" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::merge_schedules { - schedule1_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("schedule1_index"))? - }, - schedule2_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("schedule2_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::merge_schedules { - schedule1_index: { - let val = *vals - .get(&Some("schedule1_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "schedule1_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("schedule1_index"))? - }, - schedule2_index: { - let val = *vals - .get(&Some("schedule2_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "schedule2_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("schedule2_index"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "vest", - "vest_other", - "vested_transfer", - "force_vested_transfer", - "merge_schedules", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::vest => { - ::subxt::ext::scale_encode::Variant { - name: "vest", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::vest_other { target } => { - ::subxt::ext::scale_encode::Variant { - name: "vest_other", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::vested_transfer { target, schedule } => { - ::subxt::ext::scale_encode::Variant { - name: "vested_transfer", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("schedule"), - schedule as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_vested_transfer { source, target, schedule } => { - ::subxt::ext::scale_encode::Variant { - name: "force_vested_transfer", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("source"), - source as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("schedule"), - schedule as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::merge_schedules { - schedule1_index, - schedule2_index, - } => { - ::subxt::ext::scale_encode::Variant { - name: "merge_schedules", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("schedule1_index"), - schedule1_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("schedule2_index"), - schedule2_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::vest => ::core::fmt::Formatter::write_str(f, "vest"), - Call::vest_other { target: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "vest_other", - "target", - &__self_0, - ) - } - Call::vested_transfer { - target: __self_0, - schedule: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "vested_transfer", - "target", - __self_0, - "schedule", - &__self_1, - ) - } - Call::force_vested_transfer { - source: __self_0, - target: __self_1, - schedule: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "force_vested_transfer", - "source", - __self_0, - "target", - __self_1, - "schedule", - &__self_2, - ) - } - Call::merge_schedules { - schedule1_index: __self_0, - schedule2_index: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "merge_schedules", - "schedule1_index", - __self_0, - "schedule2_index", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - NotVesting, - #[codec(index = 1)] - AtMaxVestingSchedules, - #[codec(index = 2)] - AmountLow, - #[codec(index = 3)] - ScheduleIndexOutOfBounds, - #[codec(index = 4)] - InvalidScheduleParams, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotVesting) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AtMaxVestingSchedules) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AmountLow) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ScheduleIndexOutOfBounds) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidScheduleParams) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::NotVesting => 0_usize, - Error::AtMaxVestingSchedules => 0_usize, - Error::AmountLow => 0_usize, - Error::ScheduleIndexOutOfBounds => 0_usize, - Error::InvalidScheduleParams => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::NotVesting => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::AtMaxVestingSchedules => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::AmountLow => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::ScheduleIndexOutOfBounds => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::InvalidScheduleParams => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NotVesting" { - return Ok(Error::NotVesting); - } - if value.name() == "AtMaxVestingSchedules" { - return Ok(Error::AtMaxVestingSchedules); - } - if value.name() == "AmountLow" { - return Ok(Error::AmountLow); - } - if value.name() == "ScheduleIndexOutOfBounds" { - return Ok(Error::ScheduleIndexOutOfBounds); - } - if value.name() == "InvalidScheduleParams" { - return Ok(Error::InvalidScheduleParams); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "NotVesting", - "AtMaxVestingSchedules", - "AmountLow", - "ScheduleIndexOutOfBounds", - "InvalidScheduleParams", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NotVesting => { - ::subxt::ext::scale_encode::Variant { - name: "NotVesting", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AtMaxVestingSchedules => { - ::subxt::ext::scale_encode::Variant { - name: "AtMaxVestingSchedules", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AmountLow => { - ::subxt::ext::scale_encode::Variant { - name: "AmountLow", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ScheduleIndexOutOfBounds => { - ::subxt::ext::scale_encode::Variant { - name: "ScheduleIndexOutOfBounds", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidScheduleParams => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidScheduleParams", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::NotVesting => "NotVesting", - Error::AtMaxVestingSchedules => "AtMaxVestingSchedules", - Error::AmountLow => "AmountLow", - Error::ScheduleIndexOutOfBounds => { - "ScheduleIndexOutOfBounds" - } - Error::InvalidScheduleParams => "InvalidScheduleParams", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - VestingUpdated { - account: ::subxt::utils::AccountId32, - unvested: ::core::primitive::u128, - }, - #[codec(index = 1)] - VestingCompleted { account: ::subxt::utils::AccountId32 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::VestingUpdated { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::VestingUpdated::account`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - unvested: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::VestingUpdated::unvested`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::VestingCompleted { - account: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::VestingCompleted::account`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::VestingUpdated { ref account, ref unvested } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(account), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(unvested), - ) - } - Event::VestingCompleted { ref account } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(account), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::VestingUpdated { ref account, ref unvested } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - account, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - unvested, - __codec_dest_edqy, - ); - } - Event::VestingCompleted { ref account } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - account, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "VestingUpdated" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::VestingUpdated { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - unvested: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("unvested"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::VestingUpdated { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - unvested: { - let val = *vals - .get(&Some("unvested")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "unvested".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("unvested"))? - }, - }) - }; - } - if value.name() == "VestingCompleted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::VestingCompleted { - account: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::VestingCompleted { - account: { - let val = *vals - .get(&Some("account")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "account".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("account"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "VestingUpdated", - "VestingCompleted", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::VestingUpdated { account, unvested } => { - ::subxt::ext::scale_encode::Variant { - name: "VestingUpdated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("unvested"), - unvested as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::VestingCompleted { account } => { - ::subxt::ext::scale_encode::Variant { - name: "VestingCompleted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("account"), - account as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::VestingUpdated { - account: __self_0, - unvested: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "VestingUpdated", - "account", - __self_0, - "unvested", - &__self_1, - ) - } - Event::VestingCompleted { account: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "VestingCompleted", - "account", - &__self_0, - ) - } - } - } - } - } - pub mod vesting_info { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VestingInfo<_0, _1> { - pub locked: _0, - pub per_block: _0, - pub starting_block: _1, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for VestingInfo<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(VestingInfo::<_0, _1> { - locked: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VestingInfo::locked`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - per_block: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VestingInfo::per_block`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - starting_block: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VestingInfo::starting_block`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for VestingInfo<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.locked), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.per_block), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.starting_block), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.locked, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.per_block, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.starting_block, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for VestingInfo<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>( - ::core::marker::PhantomData<(_0, _1)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for VestingInfo<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VestingInfo<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(VestingInfo { - locked: { - let val = *vals - .get(&Some("locked")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "locked".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("locked"))? - }, - per_block: { - let val = *vals - .get(&Some("per_block")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "per_block".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("per_block"))? - }, - starting_block: { - let val = *vals - .get(&Some("starting_block")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "starting_block".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("starting_block"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(VestingInfo { - locked: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("locked"))? - }, - per_block: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("per_block"))? - }, - starting_block: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("starting_block"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for VestingInfo<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for VestingInfo<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VestingInfo { locked, per_block, starting_block } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("locked"), - locked as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("per_block"), - per_block as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("starting_block"), - starting_block - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for VestingInfo<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VestingInfo { locked, per_block, starting_block } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("locked"), - locked as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("per_block"), - per_block as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("starting_block"), - starting_block - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - > ::core::fmt::Debug for VestingInfo<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "VestingInfo", - "locked", - &self.locked, - "per_block", - &self.per_block, - "starting_block", - &&self.starting_block, - ) - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Releases { - #[codec(index = 0)] - V0, - #[codec(index = 1)] - V1, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Releases { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Releases`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Releases::V0) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Releases::V1) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Releases`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Releases { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Releases::V0 => 0_usize, - Releases::V1 => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Releases::V0 => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Releases::V1 => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Releases {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Releases { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Releases; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "V0" { - return Ok(Releases::V0); - } - if value.name() == "V1" { - return Ok(Releases::V1); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["V0", "V1"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Releases { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::V0 => { - ::subxt::ext::scale_encode::Variant { - name: "V0", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::V1 => { - ::subxt::ext::scale_encode::Variant { - name: "V1", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Releases { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Releases::V0 => "V0", - Releases::V1 => "V1", - }, - ) - } - } - } - pub mod pallet_whitelist { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - 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::polkadot_runtime::RuntimeCall, - >, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::whitelist_call { - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::whitelist_call::call_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::remove_whitelisted_call { - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::remove_whitelisted_call::call_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::dispatch_whitelisted_call { - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::dispatch_whitelisted_call::call_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_encoded_len: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::dispatch_whitelisted_call::call_encoded_len`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call_weight_witness: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::dispatch_whitelisted_call::call_weight_witness`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::dispatch_whitelisted_call_with_preimage { - call: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::dispatch_whitelisted_call_with_preimage::call`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::whitelist_call { ref call_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_hash), - ) - } - Call::remove_whitelisted_call { ref call_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_hash), - ) - } - Call::dispatch_whitelisted_call { - ref call_hash, - ref call_encoded_len, - ref call_weight_witness, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_encoded_len), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_weight_witness), - ) - } - Call::dispatch_whitelisted_call_with_preimage { - ref call, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::whitelist_call { ref call_hash } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - call_hash, - __codec_dest_edqy, - ); - } - Call::remove_whitelisted_call { ref call_hash } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - call_hash, - __codec_dest_edqy, - ); - } - Call::dispatch_whitelisted_call { - ref call_hash, - ref call_encoded_len, - ref call_weight_witness, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - call_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call_encoded_len, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call_weight_witness, - __codec_dest_edqy, - ); - } - Call::dispatch_whitelisted_call_with_preimage { - ref call, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - call, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "whitelist_call" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::whitelist_call { - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::whitelist_call { - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - }; - } - if value.name() == "remove_whitelisted_call" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::remove_whitelisted_call { - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::remove_whitelisted_call { - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - }; - } - if value.name() == "dispatch_whitelisted_call" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::dispatch_whitelisted_call { - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - call_encoded_len: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("call_encoded_len"))? - }, - call_weight_witness: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("call_weight_witness"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::dispatch_whitelisted_call { - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - call_encoded_len: { - let val = *vals - .get(&Some("call_encoded_len")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_encoded_len".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("call_encoded_len"))? - }, - call_weight_witness: { - let val = *vals - .get(&Some("call_weight_witness")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_weight_witness".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("call_weight_witness"))? - }, - }) - }; - } - if value.name() == "dispatch_whitelisted_call_with_preimage" - { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::dispatch_whitelisted_call_with_preimage { - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::dispatch_whitelisted_call_with_preimage { - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "whitelist_call", - "remove_whitelisted_call", - "dispatch_whitelisted_call", - "dispatch_whitelisted_call_with_preimage", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::whitelist_call { call_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "whitelist_call", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::remove_whitelisted_call { call_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "remove_whitelisted_call", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::dispatch_whitelisted_call { - call_hash, - call_encoded_len, - call_weight_witness, - } => { - ::subxt::ext::scale_encode::Variant { - name: "dispatch_whitelisted_call", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_encoded_len"), - call_encoded_len - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call_weight_witness"), - call_weight_witness - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::dispatch_whitelisted_call_with_preimage { call } => { - ::subxt::ext::scale_encode::Variant { - name: "dispatch_whitelisted_call_with_preimage", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::whitelist_call { call_hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "whitelist_call", - "call_hash", - &__self_0, - ) - } - Call::remove_whitelisted_call { call_hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "remove_whitelisted_call", - "call_hash", - &__self_0, - ) - } - Call::dispatch_whitelisted_call { - call_hash: __self_0, - call_encoded_len: __self_1, - call_weight_witness: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "dispatch_whitelisted_call", - "call_hash", - __self_0, - "call_encoded_len", - __self_1, - "call_weight_witness", - &__self_2, - ) - } - Call::dispatch_whitelisted_call_with_preimage { - call: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "dispatch_whitelisted_call_with_preimage", - "call", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - UnavailablePreImage, - #[codec(index = 1)] - UndecodableCall, - #[codec(index = 2)] - InvalidCallWeightWitness, - #[codec(index = 3)] - CallIsNotWhitelisted, - #[codec(index = 4)] - CallAlreadyWhitelisted, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UnavailablePreImage) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UndecodableCall) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidCallWeightWitness) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CallIsNotWhitelisted) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CallAlreadyWhitelisted) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::UnavailablePreImage => 0_usize, - Error::UndecodableCall => 0_usize, - Error::InvalidCallWeightWitness => 0_usize, - Error::CallIsNotWhitelisted => 0_usize, - Error::CallAlreadyWhitelisted => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::UnavailablePreImage => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::UndecodableCall => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::InvalidCallWeightWitness => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::CallIsNotWhitelisted => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::CallAlreadyWhitelisted => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "UnavailablePreImage" { - return Ok(Error::UnavailablePreImage); - } - if value.name() == "UndecodableCall" { - return Ok(Error::UndecodableCall); - } - if value.name() == "InvalidCallWeightWitness" { - return Ok(Error::InvalidCallWeightWitness); - } - if value.name() == "CallIsNotWhitelisted" { - return Ok(Error::CallIsNotWhitelisted); - } - if value.name() == "CallAlreadyWhitelisted" { - return Ok(Error::CallAlreadyWhitelisted); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "UnavailablePreImage", - "UndecodableCall", - "InvalidCallWeightWitness", - "CallIsNotWhitelisted", - "CallAlreadyWhitelisted", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::UnavailablePreImage => { - ::subxt::ext::scale_encode::Variant { - name: "UnavailablePreImage", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UndecodableCall => { - ::subxt::ext::scale_encode::Variant { - name: "UndecodableCall", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidCallWeightWitness => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidCallWeightWitness", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CallIsNotWhitelisted => { - ::subxt::ext::scale_encode::Variant { - name: "CallIsNotWhitelisted", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CallAlreadyWhitelisted => { - ::subxt::ext::scale_encode::Variant { - name: "CallAlreadyWhitelisted", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::UnavailablePreImage => "UnavailablePreImage", - Error::UndecodableCall => "UndecodableCall", - Error::InvalidCallWeightWitness => { - "InvalidCallWeightWitness" - } - Error::CallIsNotWhitelisted => "CallIsNotWhitelisted", - Error::CallAlreadyWhitelisted => "CallAlreadyWhitelisted", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - 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, - >, - >, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::CallWhitelisted { - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::CallWhitelisted::call_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::WhitelistedCallRemoved { - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::WhitelistedCallRemoved::call_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::WhitelistedCallDispatched { - call_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::WhitelistedCallDispatched::call_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - runtime_types::frame_support::dispatch::PostDispatchInfo, - runtime_types::sp_runtime::DispatchErrorWithPostInfo< - runtime_types::frame_support::dispatch::PostDispatchInfo, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::WhitelistedCallDispatched::result`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::CallWhitelisted { ref call_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_hash), - ) - } - Event::WhitelistedCallRemoved { ref call_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_hash), - ) - } - Event::WhitelistedCallDispatched { - ref call_hash, - ref result, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(result), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::CallWhitelisted { ref call_hash } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - call_hash, - __codec_dest_edqy, - ); - } - Event::WhitelistedCallRemoved { ref call_hash } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - call_hash, - __codec_dest_edqy, - ); - } - Event::WhitelistedCallDispatched { - ref call_hash, - ref result, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - call_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - result, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "CallWhitelisted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::CallWhitelisted { - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::CallWhitelisted { - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - }; - } - if value.name() == "WhitelistedCallRemoved" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::WhitelistedCallRemoved { - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::WhitelistedCallRemoved { - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - }) - }; - } - if value.name() == "WhitelistedCallDispatched" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::WhitelistedCallDispatched { - call_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::WhitelistedCallDispatched { - call_hash: { - let val = *vals - .get(&Some("call_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call_hash"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "CallWhitelisted", - "WhitelistedCallRemoved", - "WhitelistedCallDispatched", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::CallWhitelisted { call_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "CallWhitelisted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WhitelistedCallRemoved { call_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "WhitelistedCallRemoved", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WhitelistedCallDispatched { call_hash, result } => { - ::subxt::ext::scale_encode::Variant { - name: "WhitelistedCallDispatched", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("call_hash"), - call_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::CallWhitelisted { call_hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "CallWhitelisted", - "call_hash", - &__self_0, - ) - } - Event::WhitelistedCallRemoved { call_hash: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "WhitelistedCallRemoved", - "call_hash", - &__self_0, - ) - } - Event::WhitelistedCallDispatched { - call_hash: __self_0, - result: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "WhitelistedCallDispatched", - "call_hash", - __self_0, - "result", - &__self_1, - ) - } - } - } - } - } - } - pub mod pallet_xcm { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - send { - dest: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - message: ::std::boxed::Box, - }, - #[codec(index = 1)] - teleport_assets { - dest: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - beneficiary: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - assets: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiAssets, - >, - fee_asset_item: ::core::primitive::u32, - }, - #[codec(index = 2)] - reserve_transfer_assets { - dest: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - beneficiary: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - assets: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiAssets, - >, - fee_asset_item: ::core::primitive::u32, - }, - #[codec(index = 3)] - execute { - message: ::std::boxed::Box< - runtime_types::xcm::VersionedXcm2, - >, - max_weight: runtime_types::sp_weights::weight_v2::Weight, - }, - #[codec(index = 4)] - force_xcm_version { - location: ::std::boxed::Box< - runtime_types::xcm::v3::multilocation::MultiLocation, - >, - xcm_version: ::core::primitive::u32, - }, - #[codec(index = 5)] - force_default_xcm_version { - maybe_xcm_version: ::core::option::Option< - ::core::primitive::u32, - >, - }, - #[codec(index = 6)] - force_subscribe_version_notify { - location: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - }, - #[codec(index = 7)] - force_unsubscribe_version_notify { - location: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - }, - #[codec(index = 8)] - limited_reserve_transfer_assets { - dest: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - beneficiary: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - assets: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiAssets, - >, - fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v3::WeightLimit, - }, - #[codec(index = 9)] - limited_teleport_assets { - dest: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - beneficiary: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - >, - assets: ::std::boxed::Box< - runtime_types::xcm::VersionedMultiAssets, - >, - fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v3::WeightLimit, - }, - #[codec(index = 10)] - force_suspension { suspended: ::core::primitive::bool }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::send { - dest: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::send::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - message: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedXcm, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::send::message`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::teleport_assets { - dest: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::teleport_assets::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::teleport_assets::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - assets: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiAssets, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::teleport_assets::assets`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fee_asset_item: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::teleport_assets::fee_asset_item`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::reserve_transfer_assets { - dest: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::reserve_transfer_assets::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::reserve_transfer_assets::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - assets: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiAssets, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::reserve_transfer_assets::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fee_asset_item: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::reserve_transfer_assets::fee_asset_item`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::execute { - message: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedXcm2, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::execute::message`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_weight: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::execute::max_weight`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_xcm_version { - location: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::v3::multilocation::MultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_xcm_version::location`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm_version: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_xcm_version::xcm_version`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_default_xcm_version { - maybe_xcm_version: { - let __codec_res_edqy = <::core::option::Option< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_default_xcm_version::maybe_xcm_version`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_subscribe_version_notify { - location: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_subscribe_version_notify::location`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_unsubscribe_version_notify { - location: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_unsubscribe_version_notify::location`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::limited_reserve_transfer_assets { - dest: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::limited_reserve_transfer_assets::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::limited_reserve_transfer_assets::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - assets: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiAssets, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::limited_reserve_transfer_assets::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fee_asset_item: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::limited_reserve_transfer_assets::fee_asset_item`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - weight_limit: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::limited_reserve_transfer_assets::weight_limit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::limited_teleport_assets { - dest: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::limited_teleport_assets::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::limited_teleport_assets::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - assets: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::xcm::VersionedMultiAssets, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::limited_teleport_assets::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fee_asset_item: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::limited_teleport_assets::fee_asset_item`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - weight_limit: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::limited_teleport_assets::weight_limit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_suspension { - suspended: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_suspension::suspended`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::send { ref dest, ref message } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(message), - ) - } - Call::teleport_assets { - ref dest, - ref beneficiary, - ref assets, - ref fee_asset_item, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(fee_asset_item), - ) - } - Call::reserve_transfer_assets { - ref dest, - ref beneficiary, - ref assets, - ref fee_asset_item, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(fee_asset_item), - ) - } - Call::execute { ref message, ref max_weight } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(message), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(max_weight), - ) - } - Call::force_xcm_version { - ref location, - ref xcm_version, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(location), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(xcm_version), - ) - } - Call::force_default_xcm_version { - ref maybe_xcm_version, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maybe_xcm_version), - ) - } - Call::force_subscribe_version_notify { ref location } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(location), - ) - } - Call::force_unsubscribe_version_notify { ref location } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(location), - ) - } - Call::limited_reserve_transfer_assets { - ref dest, - ref beneficiary, - ref assets, - ref fee_asset_item, - ref weight_limit, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(fee_asset_item), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(weight_limit), - ) - } - Call::limited_teleport_assets { - ref dest, - ref beneficiary, - ref assets, - ref fee_asset_item, - ref weight_limit, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(fee_asset_item), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(weight_limit), - ) - } - Call::force_suspension { ref suspended } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(suspended), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::send { ref dest, ref message } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - message, - __codec_dest_edqy, - ); - } - Call::teleport_assets { - ref dest, - ref beneficiary, - ref assets, - ref fee_asset_item, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - fee_asset_item, - __codec_dest_edqy, - ); - } - Call::reserve_transfer_assets { - ref dest, - ref beneficiary, - ref assets, - ref fee_asset_item, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - fee_asset_item, - __codec_dest_edqy, - ); - } - Call::execute { ref message, ref max_weight } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - message, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - max_weight, - __codec_dest_edqy, - ); - } - Call::force_xcm_version { - ref location, - ref xcm_version, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - location, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm_version, - __codec_dest_edqy, - ); - } - Call::force_default_xcm_version { - ref maybe_xcm_version, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - maybe_xcm_version, - __codec_dest_edqy, - ); - } - Call::force_subscribe_version_notify { ref location } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - location, - __codec_dest_edqy, - ); - } - Call::force_unsubscribe_version_notify { ref location } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - location, - __codec_dest_edqy, - ); - } - Call::limited_reserve_transfer_assets { - ref dest, - ref beneficiary, - ref assets, - ref fee_asset_item, - ref weight_limit, - } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - fee_asset_item, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - weight_limit, - __codec_dest_edqy, - ); - } - Call::limited_teleport_assets { - ref dest, - ref beneficiary, - ref assets, - ref fee_asset_item, - ref weight_limit, - } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - fee_asset_item, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - weight_limit, - __codec_dest_edqy, - ); - } - Call::force_suspension { ref suspended } => { - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - suspended, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "send" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::send { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - message: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("message"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::send { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - message: { - let val = *vals - .get(&Some("message")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "message".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("message"))? - }, - }) - }; - } - if value.name() == "teleport_assets" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Call::teleport_assets { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - fee_asset_item: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("fee_asset_item"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::teleport_assets { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - fee_asset_item: { - let val = *vals - .get(&Some("fee_asset_item")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fee_asset_item".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("fee_asset_item"))? - }, - }) - }; - } - if value.name() == "reserve_transfer_assets" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Call::reserve_transfer_assets { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - fee_asset_item: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("fee_asset_item"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::reserve_transfer_assets { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - fee_asset_item: { - let val = *vals - .get(&Some("fee_asset_item")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fee_asset_item".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("fee_asset_item"))? - }, - }) - }; - } - if value.name() == "execute" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::execute { - message: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("message"))? - }, - max_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::execute { - message: { - let val = *vals - .get(&Some("message")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "message".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("message"))? - }, - max_weight: { - let val = *vals - .get(&Some("max_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_weight".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - }; - } - if value.name() == "force_xcm_version" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::force_xcm_version { - location: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("location"))? - }, - xcm_version: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm_version"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_xcm_version { - location: { - let val = *vals - .get(&Some("location")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "location".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("location"))? - }, - xcm_version: { - let val = *vals - .get(&Some("xcm_version")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm_version".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm_version"))? - }, - }) - }; - } - if value.name() == "force_default_xcm_version" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::force_default_xcm_version { - maybe_xcm_version: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_xcm_version"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_default_xcm_version { - maybe_xcm_version: { - let val = *vals - .get(&Some("maybe_xcm_version")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_xcm_version".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_xcm_version"))? - }, - }) - }; - } - if value.name() == "force_subscribe_version_notify" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::force_subscribe_version_notify { - location: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("location"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_subscribe_version_notify { - location: { - let val = *vals - .get(&Some("location")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "location".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("location"))? - }, - }) - }; - } - if value.name() == "force_unsubscribe_version_notify" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::force_unsubscribe_version_notify { - location: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("location"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_unsubscribe_version_notify { - location: { - let val = *vals - .get(&Some("location")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "location".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("location"))? - }, - }) - }; - } - if value.name() == "limited_reserve_transfer_assets" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Call::limited_reserve_transfer_assets { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - fee_asset_item: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("fee_asset_item"))? - }, - weight_limit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::limited_reserve_transfer_assets { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - fee_asset_item: { - let val = *vals - .get(&Some("fee_asset_item")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fee_asset_item".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("fee_asset_item"))? - }, - weight_limit: { - let val = *vals - .get(&Some("weight_limit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "weight_limit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - }; - } - if value.name() == "limited_teleport_assets" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Call::limited_teleport_assets { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - fee_asset_item: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("fee_asset_item"))? - }, - weight_limit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::limited_teleport_assets { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - fee_asset_item: { - let val = *vals - .get(&Some("fee_asset_item")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fee_asset_item".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("fee_asset_item"))? - }, - weight_limit: { - let val = *vals - .get(&Some("weight_limit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "weight_limit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - }; - } - if value.name() == "force_suspension" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::force_suspension { - suspended: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("suspended"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_suspension { - suspended: { - let val = *vals - .get(&Some("suspended")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "suspended".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("suspended"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "send", - "teleport_assets", - "reserve_transfer_assets", - "execute", - "force_xcm_version", - "force_default_xcm_version", - "force_subscribe_version_notify", - "force_unsubscribe_version_notify", - "limited_reserve_transfer_assets", - "limited_teleport_assets", - "force_suspension", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::send { dest, message } => { - ::subxt::ext::scale_encode::Variant { - name: "send", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("message"), - message as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::teleport_assets { - dest, - beneficiary, - assets, - fee_asset_item, - } => { - ::subxt::ext::scale_encode::Variant { - name: "teleport_assets", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee_asset_item"), - fee_asset_item - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::reserve_transfer_assets { - dest, - beneficiary, - assets, - fee_asset_item, - } => { - ::subxt::ext::scale_encode::Variant { - name: "reserve_transfer_assets", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee_asset_item"), - fee_asset_item - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::execute { message, max_weight } => { - ::subxt::ext::scale_encode::Variant { - name: "execute", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("message"), - message as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_weight"), - max_weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_xcm_version { location, xcm_version } => { - ::subxt::ext::scale_encode::Variant { - name: "force_xcm_version", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("location"), - location as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm_version"), - xcm_version as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_default_xcm_version { maybe_xcm_version } => { - ::subxt::ext::scale_encode::Variant { - name: "force_default_xcm_version", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("maybe_xcm_version"), - maybe_xcm_version - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_subscribe_version_notify { location } => { - ::subxt::ext::scale_encode::Variant { - name: "force_subscribe_version_notify", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("location"), - location as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_unsubscribe_version_notify { location } => { - ::subxt::ext::scale_encode::Variant { - name: "force_unsubscribe_version_notify", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("location"), - location as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::limited_reserve_transfer_assets { - dest, - beneficiary, - assets, - fee_asset_item, - weight_limit, - } => { - ::subxt::ext::scale_encode::Variant { - name: "limited_reserve_transfer_assets", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee_asset_item"), - fee_asset_item - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight_limit"), - weight_limit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::limited_teleport_assets { - dest, - beneficiary, - assets, - fee_asset_item, - weight_limit, - } => { - ::subxt::ext::scale_encode::Variant { - name: "limited_teleport_assets", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fee_asset_item"), - fee_asset_item - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight_limit"), - weight_limit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_suspension { suspended } => { - ::subxt::ext::scale_encode::Variant { - name: "force_suspension", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("suspended"), - suspended as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::send { dest: __self_0, message: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "send", - "dest", - __self_0, - "message", - &__self_1, - ) - } - Call::teleport_assets { - dest: __self_0, - beneficiary: __self_1, - assets: __self_2, - fee_asset_item: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "teleport_assets", - "dest", - __self_0, - "beneficiary", - __self_1, - "assets", - __self_2, - "fee_asset_item", - &__self_3, - ) - } - Call::reserve_transfer_assets { - dest: __self_0, - beneficiary: __self_1, - assets: __self_2, - fee_asset_item: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "reserve_transfer_assets", - "dest", - __self_0, - "beneficiary", - __self_1, - "assets", - __self_2, - "fee_asset_item", - &__self_3, - ) - } - Call::execute { - message: __self_0, - max_weight: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "execute", - "message", - __self_0, - "max_weight", - &__self_1, - ) - } - Call::force_xcm_version { - location: __self_0, - xcm_version: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "force_xcm_version", - "location", - __self_0, - "xcm_version", - &__self_1, - ) - } - Call::force_default_xcm_version { - maybe_xcm_version: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "force_default_xcm_version", - "maybe_xcm_version", - &__self_0, - ) - } - Call::force_subscribe_version_notify { - location: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "force_subscribe_version_notify", - "location", - &__self_0, - ) - } - Call::force_unsubscribe_version_notify { - location: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "force_unsubscribe_version_notify", - "location", - &__self_0, - ) - } - Call::limited_reserve_transfer_assets { - dest: __self_0, - beneficiary: __self_1, - assets: __self_2, - fee_asset_item: __self_3, - weight_limit: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "limited_reserve_transfer_assets", - "dest", - __self_0, - "beneficiary", - __self_1, - "assets", - __self_2, - "fee_asset_item", - __self_3, - "weight_limit", - &__self_4, - ) - } - Call::limited_teleport_assets { - dest: __self_0, - beneficiary: __self_1, - assets: __self_2, - fee_asset_item: __self_3, - weight_limit: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "limited_teleport_assets", - "dest", - __self_0, - "beneficiary", - __self_1, - "assets", - __self_2, - "fee_asset_item", - __self_3, - "weight_limit", - &__self_4, - ) - } - Call::force_suspension { suspended: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "force_suspension", - "suspended", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - Unreachable, - #[codec(index = 1)] - SendFailure, - #[codec(index = 2)] - Filtered, - #[codec(index = 3)] - UnweighableMessage, - #[codec(index = 4)] - DestinationNotInvertible, - #[codec(index = 5)] - Empty, - #[codec(index = 6)] - CannotReanchor, - #[codec(index = 7)] - TooManyAssets, - #[codec(index = 8)] - InvalidOrigin, - #[codec(index = 9)] - BadVersion, - #[codec(index = 10)] - BadLocation, - #[codec(index = 11)] - NoSubscription, - #[codec(index = 12)] - AlreadySubscribed, - #[codec(index = 13)] - InvalidAsset, - #[codec(index = 14)] - LowBalance, - #[codec(index = 15)] - TooManyLocks, - #[codec(index = 16)] - AccountNotSovereign, - #[codec(index = 17)] - FeesNotMet, - #[codec(index = 18)] - LockNotFound, - #[codec(index = 19)] - InUse, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Unreachable) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::SendFailure) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Filtered) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UnweighableMessage) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::DestinationNotInvertible) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Empty) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CannotReanchor) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyAssets) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidOrigin) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::BadVersion) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::BadLocation) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoSubscription) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadySubscribed) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidAsset) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::LowBalance) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyLocks) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AccountNotSovereign) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::FeesNotMet) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::LockNotFound) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InUse) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::Unreachable => 0_usize, - Error::SendFailure => 0_usize, - Error::Filtered => 0_usize, - Error::UnweighableMessage => 0_usize, - Error::DestinationNotInvertible => 0_usize, - Error::Empty => 0_usize, - Error::CannotReanchor => 0_usize, - Error::TooManyAssets => 0_usize, - Error::InvalidOrigin => 0_usize, - Error::BadVersion => 0_usize, - Error::BadLocation => 0_usize, - Error::NoSubscription => 0_usize, - Error::AlreadySubscribed => 0_usize, - Error::InvalidAsset => 0_usize, - Error::LowBalance => 0_usize, - Error::TooManyLocks => 0_usize, - Error::AccountNotSovereign => 0_usize, - Error::FeesNotMet => 0_usize, - Error::LockNotFound => 0_usize, - Error::InUse => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::Unreachable => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::SendFailure => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::Filtered => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::UnweighableMessage => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::DestinationNotInvertible => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::Empty => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::CannotReanchor => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::TooManyAssets => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::InvalidOrigin => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::BadVersion => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::BadLocation => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Error::NoSubscription => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - Error::AlreadySubscribed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - Error::InvalidAsset => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - } - Error::LowBalance => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - } - Error::TooManyLocks => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - } - Error::AccountNotSovereign => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - } - Error::FeesNotMet => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - } - Error::LockNotFound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - } - Error::InUse => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Unreachable" { - return Ok(Error::Unreachable); - } - if value.name() == "SendFailure" { - return Ok(Error::SendFailure); - } - if value.name() == "Filtered" { - return Ok(Error::Filtered); - } - if value.name() == "UnweighableMessage" { - return Ok(Error::UnweighableMessage); - } - if value.name() == "DestinationNotInvertible" { - return Ok(Error::DestinationNotInvertible); - } - if value.name() == "Empty" { - return Ok(Error::Empty); - } - if value.name() == "CannotReanchor" { - return Ok(Error::CannotReanchor); - } - if value.name() == "TooManyAssets" { - return Ok(Error::TooManyAssets); - } - if value.name() == "InvalidOrigin" { - return Ok(Error::InvalidOrigin); - } - if value.name() == "BadVersion" { - return Ok(Error::BadVersion); - } - if value.name() == "BadLocation" { - return Ok(Error::BadLocation); - } - if value.name() == "NoSubscription" { - return Ok(Error::NoSubscription); - } - if value.name() == "AlreadySubscribed" { - return Ok(Error::AlreadySubscribed); - } - if value.name() == "InvalidAsset" { - return Ok(Error::InvalidAsset); - } - if value.name() == "LowBalance" { - return Ok(Error::LowBalance); - } - if value.name() == "TooManyLocks" { - return Ok(Error::TooManyLocks); - } - if value.name() == "AccountNotSovereign" { - return Ok(Error::AccountNotSovereign); - } - if value.name() == "FeesNotMet" { - return Ok(Error::FeesNotMet); - } - if value.name() == "LockNotFound" { - return Ok(Error::LockNotFound); - } - if value.name() == "InUse" { - return Ok(Error::InUse); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Unreachable", - "SendFailure", - "Filtered", - "UnweighableMessage", - "DestinationNotInvertible", - "Empty", - "CannotReanchor", - "TooManyAssets", - "InvalidOrigin", - "BadVersion", - "BadLocation", - "NoSubscription", - "AlreadySubscribed", - "InvalidAsset", - "LowBalance", - "TooManyLocks", - "AccountNotSovereign", - "FeesNotMet", - "LockNotFound", - "InUse", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Unreachable => { - ::subxt::ext::scale_encode::Variant { - name: "Unreachable", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SendFailure => { - ::subxt::ext::scale_encode::Variant { - name: "SendFailure", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Filtered => { - ::subxt::ext::scale_encode::Variant { - name: "Filtered", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnweighableMessage => { - ::subxt::ext::scale_encode::Variant { - name: "UnweighableMessage", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DestinationNotInvertible => { - ::subxt::ext::scale_encode::Variant { - name: "DestinationNotInvertible", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Empty => { - ::subxt::ext::scale_encode::Variant { - name: "Empty", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CannotReanchor => { - ::subxt::ext::scale_encode::Variant { - name: "CannotReanchor", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyAssets => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyAssets", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidOrigin => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidOrigin", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BadVersion => { - ::subxt::ext::scale_encode::Variant { - name: "BadVersion", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BadLocation => { - ::subxt::ext::scale_encode::Variant { - name: "BadLocation", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoSubscription => { - ::subxt::ext::scale_encode::Variant { - name: "NoSubscription", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadySubscribed => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadySubscribed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidAsset => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidAsset", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LowBalance => { - ::subxt::ext::scale_encode::Variant { - name: "LowBalance", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyLocks => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyLocks", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AccountNotSovereign => { - ::subxt::ext::scale_encode::Variant { - name: "AccountNotSovereign", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FeesNotMet => { - ::subxt::ext::scale_encode::Variant { - name: "FeesNotMet", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LockNotFound => { - ::subxt::ext::scale_encode::Variant { - name: "LockNotFound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InUse => { - ::subxt::ext::scale_encode::Variant { - name: "InUse", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::Unreachable => "Unreachable", - Error::SendFailure => "SendFailure", - Error::Filtered => "Filtered", - Error::UnweighableMessage => "UnweighableMessage", - Error::DestinationNotInvertible => { - "DestinationNotInvertible" - } - Error::Empty => "Empty", - Error::CannotReanchor => "CannotReanchor", - Error::TooManyAssets => "TooManyAssets", - Error::InvalidOrigin => "InvalidOrigin", - Error::BadVersion => "BadVersion", - Error::BadLocation => "BadLocation", - Error::NoSubscription => "NoSubscription", - Error::AlreadySubscribed => "AlreadySubscribed", - Error::InvalidAsset => "InvalidAsset", - Error::LowBalance => "LowBalance", - Error::TooManyLocks => "TooManyLocks", - Error::AccountNotSovereign => "AccountNotSovereign", - Error::FeesNotMet => "FeesNotMet", - Error::LockNotFound => "LockNotFound", - Error::InUse => "InUse", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - Attempted(runtime_types::xcm::v3::traits::Outcome), - #[codec(index = 1)] - Sent( - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::Xcm, - ), - #[codec(index = 2)] - UnexpectedResponse( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - ), - #[codec(index = 3)] - ResponseReady( - ::core::primitive::u64, - runtime_types::xcm::v3::Response, - ), - #[codec(index = 4)] - Notified( - ::core::primitive::u64, - ::core::primitive::u8, - ::core::primitive::u8, - ), - #[codec(index = 5)] - 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)] - NotifyDispatchError( - ::core::primitive::u64, - ::core::primitive::u8, - ::core::primitive::u8, - ), - #[codec(index = 7)] - NotifyDecodeFailed( - ::core::primitive::u64, - ::core::primitive::u8, - ::core::primitive::u8, - ), - #[codec(index = 8)] - InvalidResponder( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - >, - ), - #[codec(index = 9)] - InvalidResponderVersion( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - ), - #[codec(index = 10)] - ResponseTaken(::core::primitive::u64), - #[codec(index = 11)] - AssetsTrapped( - ::subxt::utils::H256, - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::VersionedMultiAssets, - ), - #[codec(index = 12)] - VersionChangeNotified( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u32, - runtime_types::xcm::v3::multiasset::MultiAssets, - ), - #[codec(index = 13)] - SupportedVersionChanged( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u32, - ), - #[codec(index = 14)] - NotifyTargetSendFail( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - runtime_types::xcm::v3::traits::Error, - ), - #[codec(index = 15)] - NotifyTargetMigrationFail( - runtime_types::xcm::VersionedMultiLocation, - ::core::primitive::u64, - ), - #[codec(index = 16)] - InvalidQuerierVersion( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - ), - #[codec(index = 17)] - InvalidQuerier( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - >, - ), - #[codec(index = 18)] - VersionNotifyStarted( - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::multiasset::MultiAssets, - ), - #[codec(index = 19)] - VersionNotifyRequested( - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::multiasset::MultiAssets, - ), - #[codec(index = 20)] - VersionNotifyUnrequested( - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::multiasset::MultiAssets, - ), - #[codec(index = 21)] - FeesPaid( - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::multiasset::MultiAssets, - ), - #[codec(index = 22)] - AssetsClaimed( - ::subxt::utils::H256, - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::VersionedMultiAssets, - ), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::Attempted({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Attempted.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::Sent( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Sent.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Sent.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Sent.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::UnexpectedResponse( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::UnexpectedResponse.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::UnexpectedResponse.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::ResponseReady( - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ResponseReady.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ResponseReady.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::Notified( - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Notified.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Notified.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Notified.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::NotifyOverweight( - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NotifyOverweight.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NotifyOverweight.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NotifyOverweight.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NotifyOverweight.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NotifyOverweight.4`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::NotifyDispatchError( - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NotifyDispatchError.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NotifyDispatchError.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NotifyDispatchError.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::NotifyDecodeFailed( - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NotifyDecodeFailed.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NotifyDecodeFailed.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NotifyDecodeFailed.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::InvalidResponder( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::InvalidResponder.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::InvalidResponder.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::InvalidResponder.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::InvalidResponderVersion( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::InvalidResponderVersion.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::InvalidResponderVersion.1`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::ResponseTaken({ - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ResponseTaken.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::AssetsTrapped( - { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::AssetsTrapped.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::AssetsTrapped.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::AssetsTrapped.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::VersionChangeNotified( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::VersionChangeNotified.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::VersionChangeNotified.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::VersionChangeNotified.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::SupportedVersionChanged( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::SupportedVersionChanged.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::SupportedVersionChanged.1`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::NotifyTargetSendFail( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NotifyTargetSendFail.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NotifyTargetSendFail.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NotifyTargetSendFail.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::NotifyTargetMigrationFail( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::NotifyTargetMigrationFail.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::NotifyTargetMigrationFail.1`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::InvalidQuerierVersion( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::InvalidQuerierVersion.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::InvalidQuerierVersion.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::InvalidQuerier( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::InvalidQuerier.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::InvalidQuerier.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::InvalidQuerier.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::InvalidQuerier.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::VersionNotifyStarted( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::VersionNotifyStarted.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::VersionNotifyStarted.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::VersionNotifyRequested( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::VersionNotifyRequested.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::VersionNotifyRequested.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::VersionNotifyUnrequested( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::VersionNotifyUnrequested.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::VersionNotifyUnrequested.1`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::FeesPaid( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::FeesPaid.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::FeesPaid.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 22u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::AssetsClaimed( - { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::AssetsClaimed.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::AssetsClaimed.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::AssetsClaimed.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::Attempted(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Event::Sent(ref aa, ref ba, ref ca) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - } - Event::UnexpectedResponse(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::ResponseReady(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::Notified(ref aa, ref ba, ref ca) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - } - Event::NotifyOverweight( - ref aa, - ref ba, - ref ca, - ref da, - ref ea, - ) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(da)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ea)) - } - Event::NotifyDispatchError(ref aa, ref ba, ref ca) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - } - Event::NotifyDecodeFailed(ref aa, ref ba, ref ca) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - } - Event::InvalidResponder(ref aa, ref ba, ref ca) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - } - Event::InvalidResponderVersion(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::ResponseTaken(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Event::AssetsTrapped(ref aa, ref ba, ref ca) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - } - Event::VersionChangeNotified(ref aa, ref ba, ref ca) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - } - Event::SupportedVersionChanged(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::NotifyTargetSendFail(ref aa, ref ba, ref ca) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - } - Event::NotifyTargetMigrationFail(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::InvalidQuerierVersion(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::InvalidQuerier(ref aa, ref ba, ref ca, ref da) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(da)) - } - Event::VersionNotifyStarted(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::VersionNotifyRequested(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::VersionNotifyUnrequested(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::FeesPaid(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::AssetsClaimed(ref aa, ref ba, ref ca) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::Attempted(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Event::Sent(ref aa, ref ba, ref ca) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - } - Event::UnexpectedResponse(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::ResponseReady(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::Notified(ref aa, ref ba, ref ca) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - } - Event::NotifyOverweight( - ref aa, - ref ba, - ref ca, - ref da, - ref ea, - ) => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - da, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ea, - __codec_dest_edqy, - ); - } - Event::NotifyDispatchError(ref aa, ref ba, ref ca) => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - } - Event::NotifyDecodeFailed(ref aa, ref ba, ref ca) => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - } - Event::InvalidResponder(ref aa, ref ba, ref ca) => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - } - Event::InvalidResponderVersion(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::ResponseTaken(ref aa) => { - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Event::AssetsTrapped(ref aa, ref ba, ref ca) => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - } - Event::VersionChangeNotified(ref aa, ref ba, ref ca) => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - } - Event::SupportedVersionChanged(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::NotifyTargetSendFail(ref aa, ref ba, ref ca) => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - } - Event::NotifyTargetMigrationFail(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::InvalidQuerierVersion(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::InvalidQuerier(ref aa, ref ba, ref ca, ref da) => { - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - da, - __codec_dest_edqy, - ); - } - Event::VersionNotifyStarted(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::VersionNotifyRequested(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::VersionNotifyUnrequested(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::FeesPaid(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::AssetsClaimed(ref aa, ref ba, ref ca) => { - __codec_dest_edqy.push_byte(22u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Attempted" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Event::Attempted({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Sent" { - let fields = value.fields(); - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - return Ok( - Event::Sent( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ); - } - if value.name() == "UnexpectedResponse" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::UnexpectedResponse( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "ResponseReady" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::ResponseReady( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "Notified" { - let fields = value.fields(); - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - return Ok( - Event::Notified( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ); - } - if value.name() == "NotifyOverweight" { - let fields = value.fields(); - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - return Ok( - Event::NotifyOverweight( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(4usize))? - }, - ), - ); - } - if value.name() == "NotifyDispatchError" { - let fields = value.fields(); - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - return Ok( - Event::NotifyDispatchError( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ); - } - if value.name() == "NotifyDecodeFailed" { - let fields = value.fields(); - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - return Ok( - Event::NotifyDecodeFailed( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ); - } - if value.name() == "InvalidResponder" { - let fields = value.fields(); - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - return Ok( - Event::InvalidResponder( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ); - } - if value.name() == "InvalidResponderVersion" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::InvalidResponderVersion( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "ResponseTaken" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Event::ResponseTaken({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "AssetsTrapped" { - let fields = value.fields(); - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - return Ok( - Event::AssetsTrapped( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ); - } - if value.name() == "VersionChangeNotified" { - let fields = value.fields(); - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - return Ok( - Event::VersionChangeNotified( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ); - } - if value.name() == "SupportedVersionChanged" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::SupportedVersionChanged( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "NotifyTargetSendFail" { - let fields = value.fields(); - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - return Ok( - Event::NotifyTargetSendFail( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ); - } - if value.name() == "NotifyTargetMigrationFail" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::NotifyTargetMigrationFail( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "InvalidQuerierVersion" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::InvalidQuerierVersion( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "InvalidQuerier" { - let fields = value.fields(); - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - return Ok( - Event::InvalidQuerier( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - ), - ); - } - if value.name() == "VersionNotifyStarted" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::VersionNotifyStarted( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "VersionNotifyRequested" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::VersionNotifyRequested( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "VersionNotifyUnrequested" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::VersionNotifyUnrequested( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "FeesPaid" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::FeesPaid( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "AssetsClaimed" { - let fields = value.fields(); - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - return Ok( - Event::AssetsClaimed( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Attempted", - "Sent", - "UnexpectedResponse", - "ResponseReady", - "Notified", - "NotifyOverweight", - "NotifyDispatchError", - "NotifyDecodeFailed", - "InvalidResponder", - "InvalidResponderVersion", - "ResponseTaken", - "AssetsTrapped", - "VersionChangeNotified", - "SupportedVersionChanged", - "NotifyTargetSendFail", - "NotifyTargetMigrationFail", - "InvalidQuerierVersion", - "InvalidQuerier", - "VersionNotifyStarted", - "VersionNotifyRequested", - "VersionNotifyUnrequested", - "FeesPaid", - "AssetsClaimed", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Attempted(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Attempted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Sent(_0, _1, _2) => { - ::subxt::ext::scale_encode::Variant { - name: "Sent", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnexpectedResponse(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "UnexpectedResponse", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ResponseReady(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "ResponseReady", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Notified(_0, _1, _2) => { - ::subxt::ext::scale_encode::Variant { - name: "Notified", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotifyOverweight(_0, _1, _2, _3, _4) => { - ::subxt::ext::scale_encode::Variant { - name: "NotifyOverweight", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _4 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotifyDispatchError(_0, _1, _2) => { - ::subxt::ext::scale_encode::Variant { - name: "NotifyDispatchError", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotifyDecodeFailed(_0, _1, _2) => { - ::subxt::ext::scale_encode::Variant { - name: "NotifyDecodeFailed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidResponder(_0, _1, _2) => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidResponder", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidResponderVersion(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidResponderVersion", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ResponseTaken(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ResponseTaken", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AssetsTrapped(_0, _1, _2) => { - ::subxt::ext::scale_encode::Variant { - name: "AssetsTrapped", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::VersionChangeNotified(_0, _1, _2) => { - ::subxt::ext::scale_encode::Variant { - name: "VersionChangeNotified", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SupportedVersionChanged(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "SupportedVersionChanged", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotifyTargetSendFail(_0, _1, _2) => { - ::subxt::ext::scale_encode::Variant { - name: "NotifyTargetSendFail", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotifyTargetMigrationFail(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "NotifyTargetMigrationFail", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidQuerierVersion(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidQuerierVersion", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidQuerier(_0, _1, _2, _3) => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidQuerier", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::VersionNotifyStarted(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "VersionNotifyStarted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::VersionNotifyRequested(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "VersionNotifyRequested", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::VersionNotifyUnrequested(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "VersionNotifyUnrequested", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FeesPaid(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "FeesPaid", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AssetsClaimed(_0, _1, _2) => { - ::subxt::ext::scale_encode::Variant { - name: "AssetsClaimed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::Attempted(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Attempted", - &__self_0, - ) - } - Event::Sent(__self_0, __self_1, __self_2) => { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "Sent", - __self_0, - __self_1, - &__self_2, - ) - } - Event::UnexpectedResponse(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "UnexpectedResponse", - __self_0, - &__self_1, - ) - } - Event::ResponseReady(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "ResponseReady", - __self_0, - &__self_1, - ) - } - Event::Notified(__self_0, __self_1, __self_2) => { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "Notified", - __self_0, - __self_1, - &__self_2, - ) - } - Event::NotifyOverweight( - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - ) => { - ::core::fmt::Formatter::debug_tuple_field5_finish( - f, - "NotifyOverweight", - __self_0, - __self_1, - __self_2, - __self_3, - &__self_4, - ) - } - Event::NotifyDispatchError(__self_0, __self_1, __self_2) => { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "NotifyDispatchError", - __self_0, - __self_1, - &__self_2, - ) - } - Event::NotifyDecodeFailed(__self_0, __self_1, __self_2) => { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "NotifyDecodeFailed", - __self_0, - __self_1, - &__self_2, - ) - } - Event::InvalidResponder(__self_0, __self_1, __self_2) => { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "InvalidResponder", - __self_0, - __self_1, - &__self_2, - ) - } - Event::InvalidResponderVersion(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "InvalidResponderVersion", - __self_0, - &__self_1, - ) - } - Event::ResponseTaken(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ResponseTaken", - &__self_0, - ) - } - Event::AssetsTrapped(__self_0, __self_1, __self_2) => { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "AssetsTrapped", - __self_0, - __self_1, - &__self_2, - ) - } - Event::VersionChangeNotified( - __self_0, - __self_1, - __self_2, - ) => { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "VersionChangeNotified", - __self_0, - __self_1, - &__self_2, - ) - } - Event::SupportedVersionChanged(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "SupportedVersionChanged", - __self_0, - &__self_1, - ) - } - Event::NotifyTargetSendFail( - __self_0, - __self_1, - __self_2, - ) => { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "NotifyTargetSendFail", - __self_0, - __self_1, - &__self_2, - ) - } - Event::NotifyTargetMigrationFail(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "NotifyTargetMigrationFail", - __self_0, - &__self_1, - ) - } - Event::InvalidQuerierVersion(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "InvalidQuerierVersion", - __self_0, - &__self_1, - ) - } - Event::InvalidQuerier( - __self_0, - __self_1, - __self_2, - __self_3, - ) => { - ::core::fmt::Formatter::debug_tuple_field4_finish( - f, - "InvalidQuerier", - __self_0, - __self_1, - __self_2, - &__self_3, - ) - } - Event::VersionNotifyStarted(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "VersionNotifyStarted", - __self_0, - &__self_1, - ) - } - Event::VersionNotifyRequested(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "VersionNotifyRequested", - __self_0, - &__self_1, - ) - } - Event::VersionNotifyUnrequested(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "VersionNotifyUnrequested", - __self_0, - &__self_1, - ) - } - Event::FeesPaid(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "FeesPaid", - __self_0, - &__self_1, - ) - } - Event::AssetsClaimed(__self_0, __self_1, __self_2) => { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "AssetsClaimed", - __self_0, - __self_1, - &__self_2, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Origin { - #[codec(index = 0)] - Xcm(runtime_types::xcm::v3::multilocation::MultiLocation), - #[codec(index = 1)] - Response(runtime_types::xcm::v3::multilocation::MultiLocation), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Origin { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Origin`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Origin::Xcm({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Origin::Xcm.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Origin::Response({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Origin::Response.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Origin`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Origin { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Origin::Xcm(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Origin::Response(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Origin::Xcm(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Origin::Response(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Origin {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Origin { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Origin; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Xcm" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Origin::Xcm({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Response" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Origin::Response({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Xcm", "Response"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Origin { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Xcm(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Xcm", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Response(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Response", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Origin { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Origin::Xcm(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Xcm", - &__self_0, - ) - } - Origin::Response(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Response", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum QueryStatus<_0> { - #[codec(index = 0)] - Pending { - responder: runtime_types::xcm::VersionedMultiLocation, - maybe_match_querier: ::core::option::Option< - 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, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for QueryStatus<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `QueryStatus`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(QueryStatus::<_0>::Pending { - responder: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `QueryStatus::Pending::responder`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_match_querier: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::xcm::VersionedMultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `QueryStatus::Pending::maybe_match_querier`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_notify: { - let __codec_res_edqy = <::core::option::Option< - (::core::primitive::u8, ::core::primitive::u8), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `QueryStatus::Pending::maybe_notify`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - timeout: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `QueryStatus::Pending::timeout`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(QueryStatus::< - _0, - >::VersionNotifier { - origin: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `QueryStatus::VersionNotifier::origin`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - is_active: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `QueryStatus::VersionNotifier::is_active`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(QueryStatus::<_0>::Ready { - response: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `QueryStatus::Ready::response`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - at: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `QueryStatus::Ready::at`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `QueryStatus`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for QueryStatus<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - QueryStatus::Pending { - ref responder, - ref maybe_match_querier, - ref maybe_notify, - ref timeout, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(responder), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maybe_match_querier), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maybe_notify), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(timeout), - ) - } - QueryStatus::VersionNotifier { - ref origin, - ref is_active, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(origin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(is_active), - ) - } - QueryStatus::Ready { ref response, ref at } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(response), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(at)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - QueryStatus::Pending { - ref responder, - ref maybe_match_querier, - ref maybe_notify, - ref timeout, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - responder, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - maybe_match_querier, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - maybe_notify, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - timeout, - __codec_dest_edqy, - ); - } - QueryStatus::VersionNotifier { - ref origin, - ref is_active, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - origin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - is_active, - __codec_dest_edqy, - ); - } - QueryStatus::Ready { ref response, ref at } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - response, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - at, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for QueryStatus<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for QueryStatus<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = QueryStatus<_0>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Pending" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(QueryStatus::Pending { - responder: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("responder"))? - }, - maybe_match_querier: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_match_querier"))? - }, - maybe_notify: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_notify"))? - }, - timeout: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("timeout"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(QueryStatus::Pending { - responder: { - let val = *vals - .get(&Some("responder")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "responder".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("responder"))? - }, - maybe_match_querier: { - let val = *vals - .get(&Some("maybe_match_querier")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_match_querier".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_match_querier"))? - }, - maybe_notify: { - let val = *vals - .get(&Some("maybe_notify")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_notify".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_notify"))? - }, - timeout: { - let val = *vals - .get(&Some("timeout")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "timeout".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("timeout"))? - }, - }) - }; - } - if value.name() == "VersionNotifier" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(QueryStatus::VersionNotifier { - origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - is_active: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("is_active"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(QueryStatus::VersionNotifier { - origin: { - let val = *vals - .get(&Some("origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "origin".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("origin"))? - }, - is_active: { - let val = *vals - .get(&Some("is_active")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "is_active".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("is_active"))? - }, - }) - }; - } - if value.name() == "Ready" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(QueryStatus::Ready { - response: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("response"))? - }, - at: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("at"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(QueryStatus::Ready { - response: { - let val = *vals - .get(&Some("response")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "response".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("response"))? - }, - at: { - let val = *vals - .get(&Some("at")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "at".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("at"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Pending", - "VersionNotifier", - "Ready", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for QueryStatus<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Pending { - responder, - maybe_match_querier, - maybe_notify, - timeout, - } => { - ::subxt::ext::scale_encode::Variant { - name: "Pending", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("responder"), - responder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_match_querier"), - maybe_match_querier - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_notify"), - maybe_notify - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("timeout"), - timeout as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::VersionNotifier { origin, is_active } => { - ::subxt::ext::scale_encode::Variant { - name: "VersionNotifier", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("origin"), - origin as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("is_active"), - is_active as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Ready { response, at } => { - ::subxt::ext::scale_encode::Variant { - name: "Ready", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("response"), - response as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("at"), - at as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for QueryStatus<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - QueryStatus::Pending { - responder: __self_0, - maybe_match_querier: __self_1, - maybe_notify: __self_2, - timeout: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "Pending", - "responder", - __self_0, - "maybe_match_querier", - __self_1, - "maybe_notify", - __self_2, - "timeout", - &__self_3, - ) - } - QueryStatus::VersionNotifier { - origin: __self_0, - is_active: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "VersionNotifier", - "origin", - __self_0, - "is_active", - &__self_1, - ) - } - QueryStatus::Ready { response: __self_0, at: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Ready", - "response", - __self_0, - "at", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoteLockedFungibleRecord<_0> { - pub amount: ::core::primitive::u128, - pub owner: runtime_types::xcm::VersionedMultiLocation, - pub locker: runtime_types::xcm::VersionedMultiLocation, - pub consumers: runtime_types::bounded_collections::bounded_vec::BoundedVec< - (_0, ::core::primitive::u128), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode - for RemoteLockedFungibleRecord<_0> - where - runtime_types::bounded_collections::bounded_vec::BoundedVec< - (_0, ::core::primitive::u128), - >: ::subxt::ext::codec::Decode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - (_0, ::core::primitive::u128), - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(RemoteLockedFungibleRecord::< - _0, - > { - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RemoteLockedFungibleRecord::amount`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - owner: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RemoteLockedFungibleRecord::owner`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - locker: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RemoteLockedFungibleRecord::locker`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - consumers: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RemoteLockedFungibleRecord::consumers`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode - for RemoteLockedFungibleRecord<_0> - where - runtime_types::bounded_collections::bounded_vec::BoundedVec< - (_0, ::core::primitive::u128), - >: ::subxt::ext::codec::Encode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - (_0, ::core::primitive::u128), - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.amount), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.owner), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.locker), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.consumers), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.amount, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.owner, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.locker, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.consumers, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike - for RemoteLockedFungibleRecord<_0> - where - runtime_types::bounded_collections::bounded_vec::BoundedVec< - (_0, ::core::primitive::u128), - >: ::subxt::ext::codec::Encode, - runtime_types::bounded_collections::bounded_vec::BoundedVec< - (_0, ::core::primitive::u128), - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for RemoteLockedFungibleRecord<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RemoteLockedFungibleRecord<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RemoteLockedFungibleRecord { - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - owner: { - let val = *vals - .get(&Some("owner")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "owner".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - locker: { - let val = *vals - .get(&Some("locker")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "locker".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("locker"))? - }, - consumers: { - let val = *vals - .get(&Some("consumers")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "consumers".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("consumers"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(RemoteLockedFungibleRecord { - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - owner: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - locker: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("locker"))? - }, - consumers: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("consumers"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for RemoteLockedFungibleRecord<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for RemoteLockedFungibleRecord<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoteLockedFungibleRecord { - amount, - owner, - locker, - consumers, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("owner"), - owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("locker"), - locker as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("consumers"), - consumers as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for RemoteLockedFungibleRecord<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RemoteLockedFungibleRecord { - amount, - owner, - locker, - consumers, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("owner"), - owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("locker"), - locker as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("consumers"), - consumers as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for RemoteLockedFungibleRecord<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "RemoteLockedFungibleRecord", - "amount", - &self.amount, - "owner", - &self.owner, - "locker", - &self.locker, - "consumers", - &&self.consumers, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum VersionMigrationStage { - #[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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VersionMigrationStage { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `VersionMigrationStage`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - VersionMigrationStage::MigrateSupportedVersion, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - VersionMigrationStage::MigrateVersionNotifiers, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - VersionMigrationStage::NotifyCurrentTargets({ - let __codec_res_edqy = <::core::option::Option< - ::std::vec::Vec<::core::primitive::u8>, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `VersionMigrationStage::NotifyCurrentTargets.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - VersionMigrationStage::MigrateAndNotifyOldTargets, - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `VersionMigrationStage`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VersionMigrationStage { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - VersionMigrationStage::MigrateSupportedVersion => 0_usize, - VersionMigrationStage::MigrateVersionNotifiers => 0_usize, - VersionMigrationStage::NotifyCurrentTargets(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - VersionMigrationStage::MigrateAndNotifyOldTargets => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - VersionMigrationStage::MigrateSupportedVersion => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - VersionMigrationStage::MigrateVersionNotifiers => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - VersionMigrationStage::NotifyCurrentTargets(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - VersionMigrationStage::MigrateAndNotifyOldTargets => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VersionMigrationStage {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for VersionMigrationStage { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VersionMigrationStage; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "MigrateSupportedVersion" { - return Ok(VersionMigrationStage::MigrateSupportedVersion); - } - if value.name() == "MigrateVersionNotifiers" { - return Ok(VersionMigrationStage::MigrateVersionNotifiers); - } - if value.name() == "NotifyCurrentTargets" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - VersionMigrationStage::NotifyCurrentTargets({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "MigrateAndNotifyOldTargets" { - return Ok( - VersionMigrationStage::MigrateAndNotifyOldTargets, - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "MigrateSupportedVersion", - "MigrateVersionNotifiers", - "NotifyCurrentTargets", - "MigrateAndNotifyOldTargets", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for VersionMigrationStage { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::MigrateSupportedVersion => { - ::subxt::ext::scale_encode::Variant { - name: "MigrateSupportedVersion", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MigrateVersionNotifiers => { - ::subxt::ext::scale_encode::Variant { - name: "MigrateVersionNotifiers", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotifyCurrentTargets(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "NotifyCurrentTargets", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MigrateAndNotifyOldTargets => { - ::subxt::ext::scale_encode::Variant { - name: "MigrateAndNotifyOldTargets", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VersionMigrationStage { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - VersionMigrationStage::MigrateSupportedVersion => { - ::core::fmt::Formatter::write_str( - f, - "MigrateSupportedVersion", - ) - } - VersionMigrationStage::MigrateVersionNotifiers => { - ::core::fmt::Formatter::write_str( - f, - "MigrateVersionNotifiers", - ) - } - VersionMigrationStage::NotifyCurrentTargets(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "NotifyCurrentTargets", - &__self_0, - ) - } - VersionMigrationStage::MigrateAndNotifyOldTargets => { - ::core::fmt::Formatter::write_str( - f, - "MigrateAndNotifyOldTargets", - ) - } - } - } - } - } - } - pub mod polkadot_core_primitives { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CandidateHash(pub ::subxt::utils::H256); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CandidateHash { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - CandidateHash({ - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateHash.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CandidateHash { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CandidateHash {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CandidateHash { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CandidateHash; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - CandidateHash({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for CandidateHash { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CandidateHash { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidateHash(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CandidateHash { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidateHash(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CandidateHash { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "CandidateHash", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InboundDownwardMessage<_0> { - pub sent_at: _0, - pub msg: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for InboundDownwardMessage<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(InboundDownwardMessage::<_0> { - sent_at: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `InboundDownwardMessage::sent_at`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - msg: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `InboundDownwardMessage::msg`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for InboundDownwardMessage<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.sent_at), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.msg), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.sent_at, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.msg, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike - for InboundDownwardMessage<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for InboundDownwardMessage<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = InboundDownwardMessage<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(InboundDownwardMessage { - sent_at: { - let val = *vals - .get(&Some("sent_at")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sent_at".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sent_at"))? - }, - msg: { - let val = *vals - .get(&Some("msg")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "msg".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("msg"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(InboundDownwardMessage { - sent_at: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sent_at"))? - }, - msg: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("msg"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for InboundDownwardMessage<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for InboundDownwardMessage<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let InboundDownwardMessage { sent_at, msg } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sent_at"), - sent_at as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("msg"), - msg as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for InboundDownwardMessage<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let InboundDownwardMessage { sent_at, msg } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sent_at"), - sent_at as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("msg"), - msg as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for InboundDownwardMessage<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "InboundDownwardMessage", - "sent_at", - &self.sent_at, - "msg", - &&self.msg, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InboundHrmpMessage<_0> { - pub sent_at: _0, - pub data: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for InboundHrmpMessage<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(InboundHrmpMessage::<_0> { - sent_at: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `InboundHrmpMessage::sent_at`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - data: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `InboundHrmpMessage::data`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for InboundHrmpMessage<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.sent_at), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.data), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.sent_at, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.data, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for InboundHrmpMessage<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for InboundHrmpMessage<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = InboundHrmpMessage<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(InboundHrmpMessage { - sent_at: { - let val = *vals - .get(&Some("sent_at")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sent_at".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sent_at"))? - }, - data: { - let val = *vals - .get(&Some("data")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "data".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(InboundHrmpMessage { - sent_at: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sent_at"))? - }, - data: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for InboundHrmpMessage<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for InboundHrmpMessage<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let InboundHrmpMessage { sent_at, data } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sent_at"), - sent_at as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("data"), - data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for InboundHrmpMessage<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let InboundHrmpMessage { sent_at, data } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sent_at"), - sent_at as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("data"), - data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for InboundHrmpMessage<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "InboundHrmpMessage", - "sent_at", - &self.sent_at, - "data", - &&self.data, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OutboundHrmpMessage<_0> { - pub recipient: _0, - pub data: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for OutboundHrmpMessage<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(OutboundHrmpMessage::<_0> { - recipient: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OutboundHrmpMessage::recipient`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - data: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OutboundHrmpMessage::data`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for OutboundHrmpMessage<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.recipient), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.data), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.recipient, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.data, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for OutboundHrmpMessage<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for OutboundHrmpMessage<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = OutboundHrmpMessage<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(OutboundHrmpMessage { - recipient: { - let val = *vals - .get(&Some("recipient")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "recipient".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - data: { - let val = *vals - .get(&Some("data")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "data".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(OutboundHrmpMessage { - recipient: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - data: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for OutboundHrmpMessage<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for OutboundHrmpMessage<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OutboundHrmpMessage { recipient, data } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("data"), - data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for OutboundHrmpMessage<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OutboundHrmpMessage { recipient, data } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("data"), - data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for OutboundHrmpMessage<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "OutboundHrmpMessage", - "recipient", - &self.recipient, - "data", - &&self.data, - ) - } - } - } - pub mod polkadot_parachain { - use super::runtime_types; - pub mod primitives { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HeadData(pub ::std::vec::Vec<::core::primitive::u8>); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for HeadData { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - HeadData({ - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HeadData.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for HeadData { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for HeadData {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for HeadData { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = HeadData; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - HeadData({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for HeadData { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for HeadData { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HeadData(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for HeadData { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HeadData(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for HeadData { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "HeadData", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpChannelId { - pub sender: runtime_types::polkadot_parachain::primitives::Id, - pub recipient: runtime_types::polkadot_parachain::primitives::Id, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for HrmpChannelId { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(HrmpChannelId { - sender: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpChannelId::sender`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - recipient: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpChannelId::recipient`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for HrmpChannelId { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.sender), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.recipient), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.sender, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.recipient, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for HrmpChannelId {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for HrmpChannelId { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = HrmpChannelId; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(HrmpChannelId { - sender: { - let val = *vals - .get(&Some("sender")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sender".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - recipient: { - let val = *vals - .get(&Some("recipient")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "recipient".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(HrmpChannelId { - sender: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - recipient: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for HrmpChannelId { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for HrmpChannelId { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HrmpChannelId { sender, recipient } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for HrmpChannelId { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HrmpChannelId { sender, recipient } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for HrmpChannelId { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "HrmpChannelId", - "sender", - &self.sender, - "recipient", - &&self.recipient, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Id(pub ::core::primitive::u32); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Id { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.0 - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Id(x)) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Id { - fn from(x: ::subxt::ext::codec::Compact) -> Id { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Id { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Id({ - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Id.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Id { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Id {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Id { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Id; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Id({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Id { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Id { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Id(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Id { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Id(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Id { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Id", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ValidationCode( - pub ::std::vec::Vec<::core::primitive::u8>, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ValidationCode { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - ValidationCode({ - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ValidationCode.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ValidationCode { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ValidationCode {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ValidationCode { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ValidationCode; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - ValidationCode({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ValidationCode { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ValidationCode { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ValidationCode(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ValidationCode { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ValidationCode(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ValidationCode { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ValidationCode", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ValidationCodeHash(pub ::subxt::utils::H256); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ValidationCodeHash { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - ValidationCodeHash({ - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ValidationCodeHash.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ValidationCodeHash { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ValidationCodeHash {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ValidationCodeHash { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ValidationCodeHash; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - ValidationCodeHash({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ValidationCodeHash { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ValidationCodeHash { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ValidationCodeHash(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ValidationCodeHash { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ValidationCodeHash(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ValidationCodeHash { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ValidationCodeHash", - &&self.0, - ) - } - } - } - } - pub mod polkadot_primitives { - use super::runtime_types; - pub mod v4 { - use super::runtime_types; - pub mod assignment_app { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub runtime_types::sp_core::sr25519::Public); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Public { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Public({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Public.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Public { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Public {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Public { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Public; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Public({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Public { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Public { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Public { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Public { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Public", - &&self.0, - ) - } - } - } - pub mod collator_app { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub runtime_types::sp_core::sr25519::Public); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Public { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Public({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Public.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Public { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Public {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Public { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Public; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Public({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Public { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Public { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Public { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Public { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Public", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Signature( - pub runtime_types::sp_core::sr25519::Signature, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Signature { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Signature({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Signature.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Signature { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Signature {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Signature { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Signature; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Signature({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for Signature { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Signature { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Signature(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Signature { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Signature(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Signature { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Signature", - &&self.0, - ) - } - } - } - pub mod executor_params { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ExecutorParam { - #[codec(index = 1)] - MaxMemoryPages(::core::primitive::u32), - #[codec(index = 2)] - StackLogicalMax(::core::primitive::u32), - #[codec(index = 3)] - StackNativeMax(::core::primitive::u32), - #[codec(index = 4)] - PrecheckingMaxMemory(::core::primitive::u64), - #[codec(index = 5)] - PvfPrepTimeout( - runtime_types::polkadot_primitives::v4::PvfPrepTimeoutKind, - ::core::primitive::u64, - ), - #[codec(index = 6)] - PvfExecTimeout( - runtime_types::polkadot_primitives::v4::PvfExecTimeoutKind, - ::core::primitive::u64, - ), - #[codec(index = 7)] - WasmExtBulkMemory, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ExecutorParam { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `ExecutorParam`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ExecutorParam::MaxMemoryPages({ - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `ExecutorParam::MaxMemoryPages.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ExecutorParam::StackLogicalMax({ - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ExecutorParam::StackLogicalMax.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ExecutorParam::StackNativeMax({ - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `ExecutorParam::StackNativeMax.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ExecutorParam::PrecheckingMaxMemory({ - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ExecutorParam::PrecheckingMaxMemory.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ExecutorParam::PvfPrepTimeout( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `ExecutorParam::PvfPrepTimeout.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `ExecutorParam::PvfPrepTimeout.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ExecutorParam::PvfExecTimeout( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `ExecutorParam::PvfExecTimeout.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `ExecutorParam::PvfExecTimeout.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ExecutorParam::WasmExtBulkMemory) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `ExecutorParam`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ExecutorParam { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - ExecutorParam::MaxMemoryPages(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - ExecutorParam::StackLogicalMax(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - ExecutorParam::StackNativeMax(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - ExecutorParam::PrecheckingMaxMemory(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - ExecutorParam::PvfPrepTimeout(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - ExecutorParam::PvfExecTimeout(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - ExecutorParam::WasmExtBulkMemory => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - ExecutorParam::MaxMemoryPages(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - ExecutorParam::StackLogicalMax(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - ExecutorParam::StackNativeMax(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - ExecutorParam::PrecheckingMaxMemory(ref aa) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - ExecutorParam::PvfPrepTimeout(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - ExecutorParam::PvfExecTimeout(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - ExecutorParam::WasmExtBulkMemory => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ExecutorParam {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ExecutorParam { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ExecutorParam; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "MaxMemoryPages" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - ExecutorParam::MaxMemoryPages({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "StackLogicalMax" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - ExecutorParam::StackLogicalMax({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "StackNativeMax" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - ExecutorParam::StackNativeMax({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "PrecheckingMaxMemory" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - ExecutorParam::PrecheckingMaxMemory({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "PvfPrepTimeout" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - ExecutorParam::PvfPrepTimeout( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "PvfExecTimeout" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - ExecutorParam::PvfExecTimeout( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "WasmExtBulkMemory" { - return Ok(ExecutorParam::WasmExtBulkMemory); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "MaxMemoryPages", - "StackLogicalMax", - "StackNativeMax", - "PrecheckingMaxMemory", - "PvfPrepTimeout", - "PvfExecTimeout", - "WasmExtBulkMemory", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ExecutorParam { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::MaxMemoryPages(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "MaxMemoryPages", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::StackLogicalMax(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "StackLogicalMax", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::StackNativeMax(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "StackNativeMax", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PrecheckingMaxMemory(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "PrecheckingMaxMemory", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PvfPrepTimeout(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "PvfPrepTimeout", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PvfExecTimeout(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "PvfExecTimeout", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WasmExtBulkMemory => { - ::subxt::ext::scale_encode::Variant { - name: "WasmExtBulkMemory", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ExecutorParam { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - ExecutorParam::MaxMemoryPages(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "MaxMemoryPages", - &__self_0, - ) - } - ExecutorParam::StackLogicalMax(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "StackLogicalMax", - &__self_0, - ) - } - ExecutorParam::StackNativeMax(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "StackNativeMax", - &__self_0, - ) - } - ExecutorParam::PrecheckingMaxMemory(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "PrecheckingMaxMemory", - &__self_0, - ) - } - ExecutorParam::PvfPrepTimeout(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "PvfPrepTimeout", - __self_0, - &__self_1, - ) - } - ExecutorParam::PvfExecTimeout(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "PvfExecTimeout", - __self_0, - &__self_1, - ) - } - ExecutorParam::WasmExtBulkMemory => { - ::core::fmt::Formatter::write_str(f, "WasmExtBulkMemory") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ExecutorParams( - pub ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::executor_params::ExecutorParam, - >, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ExecutorParams { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - ExecutorParams({ - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_primitives::v4::executor_params::ExecutorParam, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ExecutorParams.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ExecutorParams { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ExecutorParams {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ExecutorParams { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ExecutorParams; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - ExecutorParams({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ExecutorParams { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ExecutorParams { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExecutorParams(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ExecutorParams { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ExecutorParams(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ExecutorParams { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ExecutorParams", - &&self.0, - ) - } - } - } - pub mod signed { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UncheckedSigned<_0, _1> { - pub payload: _0, - pub validator_index: runtime_types::polkadot_primitives::v4::ValidatorIndex, - pub signature: runtime_types::polkadot_primitives::v4::validator_app::Signature, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData< - _1, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode - for UncheckedSigned<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - ::core::marker::PhantomData<_1>: Default, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(UncheckedSigned::<_0, _1> { - payload: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UncheckedSigned::payload`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validator_index: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `UncheckedSigned::validator_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - signature: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UncheckedSigned::signature`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - __subxt_unused_type_params: ::core::default::Default::default(), - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode - for UncheckedSigned<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.payload), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.validator_index, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.signature), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.payload, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validator_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.signature, - __codec_dest_edqy, - ); - let _ = &self.__subxt_unused_type_params; - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for UncheckedSigned<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>( - ::core::marker::PhantomData<(_0, _1)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for UncheckedSigned<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UncheckedSigned<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(UncheckedSigned { - payload: { - let val = *vals - .get(&Some("payload")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "payload".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("payload"))? - }, - validator_index: { - let val = *vals - .get(&Some("validator_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_index"))? - }, - signature: { - let val = *vals - .get(&Some("signature")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "signature".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - __subxt_unused_type_params: ::core::default::Default::default(), - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(UncheckedSigned { - payload: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("payload"))? - }, - validator_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_index"))? - }, - signature: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - __subxt_unused_type_params: ::core::default::Default::default(), - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for UncheckedSigned<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for UncheckedSigned<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UncheckedSigned { - payload, - validator_index, - signature, - __subxt_unused_type_params, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("payload"), - payload as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_index"), - validator_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("signature"), - signature as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for UncheckedSigned<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let UncheckedSigned { - payload, - validator_index, - signature, - __subxt_unused_type_params, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("payload"), - payload as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_index"), - validator_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("signature"), - signature as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - > ::core::fmt::Debug for UncheckedSigned<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "UncheckedSigned", - "payload", - &self.payload, - "validator_index", - &self.validator_index, - "signature", - &self.signature, - "__subxt_unused_type_params", - &&self.__subxt_unused_type_params, - ) - } - } - } - pub mod validator_app { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub runtime_types::sp_core::sr25519::Public); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Public { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Public({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Public.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Public { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Public {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Public { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Public; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Public({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Public { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Public { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Public { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Public { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Public", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Signature( - pub runtime_types::sp_core::sr25519::Signature, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Signature { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Signature({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Signature.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Signature { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Signature {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Signature { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Signature; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Signature({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for Signature { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Signature { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Signature(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Signature { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Signature(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Signature { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Signature", - &&self.0, - ) - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AvailabilityBitfield( - pub ::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - >, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AvailabilityBitfield { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - AvailabilityBitfield({ - let __codec_res_edqy = <::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AvailabilityBitfield.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AvailabilityBitfield { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AvailabilityBitfield {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for AvailabilityBitfield { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AvailabilityBitfield; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - AvailabilityBitfield({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for AvailabilityBitfield { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for AvailabilityBitfield { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AvailabilityBitfield(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for AvailabilityBitfield { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AvailabilityBitfield(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AvailabilityBitfield { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "AvailabilityBitfield", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BackedCandidate<_0> { - pub candidate: runtime_types::polkadot_primitives::v4::CommittedCandidateReceipt< - _0, - >, - pub validity_votes: ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::ValidityAttestation, - >, - pub validator_indices: ::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for BackedCandidate<_0> - where - runtime_types::polkadot_primitives::v4::CommittedCandidateReceipt< - _0, - >: ::subxt::ext::codec::Decode, - runtime_types::polkadot_primitives::v4::CommittedCandidateReceipt< - _0, - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(BackedCandidate::<_0> { - candidate: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BackedCandidate::candidate`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validity_votes: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_primitives::v4::ValidityAttestation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `BackedCandidate::validity_votes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validator_indices: { - let __codec_res_edqy = <::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BackedCandidate::validator_indices`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for BackedCandidate<_0> - where - runtime_types::polkadot_primitives::v4::CommittedCandidateReceipt< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::polkadot_primitives::v4::CommittedCandidateReceipt< - _0, - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.candidate), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.validity_votes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.validator_indices, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.candidate, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validity_votes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validator_indices, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for BackedCandidate<_0> - where - runtime_types::polkadot_primitives::v4::CommittedCandidateReceipt< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::polkadot_primitives::v4::CommittedCandidateReceipt< - _0, - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for BackedCandidate<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BackedCandidate<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BackedCandidate { - candidate: { - let val = *vals - .get(&Some("candidate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "candidate".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("candidate"))? - }, - validity_votes: { - let val = *vals - .get(&Some("validity_votes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validity_votes".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validity_votes"))? - }, - validator_indices: { - let val = *vals - .get(&Some("validator_indices")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator_indices".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_indices"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(BackedCandidate { - candidate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("candidate"))? - }, - validity_votes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validity_votes"))? - }, - validator_indices: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_indices"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for BackedCandidate<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for BackedCandidate<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BackedCandidate { - candidate, - validity_votes, - validator_indices, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("candidate"), - candidate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validity_votes"), - validity_votes - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_indices"), - validator_indices - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for BackedCandidate<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BackedCandidate { - candidate, - validity_votes, - validator_indices, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("candidate"), - candidate as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validity_votes"), - validity_votes - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_indices"), - validator_indices - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for BackedCandidate<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "BackedCandidate", - "candidate", - &self.candidate, - "validity_votes", - &self.validity_votes, - "validator_indices", - &&self.validator_indices, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CandidateCommitments<_0> { - pub upward_messages: runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::std::vec::Vec<::core::primitive::u8>, - >, - pub horizontal_messages: runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::polkadot_core_primitives::OutboundHrmpMessage< - runtime_types::polkadot_parachain::primitives::Id, - >, - >, - pub new_validation_code: ::core::option::Option< - runtime_types::polkadot_parachain::primitives::ValidationCode, - >, - pub head_data: runtime_types::polkadot_parachain::primitives::HeadData, - pub processed_downward_messages: ::core::primitive::u32, - pub hrmp_watermark: _0, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for CandidateCommitments<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CandidateCommitments::<_0> { - upward_messages: { - let __codec_res_edqy = , - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidateCommitments::upward_messages`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - horizontal_messages: { - let __codec_res_edqy = , - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidateCommitments::horizontal_messages`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_validation_code: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::polkadot_parachain::primitives::ValidationCode, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidateCommitments::new_validation_code`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - head_data: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `CandidateCommitments::head_data`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - processed_downward_messages: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidateCommitments::processed_downward_messages`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hrmp_watermark: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidateCommitments::hrmp_watermark`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for CandidateCommitments<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.upward_messages, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.horizontal_messages, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.new_validation_code, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.head_data), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.processed_downward_messages, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.hrmp_watermark), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.upward_messages, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.horizontal_messages, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.new_validation_code, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.head_data, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.processed_downward_messages, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hrmp_watermark, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike - for CandidateCommitments<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for CandidateCommitments<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CandidateCommitments<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CandidateCommitments { - upward_messages: { - let val = *vals - .get(&Some("upward_messages")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "upward_messages".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("upward_messages"))? - }, - horizontal_messages: { - let val = *vals - .get(&Some("horizontal_messages")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "horizontal_messages".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("horizontal_messages"))? - }, - new_validation_code: { - let val = *vals - .get(&Some("new_validation_code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_validation_code".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("new_validation_code"))? - }, - head_data: { - let val = *vals - .get(&Some("head_data")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "head_data".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("head_data"))? - }, - processed_downward_messages: { - let val = *vals - .get(&Some("processed_downward_messages")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "processed_downward_messages".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("processed_downward_messages"))? - }, - hrmp_watermark: { - let val = *vals - .get(&Some("hrmp_watermark")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hrmp_watermark".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("hrmp_watermark"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = value; - Ok(CandidateCommitments { - upward_messages: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("upward_messages"))? - }, - horizontal_messages: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("horizontal_messages"))? - }, - new_validation_code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("new_validation_code"))? - }, - head_data: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("head_data"))? - }, - processed_downward_messages: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("processed_downward_messages"))? - }, - hrmp_watermark: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("hrmp_watermark"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for CandidateCommitments<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for CandidateCommitments<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidateCommitments { - upward_messages, - horizontal_messages, - new_validation_code, - head_data, - processed_downward_messages, - hrmp_watermark, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("upward_messages"), - upward_messages - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("horizontal_messages"), - horizontal_messages - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_validation_code"), - new_validation_code - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("head_data"), - head_data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("processed_downward_messages"), - processed_downward_messages - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_watermark"), - hrmp_watermark - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for CandidateCommitments<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidateCommitments { - upward_messages, - horizontal_messages, - new_validation_code, - head_data, - processed_downward_messages, - hrmp_watermark, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("upward_messages"), - upward_messages - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("horizontal_messages"), - horizontal_messages - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_validation_code"), - new_validation_code - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("head_data"), - head_data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("processed_downward_messages"), - processed_downward_messages - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_watermark"), - hrmp_watermark - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for CandidateCommitments<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "upward_messages", - "horizontal_messages", - "new_validation_code", - "head_data", - "processed_downward_messages", - "hrmp_watermark", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.upward_messages, - &self.horizontal_messages, - &self.new_validation_code, - &self.head_data, - &self.processed_downward_messages, - &&self.hrmp_watermark, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "CandidateCommitments", - names, - values, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CandidateDescriptor<_0> { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub relay_parent: _0, - pub collator: runtime_types::polkadot_primitives::v4::collator_app::Public, - pub persisted_validation_data_hash: ::subxt::utils::H256, - pub pov_hash: ::subxt::utils::H256, - pub erasure_root: ::subxt::utils::H256, - pub signature: runtime_types::polkadot_primitives::v4::collator_app::Signature, - pub para_head: ::subxt::utils::H256, - pub validation_code_hash: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for CandidateDescriptor<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CandidateDescriptor::<_0> { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateDescriptor::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - relay_parent: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidateDescriptor::relay_parent`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - collator: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateDescriptor::collator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - persisted_validation_data_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidateDescriptor::persisted_validation_data_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pov_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateDescriptor::pov_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - erasure_root: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidateDescriptor::erasure_root`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - signature: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateDescriptor::signature`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - para_head: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateDescriptor::para_head`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validation_code_hash: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidateDescriptor::validation_code_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for CandidateDescriptor<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.relay_parent), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.collator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.persisted_validation_data_hash, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pov_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.erasure_root), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.signature), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para_head), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.validation_code_hash, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.relay_parent, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.collator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.persisted_validation_data_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.pov_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.erasure_root, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.signature, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.para_head, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validation_code_hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike - for CandidateDescriptor<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for CandidateDescriptor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CandidateDescriptor<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CandidateDescriptor { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - relay_parent: { - let val = *vals - .get(&Some("relay_parent")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "relay_parent".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("relay_parent"))? - }, - collator: { - let val = *vals - .get(&Some("collator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "collator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("collator"))? - }, - persisted_validation_data_hash: { - let val = *vals - .get(&Some("persisted_validation_data_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "persisted_validation_data_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("persisted_validation_data_hash"))? - }, - pov_hash: { - let val = *vals - .get(&Some("pov_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pov_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("pov_hash"))? - }, - erasure_root: { - let val = *vals - .get(&Some("erasure_root")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "erasure_root".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("erasure_root"))? - }, - signature: { - let val = *vals - .get(&Some("signature")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "signature".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - para_head: { - let val = *vals - .get(&Some("para_head")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_head".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_head"))? - }, - validation_code_hash: { - let val = *vals - .get(&Some("validation_code_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validation_code_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 9usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 9usize, - }), - ); - } - let vals = value; - Ok(CandidateDescriptor { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - relay_parent: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("relay_parent"))? - }, - collator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("collator"))? - }, - persisted_validation_data_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("persisted_validation_data_hash"))? - }, - pov_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("pov_hash"))? - }, - erasure_root: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("erasure_root"))? - }, - signature: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - para_head: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_head"))? - }, - validation_code_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code_hash"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for CandidateDescriptor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for CandidateDescriptor<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidateDescriptor { - para_id, - relay_parent, - collator, - persisted_validation_data_hash, - pov_hash, - erasure_root, - signature, - para_head, - validation_code_hash, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("relay_parent"), - relay_parent - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("collator"), - collator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("persisted_validation_data_hash"), - persisted_validation_data_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pov_hash"), - pov_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("erasure_root"), - erasure_root - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("signature"), - signature as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("para_head"), - para_head as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validation_code_hash"), - validation_code_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for CandidateDescriptor<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidateDescriptor { - para_id, - relay_parent, - collator, - persisted_validation_data_hash, - pov_hash, - erasure_root, - signature, - para_head, - validation_code_hash, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("relay_parent"), - relay_parent - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("collator"), - collator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("persisted_validation_data_hash"), - persisted_validation_data_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pov_hash"), - pov_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("erasure_root"), - erasure_root - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("signature"), - signature as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("para_head"), - para_head as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validation_code_hash"), - validation_code_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for CandidateDescriptor<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "para_id", - "relay_parent", - "collator", - "persisted_validation_data_hash", - "pov_hash", - "erasure_root", - "signature", - "para_head", - "validation_code_hash", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.para_id, - &self.relay_parent, - &self.collator, - &self.persisted_validation_data_hash, - &self.pov_hash, - &self.erasure_root, - &self.signature, - &self.para_head, - &&self.validation_code_hash, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "CandidateDescriptor", - names, - values, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CandidateReceipt<_0> { - pub descriptor: runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >, - pub commitments_hash: ::subxt::utils::H256, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for CandidateReceipt<_0> - where - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Decode, - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CandidateReceipt::<_0> { - descriptor: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CandidateReceipt::descriptor`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - commitments_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidateReceipt::commitments_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for CandidateReceipt<_0> - where - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.descriptor), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.commitments_hash, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.descriptor, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.commitments_hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for CandidateReceipt<_0> - where - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for CandidateReceipt<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CandidateReceipt<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CandidateReceipt { - descriptor: { - let val = *vals - .get(&Some("descriptor")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "descriptor".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("descriptor"))? - }, - commitments_hash: { - let val = *vals - .get(&Some("commitments_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "commitments_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("commitments_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(CandidateReceipt { - descriptor: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("descriptor"))? - }, - commitments_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("commitments_hash"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for CandidateReceipt<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for CandidateReceipt<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidateReceipt { descriptor, commitments_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("descriptor"), - descriptor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("commitments_hash"), - commitments_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for CandidateReceipt<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidateReceipt { descriptor, commitments_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("descriptor"), - descriptor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("commitments_hash"), - commitments_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for CandidateReceipt<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "CandidateReceipt", - "descriptor", - &self.descriptor, - "commitments_hash", - &&self.commitments_hash, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CommittedCandidateReceipt<_0> { - pub descriptor: runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >, - pub commitments: runtime_types::polkadot_primitives::v4::CandidateCommitments< - ::core::primitive::u32, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode - for CommittedCandidateReceipt<_0> - where - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Decode, - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CommittedCandidateReceipt::<_0> { - descriptor: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CommittedCandidateReceipt::descriptor`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - commitments: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CommittedCandidateReceipt::commitments`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode - for CommittedCandidateReceipt<_0> - where - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.descriptor), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.commitments), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.descriptor, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.commitments, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike - for CommittedCandidateReceipt<_0> - where - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for CommittedCandidateReceipt<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CommittedCandidateReceipt<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CommittedCandidateReceipt { - descriptor: { - let val = *vals - .get(&Some("descriptor")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "descriptor".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("descriptor"))? - }, - commitments: { - let val = *vals - .get(&Some("commitments")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "commitments".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("commitments"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(CommittedCandidateReceipt { - descriptor: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("descriptor"))? - }, - commitments: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("commitments"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for CommittedCandidateReceipt<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for CommittedCandidateReceipt<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CommittedCandidateReceipt { descriptor, commitments } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("descriptor"), - descriptor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("commitments"), - commitments as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for CommittedCandidateReceipt<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CommittedCandidateReceipt { descriptor, commitments } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("descriptor"), - descriptor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("commitments"), - commitments as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for CommittedCandidateReceipt<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "CommittedCandidateReceipt", - "descriptor", - &self.descriptor, - "commitments", - &&self.commitments, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CoreIndex(pub ::core::primitive::u32); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for CoreIndex { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.0 - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - CoreIndex, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CoreIndex(x)) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for CoreIndex { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> CoreIndex { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CoreIndex { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - CoreIndex({ - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CoreIndex.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CoreIndex { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CoreIndex {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CoreIndex { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CoreIndex; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - CoreIndex({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for CoreIndex { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CoreIndex { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CoreIndex(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CoreIndex { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CoreIndex(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CoreIndex { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "CoreIndex", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum CoreOccupied { - #[codec(index = 0)] - Parathread( - runtime_types::polkadot_primitives::v4::ParathreadEntry, - ), - #[codec(index = 1)] - Parachain, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CoreOccupied { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `CoreOccupied`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - CoreOccupied::Parathread({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CoreOccupied::Parathread.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(CoreOccupied::Parachain) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `CoreOccupied`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CoreOccupied { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - CoreOccupied::Parathread(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - CoreOccupied::Parachain => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - CoreOccupied::Parathread(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - CoreOccupied::Parachain => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CoreOccupied {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CoreOccupied { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CoreOccupied; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Parathread" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - CoreOccupied::Parathread({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Parachain" { - return Ok(CoreOccupied::Parachain); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Parathread", "Parachain"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CoreOccupied { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Parathread(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Parathread", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Parachain => { - ::subxt::ext::scale_encode::Variant { - name: "Parachain", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CoreOccupied { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - CoreOccupied::Parathread(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Parathread", - &__self_0, - ) - } - CoreOccupied::Parachain => { - ::core::fmt::Formatter::write_str(f, "Parachain") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DisputeState<_0> { - pub validators_for: ::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::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>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for DisputeState<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(DisputeState::<_0> { - validators_for: { - let __codec_res_edqy = <::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DisputeState::validators_for`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validators_against: { - let __codec_res_edqy = <::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `DisputeState::validators_against`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - start: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DisputeState::start`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - concluded_at: { - let __codec_res_edqy = <::core::option::Option< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DisputeState::concluded_at`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for DisputeState<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.validators_for), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.validators_against, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.start), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.concluded_at), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.validators_for, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validators_against, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.start, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.concluded_at, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for DisputeState<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for DisputeState<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DisputeState<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DisputeState { - validators_for: { - let val = *vals - .get(&Some("validators_for")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validators_for".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validators_for"))? - }, - validators_against: { - let val = *vals - .get(&Some("validators_against")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validators_against".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validators_against"))? - }, - start: { - let val = *vals - .get(&Some("start")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "start".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("start"))? - }, - concluded_at: { - let val = *vals - .get(&Some("concluded_at")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "concluded_at".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("concluded_at"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(DisputeState { - validators_for: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validators_for"))? - }, - validators_against: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validators_against"))? - }, - start: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("start"))? - }, - concluded_at: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("concluded_at"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for DisputeState<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for DisputeState<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DisputeState { - validators_for, - validators_against, - start, - concluded_at, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validators_for"), - validators_for - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validators_against"), - validators_against - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("start"), - start as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("concluded_at"), - concluded_at - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for DisputeState<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DisputeState { - validators_for, - validators_against, - start, - concluded_at, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validators_for"), - validators_for - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validators_against"), - validators_against - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("start"), - start as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("concluded_at"), - concluded_at - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for DisputeState<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "DisputeState", - "validators_for", - &self.validators_for, - "validators_against", - &self.validators_against, - "start", - &self.start, - "concluded_at", - &&self.concluded_at, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum DisputeStatement { - #[codec(index = 0)] - Valid( - runtime_types::polkadot_primitives::v4::ValidDisputeStatementKind, - ), - #[codec(index = 1)] - Invalid( - runtime_types::polkadot_primitives::v4::InvalidDisputeStatementKind, - ), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DisputeStatement { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `DisputeStatement`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - DisputeStatement::Valid({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DisputeStatement::Valid.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - DisputeStatement::Invalid({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DisputeStatement::Invalid.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `DisputeStatement`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DisputeStatement { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - DisputeStatement::Valid(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - DisputeStatement::Invalid(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - DisputeStatement::Valid(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - DisputeStatement::Invalid(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DisputeStatement {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for DisputeStatement { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DisputeStatement; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Valid" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - DisputeStatement::Valid({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Invalid" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - DisputeStatement::Invalid({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Valid", "Invalid"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DisputeStatement { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Valid(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Valid", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Invalid(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Invalid", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DisputeStatement { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - DisputeStatement::Valid(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Valid", - &__self_0, - ) - } - DisputeStatement::Invalid(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Invalid", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DisputeStatementSet { - pub candidate_hash: runtime_types::polkadot_core_primitives::CandidateHash, - pub session: ::core::primitive::u32, - pub statements: ::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::DisputeStatement, - runtime_types::polkadot_primitives::v4::ValidatorIndex, - runtime_types::polkadot_primitives::v4::validator_app::Signature, - ), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DisputeStatementSet { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(DisputeStatementSet { - candidate_hash: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `DisputeStatementSet::candidate_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - session: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DisputeStatementSet::session`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - statements: { - let __codec_res_edqy = <::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::DisputeStatement, - runtime_types::polkadot_primitives::v4::ValidatorIndex, - runtime_types::polkadot_primitives::v4::validator_app::Signature, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `DisputeStatementSet::statements`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DisputeStatementSet { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.candidate_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.session), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.statements), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.candidate_hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.session, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.statements, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DisputeStatementSet {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for DisputeStatementSet { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DisputeStatementSet; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DisputeStatementSet { - candidate_hash: { - let val = *vals - .get(&Some("candidate_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "candidate_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("candidate_hash"))? - }, - session: { - let val = *vals - .get(&Some("session")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "session".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("session"))? - }, - statements: { - let val = *vals - .get(&Some("statements")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "statements".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("statements"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(DisputeStatementSet { - candidate_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("candidate_hash"))? - }, - session: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("session"))? - }, - statements: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("statements"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for DisputeStatementSet { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for DisputeStatementSet { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DisputeStatementSet { - candidate_hash, - session, - statements, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("candidate_hash"), - candidate_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("session"), - session as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("statements"), - statements as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for DisputeStatementSet { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DisputeStatementSet { - candidate_hash, - session, - statements, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("candidate_hash"), - candidate_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("session"), - session as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("statements"), - statements as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DisputeStatementSet { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "DisputeStatementSet", - "candidate_hash", - &self.candidate_hash, - "session", - &self.session, - "statements", - &&self.statements, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct GroupIndex(pub ::core::primitive::u32); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for GroupIndex { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.0 - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - GroupIndex, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(GroupIndex(x)) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for GroupIndex { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> GroupIndex { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for GroupIndex { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - GroupIndex({ - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `GroupIndex.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for GroupIndex { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for GroupIndex {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for GroupIndex { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = GroupIndex; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - GroupIndex({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for GroupIndex { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for GroupIndex { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let GroupIndex(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for GroupIndex { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let GroupIndex(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for GroupIndex { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "GroupIndex", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IndexedVec<_0, _1>( - pub ::std::vec::Vec<_1>, - #[codec(skip)] - pub ::core::marker::PhantomData<_0>, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for IndexedVec<_0, _1> - where - ::std::vec::Vec<_1>: ::subxt::ext::codec::Decode, - ::std::vec::Vec<_1>: ::subxt::ext::codec::Decode, - ::core::marker::PhantomData<_0>: Default, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - IndexedVec::< - _0, - _1, - >( - { - let __codec_res_edqy = <::std::vec::Vec< - _1, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `IndexedVec.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ::core::default::Default::default(), - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for IndexedVec<_0, _1> - where - ::std::vec::Vec<_1>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_1>: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for IndexedVec<_0, _1> - where - ::std::vec::Vec<_1>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_1>: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>( - ::core::marker::PhantomData<(_0, _1)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for IndexedVec<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = IndexedVec<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - IndexedVec( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - ::core::default::Default::default(), - ), - ) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for IndexedVec<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for IndexedVec<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IndexedVec(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for IndexedVec<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let IndexedVec(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - > ::core::fmt::Debug for IndexedVec<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "IndexedVec", - &self.0, - &&self.1, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InherentData<_0> { - pub bitfields: ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::signed::UncheckedSigned< - runtime_types::polkadot_primitives::v4::AvailabilityBitfield, - runtime_types::polkadot_primitives::v4::AvailabilityBitfield, - >, - >, - pub backed_candidates: ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::BackedCandidate< - ::subxt::utils::H256, - >, - >, - pub disputes: ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::DisputeStatementSet, - >, - pub parent_header: _0, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for InherentData<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(InherentData::<_0> { - bitfields: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_primitives::v4::signed::UncheckedSigned< - runtime_types::polkadot_primitives::v4::AvailabilityBitfield, - runtime_types::polkadot_primitives::v4::AvailabilityBitfield, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `InherentData::bitfields`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - backed_candidates: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_primitives::v4::BackedCandidate< - ::subxt::utils::H256, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `InherentData::backed_candidates`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - disputes: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_primitives::v4::DisputeStatementSet, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `InherentData::disputes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - parent_header: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `InherentData::parent_header`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for InherentData<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.bitfields), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.backed_candidates, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.disputes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.parent_header), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.bitfields, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.backed_candidates, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.disputes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.parent_header, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for InherentData<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for InherentData<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = InherentData<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(InherentData { - bitfields: { - let val = *vals - .get(&Some("bitfields")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bitfields".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bitfields"))? - }, - backed_candidates: { - let val = *vals - .get(&Some("backed_candidates")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "backed_candidates".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("backed_candidates"))? - }, - disputes: { - let val = *vals - .get(&Some("disputes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "disputes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("disputes"))? - }, - parent_header: { - let val = *vals - .get(&Some("parent_header")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parent_header".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_header"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(InherentData { - bitfields: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bitfields"))? - }, - backed_candidates: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("backed_candidates"))? - }, - disputes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("disputes"))? - }, - parent_header: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parent_header"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for InherentData<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for InherentData<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let InherentData { - bitfields, - backed_candidates, - disputes, - parent_header, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bitfields"), - bitfields as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("backed_candidates"), - backed_candidates - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("disputes"), - disputes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("parent_header"), - parent_header - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for InherentData<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let InherentData { - bitfields, - backed_candidates, - disputes, - parent_header, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bitfields"), - bitfields as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("backed_candidates"), - backed_candidates - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("disputes"), - disputes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("parent_header"), - parent_header - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for InherentData<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "InherentData", - "bitfields", - &self.bitfields, - "backed_candidates", - &self.backed_candidates, - "disputes", - &self.disputes, - "parent_header", - &&self.parent_header, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum InvalidDisputeStatementKind { - #[codec(index = 0)] - Explicit, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode - for InvalidDisputeStatementKind { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `InvalidDisputeStatementKind`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - InvalidDisputeStatementKind::Explicit, - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `InvalidDisputeStatementKind`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode - for InvalidDisputeStatementKind { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - InvalidDisputeStatementKind::Explicit => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - InvalidDisputeStatementKind::Explicit => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for InvalidDisputeStatementKind {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for InvalidDisputeStatementKind { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = InvalidDisputeStatementKind; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Explicit" { - return Ok(InvalidDisputeStatementKind::Explicit); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Explicit"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for InvalidDisputeStatementKind { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Explicit => { - ::subxt::ext::scale_encode::Variant { - name: "Explicit", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for InvalidDisputeStatementKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "Explicit") - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ParathreadClaim( - pub runtime_types::polkadot_parachain::primitives::Id, - pub runtime_types::polkadot_primitives::v4::collator_app::Public, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ParathreadClaim { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - ParathreadClaim( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ParathreadClaim.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ParathreadClaim.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ParathreadClaim { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.0), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.1), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.0, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.1, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ParathreadClaim {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ParathreadClaim { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ParathreadClaim; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok( - ParathreadClaim( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ParathreadClaim { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ParathreadClaim { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ParathreadClaim(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ParathreadClaim { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ParathreadClaim(_0, _1) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ParathreadClaim { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "ParathreadClaim", - &self.0, - &&self.1, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ParathreadEntry { - pub claim: runtime_types::polkadot_primitives::v4::ParathreadClaim, - pub retries: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ParathreadEntry { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ParathreadEntry { - claim: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ParathreadEntry::claim`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - retries: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ParathreadEntry::retries`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ParathreadEntry { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.claim), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.retries), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.claim, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.retries, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ParathreadEntry {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ParathreadEntry { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ParathreadEntry; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ParathreadEntry { - claim: { - let val = *vals - .get(&Some("claim")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "claim".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("claim"))? - }, - retries: { - let val = *vals - .get(&Some("retries")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "retries".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("retries"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ParathreadEntry { - claim: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("claim"))? - }, - retries: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("retries"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ParathreadEntry { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ParathreadEntry { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ParathreadEntry { claim, retries } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("claim"), - claim as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("retries"), - retries as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ParathreadEntry { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ParathreadEntry { claim, retries } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("claim"), - claim as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("retries"), - retries as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ParathreadEntry { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ParathreadEntry", - "claim", - &self.claim, - "retries", - &&self.retries, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PvfCheckStatement { - pub accept: ::core::primitive::bool, - pub subject: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - pub session_index: ::core::primitive::u32, - pub validator_index: runtime_types::polkadot_primitives::v4::ValidatorIndex, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PvfCheckStatement { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(PvfCheckStatement { - accept: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PvfCheckStatement::accept`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - subject: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PvfCheckStatement::subject`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - session_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `PvfCheckStatement::session_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validator_index: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `PvfCheckStatement::validator_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PvfCheckStatement { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.accept), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.subject), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.session_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.validator_index, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.accept, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.subject, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.session_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validator_index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PvfCheckStatement {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for PvfCheckStatement { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PvfCheckStatement; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PvfCheckStatement { - accept: { - let val = *vals - .get(&Some("accept")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "accept".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("accept"))? - }, - subject: { - let val = *vals - .get(&Some("subject")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "subject".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("subject"))? - }, - session_index: { - let val = *vals - .get(&Some("session_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "session_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("session_index"))? - }, - validator_index: { - let val = *vals - .get(&Some("validator_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(PvfCheckStatement { - accept: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("accept"))? - }, - subject: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("subject"))? - }, - session_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("session_index"))? - }, - validator_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PvfCheckStatement { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PvfCheckStatement { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PvfCheckStatement { - accept, - subject, - session_index, - validator_index, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("accept"), - accept as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("subject"), - subject as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("session_index"), - session_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_index"), - validator_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for PvfCheckStatement { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PvfCheckStatement { - accept, - subject, - session_index, - validator_index, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("accept"), - accept as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("subject"), - subject as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("session_index"), - session_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_index"), - validator_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PvfCheckStatement { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "PvfCheckStatement", - "accept", - &self.accept, - "subject", - &self.subject, - "session_index", - &self.session_index, - "validator_index", - &&self.validator_index, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum PvfExecTimeoutKind { - #[codec(index = 0)] - Backing, - #[codec(index = 1)] - Approval, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PvfExecTimeoutKind { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `PvfExecTimeoutKind`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(PvfExecTimeoutKind::Backing) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(PvfExecTimeoutKind::Approval) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `PvfExecTimeoutKind`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PvfExecTimeoutKind { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - PvfExecTimeoutKind::Backing => 0_usize, - PvfExecTimeoutKind::Approval => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - PvfExecTimeoutKind::Backing => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - PvfExecTimeoutKind::Approval => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PvfExecTimeoutKind {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for PvfExecTimeoutKind { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PvfExecTimeoutKind; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Backing" { - return Ok(PvfExecTimeoutKind::Backing); - } - if value.name() == "Approval" { - return Ok(PvfExecTimeoutKind::Approval); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Backing", "Approval"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for PvfExecTimeoutKind { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Backing => { - ::subxt::ext::scale_encode::Variant { - name: "Backing", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Approval => { - ::subxt::ext::scale_encode::Variant { - name: "Approval", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PvfExecTimeoutKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - PvfExecTimeoutKind::Backing => "Backing", - PvfExecTimeoutKind::Approval => "Approval", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum PvfPrepTimeoutKind { - #[codec(index = 0)] - Precheck, - #[codec(index = 1)] - Lenient, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PvfPrepTimeoutKind { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `PvfPrepTimeoutKind`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(PvfPrepTimeoutKind::Precheck) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(PvfPrepTimeoutKind::Lenient) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `PvfPrepTimeoutKind`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PvfPrepTimeoutKind { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - PvfPrepTimeoutKind::Precheck => 0_usize, - PvfPrepTimeoutKind::Lenient => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - PvfPrepTimeoutKind::Precheck => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - PvfPrepTimeoutKind::Lenient => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PvfPrepTimeoutKind {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for PvfPrepTimeoutKind { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PvfPrepTimeoutKind; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Precheck" { - return Ok(PvfPrepTimeoutKind::Precheck); - } - if value.name() == "Lenient" { - return Ok(PvfPrepTimeoutKind::Lenient); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Precheck", "Lenient"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for PvfPrepTimeoutKind { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Precheck => { - ::subxt::ext::scale_encode::Variant { - name: "Precheck", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Lenient => { - ::subxt::ext::scale_encode::Variant { - name: "Lenient", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PvfPrepTimeoutKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - PvfPrepTimeoutKind::Precheck => "Precheck", - PvfPrepTimeoutKind::Lenient => "Lenient", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScrapedOnChainVotes<_0> { - pub session: ::core::primitive::u32, - pub backing_validators_per_candidate: ::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::CandidateReceipt< - _0, - >, - ::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::ValidatorIndex, - runtime_types::polkadot_primitives::v4::ValidityAttestation, - ), - >, - ), - >, - pub disputes: ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::DisputeStatementSet, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for ScrapedOnChainVotes<_0> - where - ::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::CandidateReceipt< - _0, - >, - ::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::ValidatorIndex, - runtime_types::polkadot_primitives::v4::ValidityAttestation, - ), - >, - ), - >: ::subxt::ext::codec::Decode, - ::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::CandidateReceipt< - _0, - >, - ::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::ValidatorIndex, - runtime_types::polkadot_primitives::v4::ValidityAttestation, - ), - >, - ), - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ScrapedOnChainVotes::<_0> { - session: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScrapedOnChainVotes::session`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - backing_validators_per_candidate: { - let __codec_res_edqy = <::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::CandidateReceipt< - _0, - >, - ::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::ValidatorIndex, - runtime_types::polkadot_primitives::v4::ValidityAttestation, - ), - >, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ScrapedOnChainVotes::backing_validators_per_candidate`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - disputes: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_primitives::v4::DisputeStatementSet, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ScrapedOnChainVotes::disputes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for ScrapedOnChainVotes<_0> - where - ::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::CandidateReceipt< - _0, - >, - ::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::ValidatorIndex, - runtime_types::polkadot_primitives::v4::ValidityAttestation, - ), - >, - ), - >: ::subxt::ext::codec::Encode, - ::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::CandidateReceipt< - _0, - >, - ::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::ValidatorIndex, - runtime_types::polkadot_primitives::v4::ValidityAttestation, - ), - >, - ), - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.session), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.backing_validators_per_candidate, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.disputes), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.session, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.backing_validators_per_candidate, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.disputes, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike - for ScrapedOnChainVotes<_0> - where - ::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::CandidateReceipt< - _0, - >, - ::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::ValidatorIndex, - runtime_types::polkadot_primitives::v4::ValidityAttestation, - ), - >, - ), - >: ::subxt::ext::codec::Encode, - ::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::CandidateReceipt< - _0, - >, - ::std::vec::Vec< - ( - runtime_types::polkadot_primitives::v4::ValidatorIndex, - runtime_types::polkadot_primitives::v4::ValidityAttestation, - ), - >, - ), - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for ScrapedOnChainVotes<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ScrapedOnChainVotes<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ScrapedOnChainVotes { - session: { - let val = *vals - .get(&Some("session")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "session".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("session"))? - }, - backing_validators_per_candidate: { - let val = *vals - .get(&Some("backing_validators_per_candidate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "backing_validators_per_candidate".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| { - e.at_field("backing_validators_per_candidate") - })? - }, - disputes: { - let val = *vals - .get(&Some("disputes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "disputes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("disputes"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(ScrapedOnChainVotes { - session: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("session"))? - }, - backing_validators_per_candidate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| { - e.at_field("backing_validators_per_candidate") - })? - }, - disputes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("disputes"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for ScrapedOnChainVotes<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for ScrapedOnChainVotes<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ScrapedOnChainVotes { - session, - backing_validators_per_candidate, - disputes, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("session"), - session as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("backing_validators_per_candidate"), - backing_validators_per_candidate - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("disputes"), - disputes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for ScrapedOnChainVotes<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ScrapedOnChainVotes { - session, - backing_validators_per_candidate, - disputes, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("session"), - session as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("backing_validators_per_candidate"), - backing_validators_per_candidate - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("disputes"), - disputes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for ScrapedOnChainVotes<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ScrapedOnChainVotes", - "session", - &self.session, - "backing_validators_per_candidate", - &self.backing_validators_per_candidate, - "disputes", - &&self.disputes, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SessionInfo { - pub active_validator_indices: ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::ValidatorIndex, - >, - pub random_seed: [::core::primitive::u8; 32usize], - pub dispute_period: ::core::primitive::u32, - pub validators: runtime_types::polkadot_primitives::v4::IndexedVec< - runtime_types::polkadot_primitives::v4::ValidatorIndex, - runtime_types::polkadot_primitives::v4::validator_app::Public, - >, - pub discovery_keys: ::std::vec::Vec< - runtime_types::sp_authority_discovery::app::Public, - >, - pub assignment_keys: ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::assignment_app::Public, - >, - pub validator_groups: runtime_types::polkadot_primitives::v4::IndexedVec< - runtime_types::polkadot_primitives::v4::GroupIndex, - ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SessionInfo { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SessionInfo { - active_validator_indices: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_primitives::v4::ValidatorIndex, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SessionInfo::active_validator_indices`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - random_seed: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SessionInfo::random_seed`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - dispute_period: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SessionInfo::dispute_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validators: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SessionInfo::validators`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - discovery_keys: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::sp_authority_discovery::app::Public, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SessionInfo::discovery_keys`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - assignment_keys: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_primitives::v4::assignment_app::Public, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SessionInfo::assignment_keys`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validator_groups: { - let __codec_res_edqy = , - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SessionInfo::validator_groups`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - n_cores: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SessionInfo::n_cores`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - zeroth_delay_tranche_width: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SessionInfo::zeroth_delay_tranche_width`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - relay_vrf_modulo_samples: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SessionInfo::relay_vrf_modulo_samples`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - n_delay_tranches: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SessionInfo::n_delay_tranches`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - no_show_slots: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SessionInfo::no_show_slots`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - needed_approvals: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SessionInfo::needed_approvals`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SessionInfo { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.active_validator_indices, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.random_seed), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.dispute_period), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.validators), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.discovery_keys), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.assignment_keys, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.validator_groups, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.n_cores), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.zeroth_delay_tranche_width, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.relay_vrf_modulo_samples, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.n_delay_tranches, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.no_show_slots), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.needed_approvals, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.active_validator_indices, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.random_seed, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.dispute_period, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validators, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.discovery_keys, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.assignment_keys, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validator_groups, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.n_cores, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.zeroth_delay_tranche_width, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.relay_vrf_modulo_samples, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.n_delay_tranches, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.no_show_slots, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.needed_approvals, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SessionInfo {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SessionInfo { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SessionInfo; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SessionInfo { - active_validator_indices: { - let val = *vals - .get(&Some("active_validator_indices")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "active_validator_indices".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("active_validator_indices"))? - }, - random_seed: { - let val = *vals - .get(&Some("random_seed")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "random_seed".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("random_seed"))? - }, - dispute_period: { - let val = *vals - .get(&Some("dispute_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dispute_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("dispute_period"))? - }, - validators: { - let val = *vals - .get(&Some("validators")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validators".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("validators"))? - }, - discovery_keys: { - let val = *vals - .get(&Some("discovery_keys")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "discovery_keys".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("discovery_keys"))? - }, - assignment_keys: { - let val = *vals - .get(&Some("assignment_keys")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assignment_keys".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("assignment_keys"))? - }, - validator_groups: { - let val = *vals - .get(&Some("validator_groups")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator_groups".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_groups"))? - }, - n_cores: { - let val = *vals - .get(&Some("n_cores")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "n_cores".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("n_cores"))? - }, - zeroth_delay_tranche_width: { - let val = *vals - .get(&Some("zeroth_delay_tranche_width")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "zeroth_delay_tranche_width".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("zeroth_delay_tranche_width"))? - }, - relay_vrf_modulo_samples: { - let val = *vals - .get(&Some("relay_vrf_modulo_samples")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "relay_vrf_modulo_samples".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("relay_vrf_modulo_samples"))? - }, - n_delay_tranches: { - let val = *vals - .get(&Some("n_delay_tranches")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "n_delay_tranches".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("n_delay_tranches"))? - }, - no_show_slots: { - let val = *vals - .get(&Some("no_show_slots")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "no_show_slots".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("no_show_slots"))? - }, - needed_approvals: { - let val = *vals - .get(&Some("needed_approvals")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "needed_approvals".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("needed_approvals"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 13usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 13usize, - }), - ); - } - let vals = value; - Ok(SessionInfo { - active_validator_indices: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("active_validator_indices"))? - }, - random_seed: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("random_seed"))? - }, - dispute_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("dispute_period"))? - }, - validators: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("validators"))? - }, - discovery_keys: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("discovery_keys"))? - }, - assignment_keys: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("assignment_keys"))? - }, - validator_groups: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_groups"))? - }, - n_cores: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("n_cores"))? - }, - zeroth_delay_tranche_width: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("zeroth_delay_tranche_width"))? - }, - relay_vrf_modulo_samples: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("relay_vrf_modulo_samples"))? - }, - n_delay_tranches: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("n_delay_tranches"))? - }, - no_show_slots: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("no_show_slots"))? - }, - needed_approvals: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("needed_approvals"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SessionInfo { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SessionInfo { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SessionInfo { - active_validator_indices, - random_seed, - dispute_period, - validators, - discovery_keys, - assignment_keys, - validator_groups, - n_cores, - zeroth_delay_tranche_width, - relay_vrf_modulo_samples, - n_delay_tranches, - no_show_slots, - needed_approvals, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("active_validator_indices"), - active_validator_indices - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("random_seed"), - random_seed as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dispute_period"), - dispute_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validators"), - validators as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("discovery_keys"), - discovery_keys - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assignment_keys"), - assignment_keys - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_groups"), - validator_groups - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("n_cores"), - n_cores as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("zeroth_delay_tranche_width"), - zeroth_delay_tranche_width - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("relay_vrf_modulo_samples"), - relay_vrf_modulo_samples - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("n_delay_tranches"), - n_delay_tranches - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("no_show_slots"), - no_show_slots - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("needed_approvals"), - needed_approvals - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SessionInfo { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SessionInfo { - active_validator_indices, - random_seed, - dispute_period, - validators, - discovery_keys, - assignment_keys, - validator_groups, - n_cores, - zeroth_delay_tranche_width, - relay_vrf_modulo_samples, - n_delay_tranches, - no_show_slots, - needed_approvals, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("active_validator_indices"), - active_validator_indices - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("random_seed"), - random_seed as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dispute_period"), - dispute_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validators"), - validators as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("discovery_keys"), - discovery_keys - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assignment_keys"), - assignment_keys - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_groups"), - validator_groups - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("n_cores"), - n_cores as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("zeroth_delay_tranche_width"), - zeroth_delay_tranche_width - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("relay_vrf_modulo_samples"), - relay_vrf_modulo_samples - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("n_delay_tranches"), - n_delay_tranches - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("no_show_slots"), - no_show_slots - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("needed_approvals"), - needed_approvals - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SessionInfo { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "active_validator_indices", - "random_seed", - "dispute_period", - "validators", - "discovery_keys", - "assignment_keys", - "validator_groups", - "n_cores", - "zeroth_delay_tranche_width", - "relay_vrf_modulo_samples", - "n_delay_tranches", - "no_show_slots", - "needed_approvals", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.active_validator_indices, - &self.random_seed, - &self.dispute_period, - &self.validators, - &self.discovery_keys, - &self.assignment_keys, - &self.validator_groups, - &self.n_cores, - &self.zeroth_delay_tranche_width, - &self.relay_vrf_modulo_samples, - &self.n_delay_tranches, - &self.no_show_slots, - &&self.needed_approvals, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "SessionInfo", - names, - values, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum UpgradeGoAhead { - #[codec(index = 0)] - Abort, - #[codec(index = 1)] - GoAhead, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for UpgradeGoAhead { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `UpgradeGoAhead`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(UpgradeGoAhead::Abort) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(UpgradeGoAhead::GoAhead) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `UpgradeGoAhead`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for UpgradeGoAhead { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - UpgradeGoAhead::Abort => 0_usize, - UpgradeGoAhead::GoAhead => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - UpgradeGoAhead::Abort => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - UpgradeGoAhead::GoAhead => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for UpgradeGoAhead {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for UpgradeGoAhead { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UpgradeGoAhead; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Abort" { - return Ok(UpgradeGoAhead::Abort); - } - if value.name() == "GoAhead" { - return Ok(UpgradeGoAhead::GoAhead); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Abort", "GoAhead"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for UpgradeGoAhead { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Abort => { - ::subxt::ext::scale_encode::Variant { - name: "Abort", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::GoAhead => { - ::subxt::ext::scale_encode::Variant { - name: "GoAhead", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for UpgradeGoAhead { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - UpgradeGoAhead::Abort => "Abort", - UpgradeGoAhead::GoAhead => "GoAhead", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum UpgradeRestriction { - #[codec(index = 0)] - Present, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for UpgradeRestriction { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `UpgradeRestriction`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(UpgradeRestriction::Present) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `UpgradeRestriction`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for UpgradeRestriction { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - UpgradeRestriction::Present => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - UpgradeRestriction::Present => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for UpgradeRestriction {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for UpgradeRestriction { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UpgradeRestriction; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Present" { - return Ok(UpgradeRestriction::Present); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Present"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for UpgradeRestriction { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Present => { - ::subxt::ext::scale_encode::Variant { - name: "Present", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for UpgradeRestriction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "Present") - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ValidDisputeStatementKind { - #[codec(index = 0)] - Explicit, - #[codec(index = 1)] - BackingSeconded(::subxt::utils::H256), - #[codec(index = 2)] - BackingValid(::subxt::utils::H256), - #[codec(index = 3)] - ApprovalChecking, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ValidDisputeStatementKind { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `ValidDisputeStatementKind`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ValidDisputeStatementKind::Explicit, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ValidDisputeStatementKind::BackingSeconded({ - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ValidDisputeStatementKind::BackingSeconded.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ValidDisputeStatementKind::BackingValid({ - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ValidDisputeStatementKind::BackingValid.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ValidDisputeStatementKind::ApprovalChecking, - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `ValidDisputeStatementKind`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ValidDisputeStatementKind { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - ValidDisputeStatementKind::Explicit => 0_usize, - ValidDisputeStatementKind::BackingSeconded(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - ValidDisputeStatementKind::BackingValid(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - ValidDisputeStatementKind::ApprovalChecking => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - ValidDisputeStatementKind::Explicit => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - ValidDisputeStatementKind::BackingSeconded(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - ValidDisputeStatementKind::BackingValid(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - ValidDisputeStatementKind::ApprovalChecking => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for ValidDisputeStatementKind {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ValidDisputeStatementKind { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ValidDisputeStatementKind; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Explicit" { - return Ok(ValidDisputeStatementKind::Explicit); - } - if value.name() == "BackingSeconded" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - ValidDisputeStatementKind::BackingSeconded({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "BackingValid" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - ValidDisputeStatementKind::BackingValid({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ApprovalChecking" { - return Ok(ValidDisputeStatementKind::ApprovalChecking); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Explicit", - "BackingSeconded", - "BackingValid", - "ApprovalChecking", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ValidDisputeStatementKind { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Explicit => { - ::subxt::ext::scale_encode::Variant { - name: "Explicit", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BackingSeconded(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "BackingSeconded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BackingValid(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "BackingValid", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ApprovalChecking => { - ::subxt::ext::scale_encode::Variant { - name: "ApprovalChecking", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ValidDisputeStatementKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - ValidDisputeStatementKind::Explicit => { - ::core::fmt::Formatter::write_str(f, "Explicit") - } - ValidDisputeStatementKind::BackingSeconded(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "BackingSeconded", - &__self_0, - ) - } - ValidDisputeStatementKind::BackingValid(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "BackingValid", - &__self_0, - ) - } - ValidDisputeStatementKind::ApprovalChecking => { - ::core::fmt::Formatter::write_str(f, "ApprovalChecking") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ValidatorIndex(pub ::core::primitive::u32); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for ValidatorIndex { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.0 - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - ValidatorIndex, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ValidatorIndex(x)) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for ValidatorIndex { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> ValidatorIndex { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ValidatorIndex { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - ValidatorIndex({ - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ValidatorIndex.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ValidatorIndex { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ValidatorIndex {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ValidatorIndex { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ValidatorIndex; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - ValidatorIndex({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ValidatorIndex { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ValidatorIndex { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ValidatorIndex(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ValidatorIndex { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ValidatorIndex(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ValidatorIndex { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ValidatorIndex", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ValidityAttestation { - #[codec(index = 1)] - Implicit( - runtime_types::polkadot_primitives::v4::validator_app::Signature, - ), - #[codec(index = 2)] - Explicit( - runtime_types::polkadot_primitives::v4::validator_app::Signature, - ), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ValidityAttestation { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `ValidityAttestation`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ValidityAttestation::Implicit({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `ValidityAttestation::Implicit.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ValidityAttestation::Explicit({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `ValidityAttestation::Explicit.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `ValidityAttestation`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ValidityAttestation { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - ValidityAttestation::Implicit(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - ValidityAttestation::Explicit(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - ValidityAttestation::Implicit(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - ValidityAttestation::Explicit(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ValidityAttestation {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ValidityAttestation { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ValidityAttestation; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Implicit" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - ValidityAttestation::Implicit({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Explicit" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - ValidityAttestation::Explicit({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Implicit", "Explicit"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ValidityAttestation { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Implicit(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Implicit", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Explicit(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Explicit", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ValidityAttestation { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - ValidityAttestation::Implicit(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Implicit", - &__self_0, - ) - } - ValidityAttestation::Explicit(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Explicit", - &__self_0, - ) - } - } - } - } - } - pub mod vstaging { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AsyncBackingParams { - pub max_candidate_depth: ::core::primitive::u32, - pub allowed_ancestry_len: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AsyncBackingParams { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AsyncBackingParams { - max_candidate_depth: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `AsyncBackingParams::max_candidate_depth`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - allowed_ancestry_len: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `AsyncBackingParams::allowed_ancestry_len`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AsyncBackingParams { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.max_candidate_depth, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.allowed_ancestry_len, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.max_candidate_depth, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.allowed_ancestry_len, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AsyncBackingParams {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for AsyncBackingParams { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AsyncBackingParams; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AsyncBackingParams { - max_candidate_depth: { - let val = *vals - .get(&Some("max_candidate_depth")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_candidate_depth".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_candidate_depth"))? - }, - allowed_ancestry_len: { - let val = *vals - .get(&Some("allowed_ancestry_len")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "allowed_ancestry_len".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("allowed_ancestry_len"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(AsyncBackingParams { - max_candidate_depth: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_candidate_depth"))? - }, - allowed_ancestry_len: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("allowed_ancestry_len"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for AsyncBackingParams { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for AsyncBackingParams { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AsyncBackingParams { - max_candidate_depth, - allowed_ancestry_len, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("max_candidate_depth"), - max_candidate_depth - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("allowed_ancestry_len"), - allowed_ancestry_len - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for AsyncBackingParams { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AsyncBackingParams { - max_candidate_depth, - allowed_ancestry_len, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("max_candidate_depth"), - max_candidate_depth - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("allowed_ancestry_len"), - allowed_ancestry_len - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AsyncBackingParams { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AsyncBackingParams", - "max_candidate_depth", - &self.max_candidate_depth, - "allowed_ancestry_len", - &&self.allowed_ancestry_len, - ) - } - } - } - } - pub mod polkadot_runtime { - use super::runtime_types; - pub mod governance { - use super::runtime_types; - pub mod origins { - use super::runtime_types; - pub mod pallet_custom_origins { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type( - crate_path = ":: subxt :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: scale_encode" - )] - pub enum Origin { - #[codec(index = 0)] - StakingAdmin, - #[codec(index = 1)] - Treasurer, - #[codec(index = 2)] - FellowshipAdmin, - #[codec(index = 3)] - GeneralAdmin, - #[codec(index = 4)] - AuctionAdmin, - #[codec(index = 5)] - LeaseAdmin, - #[codec(index = 6)] - ReferendumCanceller, - #[codec(index = 7)] - ReferendumKiller, - #[codec(index = 8)] - SmallTipper, - #[codec(index = 9)] - BigTipper, - #[codec(index = 10)] - SmallSpender, - #[codec(index = 11)] - MediumSpender, - #[codec(index = 12)] - BigSpender, - #[codec(index = 13)] - WhitelistedCaller, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Origin { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Origin`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Origin::StakingAdmin) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Origin::Treasurer) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Origin::FellowshipAdmin) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Origin::GeneralAdmin) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Origin::AuctionAdmin) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Origin::LeaseAdmin) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Origin::ReferendumCanceller) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Origin::ReferendumKiller) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Origin::SmallTipper) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Origin::BigTipper) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Origin::SmallSpender) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Origin::MediumSpender) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Origin::BigSpender) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Origin::WhitelistedCaller) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Origin`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Origin { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Origin::StakingAdmin => 0_usize, - Origin::Treasurer => 0_usize, - Origin::FellowshipAdmin => 0_usize, - Origin::GeneralAdmin => 0_usize, - Origin::AuctionAdmin => 0_usize, - Origin::LeaseAdmin => 0_usize, - Origin::ReferendumCanceller => 0_usize, - Origin::ReferendumKiller => 0_usize, - Origin::SmallTipper => 0_usize, - Origin::BigTipper => 0_usize, - Origin::SmallSpender => 0_usize, - Origin::MediumSpender => 0_usize, - Origin::BigSpender => 0_usize, - Origin::WhitelistedCaller => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Origin::StakingAdmin => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Origin::Treasurer => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Origin::FellowshipAdmin => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Origin::GeneralAdmin => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Origin::AuctionAdmin => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Origin::LeaseAdmin => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Origin::ReferendumCanceller => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Origin::ReferendumKiller => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Origin::SmallTipper => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Origin::BigTipper => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Origin::SmallSpender => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Origin::MediumSpender => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - Origin::BigSpender => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - Origin::WhitelistedCaller => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Origin {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Origin { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Origin; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "StakingAdmin" { - return Ok(Origin::StakingAdmin); - } - if value.name() == "Treasurer" { - return Ok(Origin::Treasurer); - } - if value.name() == "FellowshipAdmin" { - return Ok(Origin::FellowshipAdmin); - } - if value.name() == "GeneralAdmin" { - return Ok(Origin::GeneralAdmin); - } - if value.name() == "AuctionAdmin" { - return Ok(Origin::AuctionAdmin); - } - if value.name() == "LeaseAdmin" { - return Ok(Origin::LeaseAdmin); - } - if value.name() == "ReferendumCanceller" { - return Ok(Origin::ReferendumCanceller); - } - if value.name() == "ReferendumKiller" { - return Ok(Origin::ReferendumKiller); - } - if value.name() == "SmallTipper" { - return Ok(Origin::SmallTipper); - } - if value.name() == "BigTipper" { - return Ok(Origin::BigTipper); - } - if value.name() == "SmallSpender" { - return Ok(Origin::SmallSpender); - } - if value.name() == "MediumSpender" { - return Ok(Origin::MediumSpender); - } - if value.name() == "BigSpender" { - return Ok(Origin::BigSpender); - } - if value.name() == "WhitelistedCaller" { - return Ok(Origin::WhitelistedCaller); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "StakingAdmin", - "Treasurer", - "FellowshipAdmin", - "GeneralAdmin", - "AuctionAdmin", - "LeaseAdmin", - "ReferendumCanceller", - "ReferendumKiller", - "SmallTipper", - "BigTipper", - "SmallSpender", - "MediumSpender", - "BigSpender", - "WhitelistedCaller", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Origin { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::StakingAdmin => { - ::subxt::ext::scale_encode::Variant { - name: "StakingAdmin", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Treasurer => { - ::subxt::ext::scale_encode::Variant { - name: "Treasurer", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FellowshipAdmin => { - ::subxt::ext::scale_encode::Variant { - name: "FellowshipAdmin", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::GeneralAdmin => { - ::subxt::ext::scale_encode::Variant { - name: "GeneralAdmin", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AuctionAdmin => { - ::subxt::ext::scale_encode::Variant { - name: "AuctionAdmin", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LeaseAdmin => { - ::subxt::ext::scale_encode::Variant { - name: "LeaseAdmin", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReferendumCanceller => { - ::subxt::ext::scale_encode::Variant { - name: "ReferendumCanceller", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReferendumKiller => { - ::subxt::ext::scale_encode::Variant { - name: "ReferendumKiller", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SmallTipper => { - ::subxt::ext::scale_encode::Variant { - name: "SmallTipper", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BigTipper => { - ::subxt::ext::scale_encode::Variant { - name: "BigTipper", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SmallSpender => { - ::subxt::ext::scale_encode::Variant { - name: "SmallSpender", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MediumSpender => { - ::subxt::ext::scale_encode::Variant { - name: "MediumSpender", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BigSpender => { - ::subxt::ext::scale_encode::Variant { - name: "BigSpender", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WhitelistedCaller => { - ::subxt::ext::scale_encode::Variant { - name: "WhitelistedCaller", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Origin { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Origin::StakingAdmin => "StakingAdmin", - Origin::Treasurer => "Treasurer", - Origin::FellowshipAdmin => "FellowshipAdmin", - Origin::GeneralAdmin => "GeneralAdmin", - Origin::AuctionAdmin => "AuctionAdmin", - Origin::LeaseAdmin => "LeaseAdmin", - Origin::ReferendumCanceller => "ReferendumCanceller", - Origin::ReferendumKiller => "ReferendumKiller", - Origin::SmallTipper => "SmallTipper", - Origin::BigTipper => "BigTipper", - Origin::SmallSpender => "SmallSpender", - Origin::MediumSpender => "MediumSpender", - Origin::BigSpender => "BigSpender", - Origin::WhitelistedCaller => "WhitelistedCaller", - }, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NposCompactSolution16 { - 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>, - ), - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NposCompactSolution16 { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(NposCompactSolution16 { - votes1: { - let __codec_res_edqy = <::std::vec::Vec< - ( - ::subxt::ext::codec::Compact<::core::primitive::u32>, - ::subxt::ext::codec::Compact<::core::primitive::u16>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NposCompactSolution16::votes1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - votes2: { - let __codec_res_edqy = <::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>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NposCompactSolution16::votes2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - votes3: { - let __codec_res_edqy = <::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>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NposCompactSolution16::votes3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - votes4: { - let __codec_res_edqy = <::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>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NposCompactSolution16::votes4`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - votes5: { - let __codec_res_edqy = <::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>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NposCompactSolution16::votes5`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - votes6: { - let __codec_res_edqy = <::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>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NposCompactSolution16::votes6`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - votes7: { - let __codec_res_edqy = <::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>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NposCompactSolution16::votes7`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - votes8: { - let __codec_res_edqy = <::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>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NposCompactSolution16::votes8`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - votes9: { - let __codec_res_edqy = <::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>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NposCompactSolution16::votes9`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - votes10: { - let __codec_res_edqy = <::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>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NposCompactSolution16::votes10`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - votes11: { - let __codec_res_edqy = <::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>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NposCompactSolution16::votes11`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - votes12: { - let __codec_res_edqy = <::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>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NposCompactSolution16::votes12`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - votes13: { - let __codec_res_edqy = <::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>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NposCompactSolution16::votes13`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - votes14: { - let __codec_res_edqy = <::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>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NposCompactSolution16::votes14`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - votes15: { - let __codec_res_edqy = <::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>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NposCompactSolution16::votes15`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - votes16: { - let __codec_res_edqy = <::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>, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NposCompactSolution16::votes16`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NposCompactSolution16 { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes1), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes2), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes3), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes4), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes5), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes6), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes7), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes8), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes9), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes10), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes11), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes12), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes13), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes14), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes15), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes16), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.votes1, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.votes2, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.votes3, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.votes4, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.votes5, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.votes6, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.votes7, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.votes8, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.votes9, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.votes10, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.votes11, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.votes12, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.votes13, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.votes14, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.votes15, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.votes16, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NposCompactSolution16 {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for NposCompactSolution16 { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NposCompactSolution16; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(NposCompactSolution16 { - votes1: { - let val = *vals - .get(&Some("votes1")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes1".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes1"))? - }, - votes2: { - let val = *vals - .get(&Some("votes2")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes2".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes2"))? - }, - votes3: { - let val = *vals - .get(&Some("votes3")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes3".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes3"))? - }, - votes4: { - let val = *vals - .get(&Some("votes4")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes4".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes4"))? - }, - votes5: { - let val = *vals - .get(&Some("votes5")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes5".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes5"))? - }, - votes6: { - let val = *vals - .get(&Some("votes6")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes6".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes6"))? - }, - votes7: { - let val = *vals - .get(&Some("votes7")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes7".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes7"))? - }, - votes8: { - let val = *vals - .get(&Some("votes8")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes8".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes8"))? - }, - votes9: { - let val = *vals - .get(&Some("votes9")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes9".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes9"))? - }, - votes10: { - let val = *vals - .get(&Some("votes10")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes10".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes10"))? - }, - votes11: { - let val = *vals - .get(&Some("votes11")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes11".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes11"))? - }, - votes12: { - let val = *vals - .get(&Some("votes12")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes12".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes12"))? - }, - votes13: { - let val = *vals - .get(&Some("votes13")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes13".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes13"))? - }, - votes14: { - let val = *vals - .get(&Some("votes14")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes14".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes14"))? - }, - votes15: { - let val = *vals - .get(&Some("votes15")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes15".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes15"))? - }, - votes16: { - let val = *vals - .get(&Some("votes16")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes16".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("votes16"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 16usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 16usize, - }), - ); - } - let vals = value; - Ok(NposCompactSolution16 { - votes1: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes1"))? - }, - votes2: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes2"))? - }, - votes3: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes3"))? - }, - votes4: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes4"))? - }, - votes5: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes5"))? - }, - votes6: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes6"))? - }, - votes7: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes7"))? - }, - votes8: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes8"))? - }, - votes9: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes9"))? - }, - votes10: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes10"))? - }, - votes11: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes11"))? - }, - votes12: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes12"))? - }, - votes13: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes13"))? - }, - votes14: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes14"))? - }, - votes15: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes15"))? - }, - votes16: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("votes16"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for NposCompactSolution16 { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NposCompactSolution16 { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NposCompactSolution16 { - votes1, - votes2, - votes3, - votes4, - votes5, - votes6, - votes7, - votes8, - votes9, - votes10, - votes11, - votes12, - votes13, - votes14, - votes15, - votes16, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("votes1"), - votes1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes2"), - votes2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes3"), - votes3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes4"), - votes4 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes5"), - votes5 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes6"), - votes6 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes7"), - votes7 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes8"), - votes8 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes9"), - votes9 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes10"), - votes10 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes11"), - votes11 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes12"), - votes12 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes13"), - votes13 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes14"), - votes14 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes15"), - votes15 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes16"), - votes16 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for NposCompactSolution16 { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let NposCompactSolution16 { - votes1, - votes2, - votes3, - votes4, - votes5, - votes6, - votes7, - votes8, - votes9, - votes10, - votes11, - votes12, - votes13, - votes14, - votes15, - votes16, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("votes1"), - votes1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes2"), - votes2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes3"), - votes3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes4"), - votes4 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes5"), - votes5 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes6"), - votes6 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes7"), - votes7 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes8"), - votes8 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes9"), - votes9 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes10"), - votes10 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes11"), - votes11 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes12"), - votes12 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes13"), - votes13 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes14"), - votes14 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes15"), - votes15 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes16"), - votes16 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NposCompactSolution16 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "votes1", - "votes2", - "votes3", - "votes4", - "votes5", - "votes6", - "votes7", - "votes8", - "votes9", - "votes10", - "votes11", - "votes12", - "votes13", - "votes14", - "votes15", - "votes16", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.votes1, - &self.votes2, - &self.votes3, - &self.votes4, - &self.votes5, - &self.votes6, - &self.votes7, - &self.votes8, - &self.votes9, - &self.votes10, - &self.votes11, - &self.votes12, - &self.votes13, - &self.votes14, - &self.votes15, - &&self.votes16, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "NposCompactSolution16", - names, - values, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum OriginCaller { - #[codec(index = 0)] - system( - runtime_types::frame_support::dispatch::RawOrigin< - ::subxt::utils::AccountId32, - >, - ), - #[codec(index = 15)] - Council( - runtime_types::pallet_collective::RawOrigin< - ::subxt::utils::AccountId32, - >, - ), - #[codec(index = 16)] - TechnicalCommittee( - runtime_types::pallet_collective::RawOrigin< - ::subxt::utils::AccountId32, - >, - ), - #[codec(index = 22)] - Origins( - runtime_types::polkadot_runtime::governance::origins::pallet_custom_origins::Origin, - ), - #[codec(index = 50)] - ParachainsOrigin( - runtime_types::polkadot_runtime_parachains::origin::pallet::Origin, - ), - #[codec(index = 99)] - XcmPallet(runtime_types::pallet_xcm::pallet::Origin), - #[codec(index = 6)] - Void(runtime_types::sp_core::Void), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for OriginCaller { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `OriginCaller`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - OriginCaller::system({ - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OriginCaller::system.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - OriginCaller::Council({ - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OriginCaller::Council.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - OriginCaller::TechnicalCommittee({ - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `OriginCaller::TechnicalCommittee.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 22u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - OriginCaller::Origins({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OriginCaller::Origins.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 50u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - OriginCaller::ParachainsOrigin({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `OriginCaller::ParachainsOrigin.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 99u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - OriginCaller::XcmPallet({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OriginCaller::XcmPallet.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - OriginCaller::Void({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OriginCaller::Void.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `OriginCaller`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for OriginCaller { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - OriginCaller::system(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - OriginCaller::Council(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - OriginCaller::TechnicalCommittee(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - OriginCaller::Origins(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - OriginCaller::ParachainsOrigin(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - OriginCaller::XcmPallet(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - OriginCaller::Void(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - OriginCaller::system(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - OriginCaller::Council(ref aa) => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - OriginCaller::TechnicalCommittee(ref aa) => { - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - OriginCaller::Origins(ref aa) => { - __codec_dest_edqy.push_byte(22u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - OriginCaller::ParachainsOrigin(ref aa) => { - __codec_dest_edqy.push_byte(50u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - OriginCaller::XcmPallet(ref aa) => { - __codec_dest_edqy.push_byte(99u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - OriginCaller::Void(ref aa) => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for OriginCaller {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for OriginCaller { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = OriginCaller; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "system" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - OriginCaller::system({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Council" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - OriginCaller::Council({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "TechnicalCommittee" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - OriginCaller::TechnicalCommittee({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Origins" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - OriginCaller::Origins({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ParachainsOrigin" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - OriginCaller::ParachainsOrigin({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "XcmPallet" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - OriginCaller::XcmPallet({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Void" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - OriginCaller::Void({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "system", - "Council", - "TechnicalCommittee", - "Origins", - "ParachainsOrigin", - "XcmPallet", - "Void", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for OriginCaller { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::system(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "system", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Council(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Council", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TechnicalCommittee(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "TechnicalCommittee", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Origins(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Origins", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ParachainsOrigin(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ParachainsOrigin", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::XcmPallet(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "XcmPallet", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Void(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Void", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for OriginCaller { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - OriginCaller::system(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "system", - &__self_0, - ) - } - OriginCaller::Council(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Council", - &__self_0, - ) - } - OriginCaller::TechnicalCommittee(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "TechnicalCommittee", - &__self_0, - ) - } - OriginCaller::Origins(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Origins", - &__self_0, - ) - } - OriginCaller::ParachainsOrigin(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ParachainsOrigin", - &__self_0, - ) - } - OriginCaller::XcmPallet(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "XcmPallet", - &__self_0, - ) - } - OriginCaller::Void(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Void", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ProxyType { - #[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, - #[codec(index = 8)] - NominationPools, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ProxyType { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `ProxyType`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ProxyType::Any) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ProxyType::NonTransfer) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ProxyType::Governance) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ProxyType::Staking) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ProxyType::IdentityJudgement) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ProxyType::CancelProxy) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ProxyType::Auction) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ProxyType::NominationPools) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `ProxyType`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ProxyType { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - ProxyType::Any => 0_usize, - ProxyType::NonTransfer => 0_usize, - ProxyType::Governance => 0_usize, - ProxyType::Staking => 0_usize, - ProxyType::IdentityJudgement => 0_usize, - ProxyType::CancelProxy => 0_usize, - ProxyType::Auction => 0_usize, - ProxyType::NominationPools => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - ProxyType::Any => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - ProxyType::NonTransfer => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - ProxyType::Governance => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - ProxyType::Staking => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - ProxyType::IdentityJudgement => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - ProxyType::CancelProxy => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - ProxyType::Auction => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - ProxyType::NominationPools => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ProxyType {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ProxyType { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ProxyType; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Any" { - return Ok(ProxyType::Any); - } - if value.name() == "NonTransfer" { - return Ok(ProxyType::NonTransfer); - } - if value.name() == "Governance" { - return Ok(ProxyType::Governance); - } - if value.name() == "Staking" { - return Ok(ProxyType::Staking); - } - if value.name() == "IdentityJudgement" { - return Ok(ProxyType::IdentityJudgement); - } - if value.name() == "CancelProxy" { - return Ok(ProxyType::CancelProxy); - } - if value.name() == "Auction" { - return Ok(ProxyType::Auction); - } - if value.name() == "NominationPools" { - return Ok(ProxyType::NominationPools); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Any", - "NonTransfer", - "Governance", - "Staking", - "IdentityJudgement", - "CancelProxy", - "Auction", - "NominationPools", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ProxyType { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Any => { - ::subxt::ext::scale_encode::Variant { - name: "Any", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NonTransfer => { - ::subxt::ext::scale_encode::Variant { - name: "NonTransfer", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Governance => { - ::subxt::ext::scale_encode::Variant { - name: "Governance", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Staking => { - ::subxt::ext::scale_encode::Variant { - name: "Staking", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::IdentityJudgement => { - ::subxt::ext::scale_encode::Variant { - name: "IdentityJudgement", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CancelProxy => { - ::subxt::ext::scale_encode::Variant { - name: "CancelProxy", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Auction => { - ::subxt::ext::scale_encode::Variant { - name: "Auction", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NominationPools => { - ::subxt::ext::scale_encode::Variant { - name: "NominationPools", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ProxyType { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - ProxyType::Any => "Any", - ProxyType::NonTransfer => "NonTransfer", - ProxyType::Governance => "Governance", - ProxyType::Staking => "Staking", - ProxyType::IdentityJudgement => "IdentityJudgement", - ProxyType::CancelProxy => "CancelProxy", - ProxyType::Auction => "Auction", - ProxyType::NominationPools => "NominationPools", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Runtime; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Runtime { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Runtime) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Runtime { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Runtime {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Runtime { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Runtime; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(Runtime) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Runtime { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Runtime { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Runtime = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Runtime { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Runtime = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Runtime { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "Runtime") - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum RuntimeCall { - #[codec(index = 0)] - System(runtime_types::frame_system::pallet::Call), - #[codec(index = 1)] - 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 = 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::Call2), - #[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 = 20)] - ConvictionVoting( - runtime_types::pallet_conviction_voting::pallet::Call, - ), - #[codec(index = 21)] - Referenda(runtime_types::pallet_referenda::pallet::Call), - #[codec(index = 23)] - Whitelist(runtime_types::pallet_whitelist::pallet::Call), - #[codec(index = 24)] - Claims(runtime_types::polkadot_runtime_common::claims::pallet::Call), - #[codec(index = 25)] - 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 = 60)] - Hrmp(runtime_types::polkadot_runtime_parachains::hrmp::pallet::Call), - #[codec(index = 62)] - ParasDisputes( - runtime_types::polkadot_runtime_parachains::disputes::pallet::Call, - ), - #[codec(index = 63)] - ParasSlashing( - runtime_types::polkadot_runtime_parachains::disputes::slashing::pallet::Call, - ), - #[codec(index = 70)] - Registrar( - runtime_types::polkadot_runtime_common::paras_registrar::pallet::Call, - ), - #[codec(index = 71)] - 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), - #[codec(index = 100)] - MessageQueue(runtime_types::pallet_message_queue::pallet::Call), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RuntimeCall { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `RuntimeCall`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::System({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::System.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Scheduler({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Scheduler.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Preimage({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Preimage.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Babe({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Babe.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Timestamp({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Timestamp.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Indices({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Indices.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Balances({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Balances.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Staking({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Staking.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Session({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Session.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Grandpa({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Grandpa.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::ImOnline({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::ImOnline.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Democracy({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Democracy.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Council({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Council.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::TechnicalCommittee({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RuntimeCall::TechnicalCommittee.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::PhragmenElection({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `RuntimeCall::PhragmenElection.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::TechnicalMembership({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RuntimeCall::TechnicalMembership.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Treasury({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Treasury.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::ConvictionVoting({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `RuntimeCall::ConvictionVoting.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Referenda({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Referenda.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 23u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Whitelist({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Whitelist.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 24u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Claims({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Claims.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 25u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Vesting({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Vesting.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 26u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Utility({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Utility.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 28u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Identity({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Identity.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 29u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Proxy({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Proxy.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 30u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Multisig({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Multisig.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 34u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Bounties({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Bounties.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 38u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::ChildBounties({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::ChildBounties.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 35u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Tips({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Tips.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 36u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::ElectionProviderMultiPhase({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RuntimeCall::ElectionProviderMultiPhase.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 37u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::VoterList({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::VoterList.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 39u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::NominationPools({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::NominationPools.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 40u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::FastUnstake({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::FastUnstake.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 51u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Configuration({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Configuration.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 52u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::ParasShared({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::ParasShared.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 53u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::ParaInclusion({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::ParaInclusion.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 54u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::ParaInherent({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::ParaInherent.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 56u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Paras({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Paras.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 57u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Initializer({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Initializer.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 60u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Hrmp({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Hrmp.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 62u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::ParasDisputes({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::ParasDisputes.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 63u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::ParasSlashing({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::ParasSlashing.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 70u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Registrar({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Registrar.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 71u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Slots({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Slots.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 72u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Auctions({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Auctions.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 73u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::Crowdloan({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::Crowdloan.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 99u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::XcmPallet({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::XcmPallet.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 100u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeCall::MessageQueue({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeCall::MessageQueue.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `RuntimeCall`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RuntimeCall { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - RuntimeCall::System(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Scheduler(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Preimage(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Babe(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Timestamp(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Indices(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Balances(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Staking(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Session(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Grandpa(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::ImOnline(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Democracy(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Council(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::TechnicalCommittee(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::PhragmenElection(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::TechnicalMembership(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Treasury(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::ConvictionVoting(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Referenda(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Whitelist(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Claims(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Vesting(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Utility(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Identity(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Proxy(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Multisig(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Bounties(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::ChildBounties(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Tips(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::ElectionProviderMultiPhase(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::VoterList(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::NominationPools(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::FastUnstake(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Configuration(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::ParasShared(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::ParaInclusion(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::ParaInherent(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Paras(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Initializer(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Hrmp(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::ParasDisputes(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::ParasSlashing(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Registrar(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Slots(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Auctions(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::Crowdloan(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::XcmPallet(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeCall::MessageQueue(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - RuntimeCall::System(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Scheduler(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Preimage(ref aa) => { - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Babe(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Timestamp(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Indices(ref aa) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Balances(ref aa) => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Staking(ref aa) => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Session(ref aa) => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Grandpa(ref aa) => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::ImOnline(ref aa) => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Democracy(ref aa) => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Council(ref aa) => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::TechnicalCommittee(ref aa) => { - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::PhragmenElection(ref aa) => { - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::TechnicalMembership(ref aa) => { - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Treasury(ref aa) => { - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::ConvictionVoting(ref aa) => { - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Referenda(ref aa) => { - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Whitelist(ref aa) => { - __codec_dest_edqy.push_byte(23u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Claims(ref aa) => { - __codec_dest_edqy.push_byte(24u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Vesting(ref aa) => { - __codec_dest_edqy.push_byte(25u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Utility(ref aa) => { - __codec_dest_edqy.push_byte(26u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Identity(ref aa) => { - __codec_dest_edqy.push_byte(28u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Proxy(ref aa) => { - __codec_dest_edqy.push_byte(29u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Multisig(ref aa) => { - __codec_dest_edqy.push_byte(30u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Bounties(ref aa) => { - __codec_dest_edqy.push_byte(34u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::ChildBounties(ref aa) => { - __codec_dest_edqy.push_byte(38u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Tips(ref aa) => { - __codec_dest_edqy.push_byte(35u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::ElectionProviderMultiPhase(ref aa) => { - __codec_dest_edqy.push_byte(36u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::VoterList(ref aa) => { - __codec_dest_edqy.push_byte(37u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::NominationPools(ref aa) => { - __codec_dest_edqy.push_byte(39u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::FastUnstake(ref aa) => { - __codec_dest_edqy.push_byte(40u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Configuration(ref aa) => { - __codec_dest_edqy.push_byte(51u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::ParasShared(ref aa) => { - __codec_dest_edqy.push_byte(52u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::ParaInclusion(ref aa) => { - __codec_dest_edqy.push_byte(53u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::ParaInherent(ref aa) => { - __codec_dest_edqy.push_byte(54u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Paras(ref aa) => { - __codec_dest_edqy.push_byte(56u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Initializer(ref aa) => { - __codec_dest_edqy.push_byte(57u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Hrmp(ref aa) => { - __codec_dest_edqy.push_byte(60u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::ParasDisputes(ref aa) => { - __codec_dest_edqy.push_byte(62u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::ParasSlashing(ref aa) => { - __codec_dest_edqy.push_byte(63u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Registrar(ref aa) => { - __codec_dest_edqy.push_byte(70u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Slots(ref aa) => { - __codec_dest_edqy.push_byte(71u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Auctions(ref aa) => { - __codec_dest_edqy.push_byte(72u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::Crowdloan(ref aa) => { - __codec_dest_edqy.push_byte(73u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::XcmPallet(ref aa) => { - __codec_dest_edqy.push_byte(99u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeCall::MessageQueue(ref aa) => { - __codec_dest_edqy.push_byte(100u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RuntimeCall {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RuntimeCall { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RuntimeCall; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "System" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::System({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Scheduler" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Scheduler({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Preimage" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Preimage({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Babe" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Babe({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Timestamp" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Timestamp({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Indices" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Indices({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Balances" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Balances({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Staking" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Staking({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Session" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Session({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Grandpa" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Grandpa({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ImOnline" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::ImOnline({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Democracy" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Democracy({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Council" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Council({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "TechnicalCommittee" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::TechnicalCommittee({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "PhragmenElection" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::PhragmenElection({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "TechnicalMembership" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::TechnicalMembership({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Treasury" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Treasury({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ConvictionVoting" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::ConvictionVoting({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Referenda" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Referenda({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Whitelist" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Whitelist({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Claims" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Claims({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Vesting" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Vesting({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Utility" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Utility({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Identity" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Identity({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Proxy" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Proxy({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Multisig" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Multisig({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Bounties" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Bounties({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ChildBounties" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::ChildBounties({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Tips" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Tips({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ElectionProviderMultiPhase" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::ElectionProviderMultiPhase({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "VoterList" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::VoterList({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "NominationPools" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::NominationPools({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "FastUnstake" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::FastUnstake({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Configuration" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Configuration({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ParasShared" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::ParasShared({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ParaInclusion" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::ParaInclusion({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ParaInherent" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::ParaInherent({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Paras" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Paras({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Initializer" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Initializer({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Hrmp" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Hrmp({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ParasDisputes" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::ParasDisputes({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ParasSlashing" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::ParasSlashing({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Registrar" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Registrar({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Slots" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Slots({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Auctions" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Auctions({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Crowdloan" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::Crowdloan({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "XcmPallet" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::XcmPallet({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "MessageQueue" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeCall::MessageQueue({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "System", - "Scheduler", - "Preimage", - "Babe", - "Timestamp", - "Indices", - "Balances", - "Staking", - "Session", - "Grandpa", - "ImOnline", - "Democracy", - "Council", - "TechnicalCommittee", - "PhragmenElection", - "TechnicalMembership", - "Treasury", - "ConvictionVoting", - "Referenda", - "Whitelist", - "Claims", - "Vesting", - "Utility", - "Identity", - "Proxy", - "Multisig", - "Bounties", - "ChildBounties", - "Tips", - "ElectionProviderMultiPhase", - "VoterList", - "NominationPools", - "FastUnstake", - "Configuration", - "ParasShared", - "ParaInclusion", - "ParaInherent", - "Paras", - "Initializer", - "Hrmp", - "ParasDisputes", - "ParasSlashing", - "Registrar", - "Slots", - "Auctions", - "Crowdloan", - "XcmPallet", - "MessageQueue", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RuntimeCall { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::System(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "System", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Scheduler(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Scheduler", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Preimage(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Preimage", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Babe(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Babe", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Timestamp(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Timestamp", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Indices(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Indices", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Balances(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Balances", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Staking(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Staking", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Session(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Session", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Grandpa(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Grandpa", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ImOnline(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ImOnline", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Democracy(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Democracy", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Council(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Council", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TechnicalCommittee(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "TechnicalCommittee", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PhragmenElection(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "PhragmenElection", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TechnicalMembership(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "TechnicalMembership", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Treasury(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Treasury", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ConvictionVoting(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ConvictionVoting", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Referenda(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Referenda", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Whitelist(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Whitelist", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Claims(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Claims", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Vesting(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Vesting", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Utility(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Utility", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Identity(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Identity", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Proxy(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Proxy", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Multisig(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Multisig", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Bounties(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Bounties", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ChildBounties(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ChildBounties", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Tips(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Tips", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ElectionProviderMultiPhase(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ElectionProviderMultiPhase", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::VoterList(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "VoterList", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NominationPools(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "NominationPools", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FastUnstake(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "FastUnstake", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Configuration(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Configuration", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ParasShared(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ParasShared", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ParaInclusion(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ParaInclusion", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ParaInherent(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ParaInherent", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Paras(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Paras", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Initializer(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Initializer", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Hrmp(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Hrmp", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ParasDisputes(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ParasDisputes", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ParasSlashing(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ParasSlashing", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Registrar(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Registrar", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Slots(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Slots", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Auctions(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Auctions", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Crowdloan(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Crowdloan", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::XcmPallet(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "XcmPallet", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MessageQueue(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "MessageQueue", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RuntimeCall { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - RuntimeCall::System(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "System", - &__self_0, - ) - } - RuntimeCall::Scheduler(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Scheduler", - &__self_0, - ) - } - RuntimeCall::Preimage(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Preimage", - &__self_0, - ) - } - RuntimeCall::Babe(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Babe", - &__self_0, - ) - } - RuntimeCall::Timestamp(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Timestamp", - &__self_0, - ) - } - RuntimeCall::Indices(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Indices", - &__self_0, - ) - } - RuntimeCall::Balances(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Balances", - &__self_0, - ) - } - RuntimeCall::Staking(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Staking", - &__self_0, - ) - } - RuntimeCall::Session(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Session", - &__self_0, - ) - } - RuntimeCall::Grandpa(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Grandpa", - &__self_0, - ) - } - RuntimeCall::ImOnline(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ImOnline", - &__self_0, - ) - } - RuntimeCall::Democracy(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Democracy", - &__self_0, - ) - } - RuntimeCall::Council(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Council", - &__self_0, - ) - } - RuntimeCall::TechnicalCommittee(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "TechnicalCommittee", - &__self_0, - ) - } - RuntimeCall::PhragmenElection(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "PhragmenElection", - &__self_0, - ) - } - RuntimeCall::TechnicalMembership(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "TechnicalMembership", - &__self_0, - ) - } - RuntimeCall::Treasury(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Treasury", - &__self_0, - ) - } - RuntimeCall::ConvictionVoting(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ConvictionVoting", - &__self_0, - ) - } - RuntimeCall::Referenda(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Referenda", - &__self_0, - ) - } - RuntimeCall::Whitelist(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Whitelist", - &__self_0, - ) - } - RuntimeCall::Claims(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Claims", - &__self_0, - ) - } - RuntimeCall::Vesting(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Vesting", - &__self_0, - ) - } - RuntimeCall::Utility(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Utility", - &__self_0, - ) - } - RuntimeCall::Identity(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Identity", - &__self_0, - ) - } - RuntimeCall::Proxy(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Proxy", - &__self_0, - ) - } - RuntimeCall::Multisig(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Multisig", - &__self_0, - ) - } - RuntimeCall::Bounties(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Bounties", - &__self_0, - ) - } - RuntimeCall::ChildBounties(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ChildBounties", - &__self_0, - ) - } - RuntimeCall::Tips(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Tips", - &__self_0, - ) - } - RuntimeCall::ElectionProviderMultiPhase(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ElectionProviderMultiPhase", - &__self_0, - ) - } - RuntimeCall::VoterList(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "VoterList", - &__self_0, - ) - } - RuntimeCall::NominationPools(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "NominationPools", - &__self_0, - ) - } - RuntimeCall::FastUnstake(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "FastUnstake", - &__self_0, - ) - } - RuntimeCall::Configuration(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Configuration", - &__self_0, - ) - } - RuntimeCall::ParasShared(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ParasShared", - &__self_0, - ) - } - RuntimeCall::ParaInclusion(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ParaInclusion", - &__self_0, - ) - } - RuntimeCall::ParaInherent(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ParaInherent", - &__self_0, - ) - } - RuntimeCall::Paras(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Paras", - &__self_0, - ) - } - RuntimeCall::Initializer(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Initializer", - &__self_0, - ) - } - RuntimeCall::Hrmp(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Hrmp", - &__self_0, - ) - } - RuntimeCall::ParasDisputes(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ParasDisputes", - &__self_0, - ) - } - RuntimeCall::ParasSlashing(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ParasSlashing", - &__self_0, - ) - } - RuntimeCall::Registrar(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Registrar", - &__self_0, - ) - } - RuntimeCall::Slots(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Slots", - &__self_0, - ) - } - RuntimeCall::Auctions(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Auctions", - &__self_0, - ) - } - RuntimeCall::Crowdloan(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Crowdloan", - &__self_0, - ) - } - RuntimeCall::XcmPallet(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "XcmPallet", - &__self_0, - ) - } - RuntimeCall::MessageQueue(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "MessageQueue", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum RuntimeError { - #[codec(index = 0)] - System(runtime_types::frame_system::pallet::Error), - #[codec(index = 1)] - Scheduler(runtime_types::pallet_scheduler::pallet::Error), - #[codec(index = 10)] - Preimage(runtime_types::pallet_preimage::pallet::Error), - #[codec(index = 2)] - Babe(runtime_types::pallet_babe::pallet::Error), - #[codec(index = 4)] - Indices(runtime_types::pallet_indices::pallet::Error), - #[codec(index = 5)] - Balances(runtime_types::pallet_balances::pallet::Error), - #[codec(index = 7)] - Staking(runtime_types::pallet_staking::pallet::pallet::Error), - #[codec(index = 9)] - Session(runtime_types::pallet_session::pallet::Error), - #[codec(index = 11)] - Grandpa(runtime_types::pallet_grandpa::pallet::Error), - #[codec(index = 12)] - ImOnline(runtime_types::pallet_im_online::pallet::Error), - #[codec(index = 14)] - Democracy(runtime_types::pallet_democracy::pallet::Error), - #[codec(index = 15)] - Council(runtime_types::pallet_collective::pallet::Error), - #[codec(index = 16)] - TechnicalCommittee(runtime_types::pallet_collective::pallet::Error2), - #[codec(index = 17)] - PhragmenElection( - runtime_types::pallet_elections_phragmen::pallet::Error, - ), - #[codec(index = 18)] - TechnicalMembership(runtime_types::pallet_membership::pallet::Error), - #[codec(index = 19)] - Treasury(runtime_types::pallet_treasury::pallet::Error), - #[codec(index = 20)] - ConvictionVoting( - runtime_types::pallet_conviction_voting::pallet::Error, - ), - #[codec(index = 21)] - Referenda(runtime_types::pallet_referenda::pallet::Error), - #[codec(index = 23)] - Whitelist(runtime_types::pallet_whitelist::pallet::Error), - #[codec(index = 24)] - Claims( - runtime_types::polkadot_runtime_common::claims::pallet::Error, - ), - #[codec(index = 25)] - Vesting(runtime_types::pallet_vesting::pallet::Error), - #[codec(index = 26)] - Utility(runtime_types::pallet_utility::pallet::Error), - #[codec(index = 28)] - Identity(runtime_types::pallet_identity::pallet::Error), - #[codec(index = 29)] - Proxy(runtime_types::pallet_proxy::pallet::Error), - #[codec(index = 30)] - Multisig(runtime_types::pallet_multisig::pallet::Error), - #[codec(index = 34)] - Bounties(runtime_types::pallet_bounties::pallet::Error), - #[codec(index = 38)] - ChildBounties(runtime_types::pallet_child_bounties::pallet::Error), - #[codec(index = 35)] - Tips(runtime_types::pallet_tips::pallet::Error), - #[codec(index = 36)] - ElectionProviderMultiPhase( - runtime_types::pallet_election_provider_multi_phase::pallet::Error, - ), - #[codec(index = 37)] - VoterList(runtime_types::pallet_bags_list::pallet::Error), - #[codec(index = 39)] - NominationPools( - runtime_types::pallet_nomination_pools::pallet::Error, - ), - #[codec(index = 40)] - FastUnstake(runtime_types::pallet_fast_unstake::pallet::Error), - #[codec(index = 51)] - Configuration( - runtime_types::polkadot_runtime_parachains::configuration::pallet::Error, - ), - #[codec(index = 53)] - ParaInclusion( - runtime_types::polkadot_runtime_parachains::inclusion::pallet::Error, - ), - #[codec(index = 54)] - ParaInherent( - runtime_types::polkadot_runtime_parachains::paras_inherent::pallet::Error, - ), - #[codec(index = 56)] - Paras( - runtime_types::polkadot_runtime_parachains::paras::pallet::Error, - ), - #[codec(index = 60)] - Hrmp( - runtime_types::polkadot_runtime_parachains::hrmp::pallet::Error, - ), - #[codec(index = 62)] - ParasDisputes( - runtime_types::polkadot_runtime_parachains::disputes::pallet::Error, - ), - #[codec(index = 63)] - ParasSlashing( - runtime_types::polkadot_runtime_parachains::disputes::slashing::pallet::Error, - ), - #[codec(index = 70)] - Registrar( - runtime_types::polkadot_runtime_common::paras_registrar::pallet::Error, - ), - #[codec(index = 71)] - Slots(runtime_types::polkadot_runtime_common::slots::pallet::Error), - #[codec(index = 72)] - Auctions( - runtime_types::polkadot_runtime_common::auctions::pallet::Error, - ), - #[codec(index = 73)] - Crowdloan( - runtime_types::polkadot_runtime_common::crowdloan::pallet::Error, - ), - #[codec(index = 99)] - XcmPallet(runtime_types::pallet_xcm::pallet::Error), - #[codec(index = 100)] - MessageQueue(runtime_types::pallet_message_queue::pallet::Error), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RuntimeError { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `RuntimeError`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::System({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::System.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Scheduler({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Scheduler.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Preimage({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Preimage.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Babe({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Babe.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Indices({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Indices.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Balances({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Balances.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Staking({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Staking.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Session({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Session.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Grandpa({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Grandpa.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::ImOnline({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::ImOnline.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Democracy({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Democracy.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Council({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Council.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::TechnicalCommittee({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RuntimeError::TechnicalCommittee.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::PhragmenElection({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RuntimeError::PhragmenElection.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::TechnicalMembership({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RuntimeError::TechnicalMembership.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Treasury({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Treasury.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::ConvictionVoting({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RuntimeError::ConvictionVoting.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Referenda({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Referenda.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 23u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Whitelist({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Whitelist.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 24u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Claims({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Claims.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 25u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Vesting({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Vesting.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 26u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Utility({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Utility.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 28u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Identity({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Identity.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 29u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Proxy({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Proxy.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 30u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Multisig({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Multisig.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 34u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Bounties({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Bounties.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 38u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::ChildBounties({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::ChildBounties.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 35u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Tips({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Tips.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 36u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::ElectionProviderMultiPhase({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RuntimeError::ElectionProviderMultiPhase.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 37u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::VoterList({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::VoterList.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 39u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::NominationPools({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `RuntimeError::NominationPools.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 40u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::FastUnstake({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::FastUnstake.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 51u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Configuration({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Configuration.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 53u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::ParaInclusion({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::ParaInclusion.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 54u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::ParaInherent({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::ParaInherent.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 56u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Paras({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Paras.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 60u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Hrmp({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Hrmp.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 62u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::ParasDisputes({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::ParasDisputes.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 63u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::ParasSlashing({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::ParasSlashing.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 70u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Registrar({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Registrar.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 71u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Slots({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Slots.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 72u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Auctions({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Auctions.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 73u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::Crowdloan({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::Crowdloan.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 99u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::XcmPallet({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::XcmPallet.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 100u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeError::MessageQueue({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeError::MessageQueue.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `RuntimeError`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RuntimeError { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - RuntimeError::System(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Scheduler(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Preimage(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Babe(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Indices(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Balances(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Staking(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Session(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Grandpa(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::ImOnline(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Democracy(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Council(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::TechnicalCommittee(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::PhragmenElection(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::TechnicalMembership(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Treasury(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::ConvictionVoting(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Referenda(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Whitelist(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Claims(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Vesting(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Utility(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Identity(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Proxy(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Multisig(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Bounties(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::ChildBounties(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Tips(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::ElectionProviderMultiPhase(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::VoterList(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::NominationPools(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::FastUnstake(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Configuration(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::ParaInclusion(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::ParaInherent(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Paras(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Hrmp(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::ParasDisputes(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::ParasSlashing(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Registrar(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Slots(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Auctions(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::Crowdloan(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::XcmPallet(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeError::MessageQueue(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - RuntimeError::System(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Scheduler(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Preimage(ref aa) => { - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Babe(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Indices(ref aa) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Balances(ref aa) => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Staking(ref aa) => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Session(ref aa) => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Grandpa(ref aa) => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::ImOnline(ref aa) => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Democracy(ref aa) => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Council(ref aa) => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::TechnicalCommittee(ref aa) => { - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::PhragmenElection(ref aa) => { - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::TechnicalMembership(ref aa) => { - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Treasury(ref aa) => { - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::ConvictionVoting(ref aa) => { - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Referenda(ref aa) => { - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Whitelist(ref aa) => { - __codec_dest_edqy.push_byte(23u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Claims(ref aa) => { - __codec_dest_edqy.push_byte(24u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Vesting(ref aa) => { - __codec_dest_edqy.push_byte(25u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Utility(ref aa) => { - __codec_dest_edqy.push_byte(26u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Identity(ref aa) => { - __codec_dest_edqy.push_byte(28u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Proxy(ref aa) => { - __codec_dest_edqy.push_byte(29u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Multisig(ref aa) => { - __codec_dest_edqy.push_byte(30u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Bounties(ref aa) => { - __codec_dest_edqy.push_byte(34u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::ChildBounties(ref aa) => { - __codec_dest_edqy.push_byte(38u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Tips(ref aa) => { - __codec_dest_edqy.push_byte(35u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::ElectionProviderMultiPhase(ref aa) => { - __codec_dest_edqy.push_byte(36u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::VoterList(ref aa) => { - __codec_dest_edqy.push_byte(37u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::NominationPools(ref aa) => { - __codec_dest_edqy.push_byte(39u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::FastUnstake(ref aa) => { - __codec_dest_edqy.push_byte(40u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Configuration(ref aa) => { - __codec_dest_edqy.push_byte(51u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::ParaInclusion(ref aa) => { - __codec_dest_edqy.push_byte(53u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::ParaInherent(ref aa) => { - __codec_dest_edqy.push_byte(54u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Paras(ref aa) => { - __codec_dest_edqy.push_byte(56u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Hrmp(ref aa) => { - __codec_dest_edqy.push_byte(60u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::ParasDisputes(ref aa) => { - __codec_dest_edqy.push_byte(62u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::ParasSlashing(ref aa) => { - __codec_dest_edqy.push_byte(63u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Registrar(ref aa) => { - __codec_dest_edqy.push_byte(70u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Slots(ref aa) => { - __codec_dest_edqy.push_byte(71u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Auctions(ref aa) => { - __codec_dest_edqy.push_byte(72u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::Crowdloan(ref aa) => { - __codec_dest_edqy.push_byte(73u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::XcmPallet(ref aa) => { - __codec_dest_edqy.push_byte(99u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeError::MessageQueue(ref aa) => { - __codec_dest_edqy.push_byte(100u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RuntimeError {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RuntimeError { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RuntimeError; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "System" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::System({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Scheduler" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Scheduler({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Preimage" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Preimage({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Babe" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Babe({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Indices" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Indices({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Balances" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Balances({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Staking" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Staking({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Session" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Session({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Grandpa" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Grandpa({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ImOnline" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::ImOnline({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Democracy" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Democracy({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Council" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Council({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "TechnicalCommittee" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::TechnicalCommittee({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "PhragmenElection" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::PhragmenElection({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "TechnicalMembership" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::TechnicalMembership({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Treasury" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Treasury({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ConvictionVoting" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::ConvictionVoting({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Referenda" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Referenda({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Whitelist" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Whitelist({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Claims" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Claims({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Vesting" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Vesting({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Utility" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Utility({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Identity" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Identity({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Proxy" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Proxy({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Multisig" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Multisig({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Bounties" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Bounties({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ChildBounties" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::ChildBounties({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Tips" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Tips({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ElectionProviderMultiPhase" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::ElectionProviderMultiPhase({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "VoterList" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::VoterList({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "NominationPools" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::NominationPools({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "FastUnstake" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::FastUnstake({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Configuration" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Configuration({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ParaInclusion" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::ParaInclusion({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ParaInherent" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::ParaInherent({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Paras" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Paras({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Hrmp" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Hrmp({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ParasDisputes" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::ParasDisputes({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ParasSlashing" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::ParasSlashing({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Registrar" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Registrar({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Slots" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Slots({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Auctions" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Auctions({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Crowdloan" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::Crowdloan({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "XcmPallet" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::XcmPallet({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "MessageQueue" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeError::MessageQueue({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "System", - "Scheduler", - "Preimage", - "Babe", - "Indices", - "Balances", - "Staking", - "Session", - "Grandpa", - "ImOnline", - "Democracy", - "Council", - "TechnicalCommittee", - "PhragmenElection", - "TechnicalMembership", - "Treasury", - "ConvictionVoting", - "Referenda", - "Whitelist", - "Claims", - "Vesting", - "Utility", - "Identity", - "Proxy", - "Multisig", - "Bounties", - "ChildBounties", - "Tips", - "ElectionProviderMultiPhase", - "VoterList", - "NominationPools", - "FastUnstake", - "Configuration", - "ParaInclusion", - "ParaInherent", - "Paras", - "Hrmp", - "ParasDisputes", - "ParasSlashing", - "Registrar", - "Slots", - "Auctions", - "Crowdloan", - "XcmPallet", - "MessageQueue", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RuntimeError { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::System(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "System", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Scheduler(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Scheduler", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Preimage(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Preimage", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Babe(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Babe", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Indices(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Indices", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Balances(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Balances", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Staking(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Staking", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Session(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Session", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Grandpa(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Grandpa", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ImOnline(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ImOnline", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Democracy(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Democracy", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Council(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Council", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TechnicalCommittee(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "TechnicalCommittee", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PhragmenElection(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "PhragmenElection", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TechnicalMembership(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "TechnicalMembership", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Treasury(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Treasury", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ConvictionVoting(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ConvictionVoting", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Referenda(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Referenda", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Whitelist(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Whitelist", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Claims(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Claims", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Vesting(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Vesting", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Utility(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Utility", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Identity(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Identity", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Proxy(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Proxy", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Multisig(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Multisig", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Bounties(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Bounties", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ChildBounties(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ChildBounties", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Tips(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Tips", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ElectionProviderMultiPhase(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ElectionProviderMultiPhase", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::VoterList(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "VoterList", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NominationPools(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "NominationPools", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FastUnstake(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "FastUnstake", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Configuration(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Configuration", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ParaInclusion(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ParaInclusion", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ParaInherent(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ParaInherent", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Paras(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Paras", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Hrmp(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Hrmp", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ParasDisputes(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ParasDisputes", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ParasSlashing(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ParasSlashing", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Registrar(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Registrar", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Slots(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Slots", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Auctions(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Auctions", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Crowdloan(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Crowdloan", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::XcmPallet(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "XcmPallet", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MessageQueue(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "MessageQueue", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RuntimeError { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - RuntimeError::System(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "System", - &__self_0, - ) - } - RuntimeError::Scheduler(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Scheduler", - &__self_0, - ) - } - RuntimeError::Preimage(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Preimage", - &__self_0, - ) - } - RuntimeError::Babe(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Babe", - &__self_0, - ) - } - RuntimeError::Indices(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Indices", - &__self_0, - ) - } - RuntimeError::Balances(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Balances", - &__self_0, - ) - } - RuntimeError::Staking(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Staking", - &__self_0, - ) - } - RuntimeError::Session(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Session", - &__self_0, - ) - } - RuntimeError::Grandpa(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Grandpa", - &__self_0, - ) - } - RuntimeError::ImOnline(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ImOnline", - &__self_0, - ) - } - RuntimeError::Democracy(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Democracy", - &__self_0, - ) - } - RuntimeError::Council(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Council", - &__self_0, - ) - } - RuntimeError::TechnicalCommittee(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "TechnicalCommittee", - &__self_0, - ) - } - RuntimeError::PhragmenElection(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "PhragmenElection", - &__self_0, - ) - } - RuntimeError::TechnicalMembership(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "TechnicalMembership", - &__self_0, - ) - } - RuntimeError::Treasury(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Treasury", - &__self_0, - ) - } - RuntimeError::ConvictionVoting(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ConvictionVoting", - &__self_0, - ) - } - RuntimeError::Referenda(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Referenda", - &__self_0, - ) - } - RuntimeError::Whitelist(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Whitelist", - &__self_0, - ) - } - RuntimeError::Claims(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Claims", - &__self_0, - ) - } - RuntimeError::Vesting(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Vesting", - &__self_0, - ) - } - RuntimeError::Utility(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Utility", - &__self_0, - ) - } - RuntimeError::Identity(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Identity", - &__self_0, - ) - } - RuntimeError::Proxy(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Proxy", - &__self_0, - ) - } - RuntimeError::Multisig(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Multisig", - &__self_0, - ) - } - RuntimeError::Bounties(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Bounties", - &__self_0, - ) - } - RuntimeError::ChildBounties(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ChildBounties", - &__self_0, - ) - } - RuntimeError::Tips(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Tips", - &__self_0, - ) - } - RuntimeError::ElectionProviderMultiPhase(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ElectionProviderMultiPhase", - &__self_0, - ) - } - RuntimeError::VoterList(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "VoterList", - &__self_0, - ) - } - RuntimeError::NominationPools(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "NominationPools", - &__self_0, - ) - } - RuntimeError::FastUnstake(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "FastUnstake", - &__self_0, - ) - } - RuntimeError::Configuration(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Configuration", - &__self_0, - ) - } - RuntimeError::ParaInclusion(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ParaInclusion", - &__self_0, - ) - } - RuntimeError::ParaInherent(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ParaInherent", - &__self_0, - ) - } - RuntimeError::Paras(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Paras", - &__self_0, - ) - } - RuntimeError::Hrmp(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Hrmp", - &__self_0, - ) - } - RuntimeError::ParasDisputes(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ParasDisputes", - &__self_0, - ) - } - RuntimeError::ParasSlashing(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ParasSlashing", - &__self_0, - ) - } - RuntimeError::Registrar(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Registrar", - &__self_0, - ) - } - RuntimeError::Slots(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Slots", - &__self_0, - ) - } - RuntimeError::Auctions(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Auctions", - &__self_0, - ) - } - RuntimeError::Crowdloan(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Crowdloan", - &__self_0, - ) - } - RuntimeError::XcmPallet(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "XcmPallet", - &__self_0, - ) - } - RuntimeError::MessageQueue(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "MessageQueue", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum RuntimeEvent { - #[codec(index = 0)] - System(runtime_types::frame_system::pallet::Event), - #[codec(index = 1)] - 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::Event2), - #[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 = 20)] - ConvictionVoting( - runtime_types::pallet_conviction_voting::pallet::Event, - ), - #[codec(index = 21)] - Referenda(runtime_types::pallet_referenda::pallet::Event), - #[codec(index = 23)] - Whitelist(runtime_types::pallet_whitelist::pallet::Event), - #[codec(index = 24)] - Claims( - runtime_types::polkadot_runtime_common::claims::pallet::Event, - ), - #[codec(index = 25)] - 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 = 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), - #[codec(index = 100)] - MessageQueue(runtime_types::pallet_message_queue::pallet::Event), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RuntimeEvent { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `RuntimeEvent`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::System({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::System.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Scheduler({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Scheduler.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Preimage({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Preimage.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Indices({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Indices.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Balances({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Balances.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 32u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::TransactionPayment({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RuntimeEvent::TransactionPayment.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Staking({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Staking.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Offences({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Offences.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Session({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Session.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Grandpa({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Grandpa.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::ImOnline({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::ImOnline.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Democracy({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Democracy.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Council({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Council.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::TechnicalCommittee({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RuntimeEvent::TechnicalCommittee.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::PhragmenElection({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RuntimeEvent::PhragmenElection.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::TechnicalMembership({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RuntimeEvent::TechnicalMembership.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Treasury({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Treasury.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::ConvictionVoting({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RuntimeEvent::ConvictionVoting.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Referenda({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Referenda.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 23u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Whitelist({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Whitelist.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 24u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Claims({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Claims.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 25u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Vesting({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Vesting.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 26u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Utility({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Utility.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 28u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Identity({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Identity.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 29u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Proxy({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Proxy.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 30u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Multisig({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Multisig.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 34u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Bounties({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Bounties.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 38u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::ChildBounties({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::ChildBounties.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 35u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Tips({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Tips.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 36u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::ElectionProviderMultiPhase({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RuntimeEvent::ElectionProviderMultiPhase.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 37u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::VoterList({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::VoterList.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 39u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::NominationPools({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `RuntimeEvent::NominationPools.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 40u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::FastUnstake({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::FastUnstake.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 53u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::ParaInclusion({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::ParaInclusion.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 56u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Paras({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Paras.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 60u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Hrmp({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Hrmp.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 62u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::ParasDisputes({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::ParasDisputes.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 70u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Registrar({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Registrar.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 71u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Slots({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Slots.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 72u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Auctions({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Auctions.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 73u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::Crowdloan({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::Crowdloan.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 99u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::XcmPallet({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::XcmPallet.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 100u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - RuntimeEvent::MessageQueue({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeEvent::MessageQueue.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `RuntimeEvent`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RuntimeEvent { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - RuntimeEvent::System(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Scheduler(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Preimage(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Indices(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Balances(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::TransactionPayment(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Staking(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Offences(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Session(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Grandpa(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::ImOnline(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Democracy(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Council(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::TechnicalCommittee(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::PhragmenElection(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::TechnicalMembership(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Treasury(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::ConvictionVoting(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Referenda(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Whitelist(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Claims(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Vesting(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Utility(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Identity(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Proxy(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Multisig(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Bounties(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::ChildBounties(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Tips(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::ElectionProviderMultiPhase(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::VoterList(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::NominationPools(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::FastUnstake(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::ParaInclusion(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Paras(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Hrmp(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::ParasDisputes(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Registrar(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Slots(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Auctions(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::Crowdloan(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::XcmPallet(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - RuntimeEvent::MessageQueue(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - RuntimeEvent::System(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Scheduler(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Preimage(ref aa) => { - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Indices(ref aa) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Balances(ref aa) => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::TransactionPayment(ref aa) => { - __codec_dest_edqy.push_byte(32u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Staking(ref aa) => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Offences(ref aa) => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Session(ref aa) => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Grandpa(ref aa) => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::ImOnline(ref aa) => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Democracy(ref aa) => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Council(ref aa) => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::TechnicalCommittee(ref aa) => { - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::PhragmenElection(ref aa) => { - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::TechnicalMembership(ref aa) => { - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Treasury(ref aa) => { - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::ConvictionVoting(ref aa) => { - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Referenda(ref aa) => { - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Whitelist(ref aa) => { - __codec_dest_edqy.push_byte(23u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Claims(ref aa) => { - __codec_dest_edqy.push_byte(24u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Vesting(ref aa) => { - __codec_dest_edqy.push_byte(25u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Utility(ref aa) => { - __codec_dest_edqy.push_byte(26u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Identity(ref aa) => { - __codec_dest_edqy.push_byte(28u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Proxy(ref aa) => { - __codec_dest_edqy.push_byte(29u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Multisig(ref aa) => { - __codec_dest_edqy.push_byte(30u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Bounties(ref aa) => { - __codec_dest_edqy.push_byte(34u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::ChildBounties(ref aa) => { - __codec_dest_edqy.push_byte(38u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Tips(ref aa) => { - __codec_dest_edqy.push_byte(35u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::ElectionProviderMultiPhase(ref aa) => { - __codec_dest_edqy.push_byte(36u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::VoterList(ref aa) => { - __codec_dest_edqy.push_byte(37u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::NominationPools(ref aa) => { - __codec_dest_edqy.push_byte(39u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::FastUnstake(ref aa) => { - __codec_dest_edqy.push_byte(40u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::ParaInclusion(ref aa) => { - __codec_dest_edqy.push_byte(53u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Paras(ref aa) => { - __codec_dest_edqy.push_byte(56u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Hrmp(ref aa) => { - __codec_dest_edqy.push_byte(60u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::ParasDisputes(ref aa) => { - __codec_dest_edqy.push_byte(62u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Registrar(ref aa) => { - __codec_dest_edqy.push_byte(70u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Slots(ref aa) => { - __codec_dest_edqy.push_byte(71u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Auctions(ref aa) => { - __codec_dest_edqy.push_byte(72u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::Crowdloan(ref aa) => { - __codec_dest_edqy.push_byte(73u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::XcmPallet(ref aa) => { - __codec_dest_edqy.push_byte(99u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - RuntimeEvent::MessageQueue(ref aa) => { - __codec_dest_edqy.push_byte(100u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RuntimeEvent {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RuntimeEvent { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RuntimeEvent; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "System" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::System({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Scheduler" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Scheduler({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Preimage" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Preimage({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Indices" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Indices({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Balances" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Balances({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "TransactionPayment" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::TransactionPayment({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Staking" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Staking({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Offences" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Offences({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Session" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Session({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Grandpa" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Grandpa({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ImOnline" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::ImOnline({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Democracy" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Democracy({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Council" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Council({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "TechnicalCommittee" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::TechnicalCommittee({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "PhragmenElection" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::PhragmenElection({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "TechnicalMembership" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::TechnicalMembership({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Treasury" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Treasury({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ConvictionVoting" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::ConvictionVoting({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Referenda" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Referenda({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Whitelist" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Whitelist({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Claims" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Claims({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Vesting" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Vesting({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Utility" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Utility({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Identity" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Identity({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Proxy" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Proxy({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Multisig" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Multisig({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Bounties" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Bounties({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ChildBounties" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::ChildBounties({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Tips" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Tips({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ElectionProviderMultiPhase" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::ElectionProviderMultiPhase({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "VoterList" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::VoterList({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "NominationPools" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::NominationPools({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "FastUnstake" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::FastUnstake({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ParaInclusion" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::ParaInclusion({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Paras" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Paras({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Hrmp" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Hrmp({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ParasDisputes" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::ParasDisputes({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Registrar" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Registrar({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Slots" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Slots({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Auctions" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Auctions({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Crowdloan" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::Crowdloan({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "XcmPallet" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::XcmPallet({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "MessageQueue" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - RuntimeEvent::MessageQueue({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "System", - "Scheduler", - "Preimage", - "Indices", - "Balances", - "TransactionPayment", - "Staking", - "Offences", - "Session", - "Grandpa", - "ImOnline", - "Democracy", - "Council", - "TechnicalCommittee", - "PhragmenElection", - "TechnicalMembership", - "Treasury", - "ConvictionVoting", - "Referenda", - "Whitelist", - "Claims", - "Vesting", - "Utility", - "Identity", - "Proxy", - "Multisig", - "Bounties", - "ChildBounties", - "Tips", - "ElectionProviderMultiPhase", - "VoterList", - "NominationPools", - "FastUnstake", - "ParaInclusion", - "Paras", - "Hrmp", - "ParasDisputes", - "Registrar", - "Slots", - "Auctions", - "Crowdloan", - "XcmPallet", - "MessageQueue", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RuntimeEvent { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::System(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "System", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Scheduler(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Scheduler", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Preimage(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Preimage", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Indices(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Indices", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Balances(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Balances", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TransactionPayment(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "TransactionPayment", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Staking(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Staking", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Offences(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Offences", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Session(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Session", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Grandpa(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Grandpa", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ImOnline(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ImOnline", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Democracy(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Democracy", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Council(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Council", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TechnicalCommittee(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "TechnicalCommittee", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PhragmenElection(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "PhragmenElection", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TechnicalMembership(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "TechnicalMembership", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Treasury(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Treasury", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ConvictionVoting(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ConvictionVoting", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Referenda(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Referenda", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Whitelist(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Whitelist", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Claims(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Claims", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Vesting(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Vesting", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Utility(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Utility", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Identity(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Identity", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Proxy(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Proxy", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Multisig(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Multisig", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Bounties(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Bounties", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ChildBounties(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ChildBounties", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Tips(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Tips", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ElectionProviderMultiPhase(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ElectionProviderMultiPhase", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::VoterList(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "VoterList", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NominationPools(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "NominationPools", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FastUnstake(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "FastUnstake", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ParaInclusion(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ParaInclusion", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Paras(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Paras", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Hrmp(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Hrmp", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ParasDisputes(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ParasDisputes", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Registrar(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Registrar", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Slots(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Slots", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Auctions(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Auctions", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Crowdloan(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Crowdloan", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::XcmPallet(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "XcmPallet", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MessageQueue(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "MessageQueue", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RuntimeEvent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - RuntimeEvent::System(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "System", - &__self_0, - ) - } - RuntimeEvent::Scheduler(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Scheduler", - &__self_0, - ) - } - RuntimeEvent::Preimage(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Preimage", - &__self_0, - ) - } - RuntimeEvent::Indices(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Indices", - &__self_0, - ) - } - RuntimeEvent::Balances(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Balances", - &__self_0, - ) - } - RuntimeEvent::TransactionPayment(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "TransactionPayment", - &__self_0, - ) - } - RuntimeEvent::Staking(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Staking", - &__self_0, - ) - } - RuntimeEvent::Offences(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Offences", - &__self_0, - ) - } - RuntimeEvent::Session(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Session", - &__self_0, - ) - } - RuntimeEvent::Grandpa(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Grandpa", - &__self_0, - ) - } - RuntimeEvent::ImOnline(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ImOnline", - &__self_0, - ) - } - RuntimeEvent::Democracy(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Democracy", - &__self_0, - ) - } - RuntimeEvent::Council(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Council", - &__self_0, - ) - } - RuntimeEvent::TechnicalCommittee(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "TechnicalCommittee", - &__self_0, - ) - } - RuntimeEvent::PhragmenElection(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "PhragmenElection", - &__self_0, - ) - } - RuntimeEvent::TechnicalMembership(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "TechnicalMembership", - &__self_0, - ) - } - RuntimeEvent::Treasury(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Treasury", - &__self_0, - ) - } - RuntimeEvent::ConvictionVoting(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ConvictionVoting", - &__self_0, - ) - } - RuntimeEvent::Referenda(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Referenda", - &__self_0, - ) - } - RuntimeEvent::Whitelist(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Whitelist", - &__self_0, - ) - } - RuntimeEvent::Claims(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Claims", - &__self_0, - ) - } - RuntimeEvent::Vesting(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Vesting", - &__self_0, - ) - } - RuntimeEvent::Utility(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Utility", - &__self_0, - ) - } - RuntimeEvent::Identity(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Identity", - &__self_0, - ) - } - RuntimeEvent::Proxy(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Proxy", - &__self_0, - ) - } - RuntimeEvent::Multisig(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Multisig", - &__self_0, - ) - } - RuntimeEvent::Bounties(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Bounties", - &__self_0, - ) - } - RuntimeEvent::ChildBounties(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ChildBounties", - &__self_0, - ) - } - RuntimeEvent::Tips(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Tips", - &__self_0, - ) - } - RuntimeEvent::ElectionProviderMultiPhase(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ElectionProviderMultiPhase", - &__self_0, - ) - } - RuntimeEvent::VoterList(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "VoterList", - &__self_0, - ) - } - RuntimeEvent::NominationPools(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "NominationPools", - &__self_0, - ) - } - RuntimeEvent::FastUnstake(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "FastUnstake", - &__self_0, - ) - } - RuntimeEvent::ParaInclusion(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ParaInclusion", - &__self_0, - ) - } - RuntimeEvent::Paras(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Paras", - &__self_0, - ) - } - RuntimeEvent::Hrmp(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Hrmp", - &__self_0, - ) - } - RuntimeEvent::ParasDisputes(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ParasDisputes", - &__self_0, - ) - } - RuntimeEvent::Registrar(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Registrar", - &__self_0, - ) - } - RuntimeEvent::Slots(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Slots", - &__self_0, - ) - } - RuntimeEvent::Auctions(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Auctions", - &__self_0, - ) - } - RuntimeEvent::Crowdloan(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Crowdloan", - &__self_0, - ) - } - RuntimeEvent::XcmPallet(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "XcmPallet", - &__self_0, - ) - } - RuntimeEvent::MessageQueue(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "MessageQueue", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SessionKeys { - pub grandpa: runtime_types::sp_consensus_grandpa::app::Public, - pub babe: runtime_types::sp_consensus_babe::app::Public, - pub im_online: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - pub para_validator: runtime_types::polkadot_primitives::v4::validator_app::Public, - pub para_assignment: runtime_types::polkadot_primitives::v4::assignment_app::Public, - pub authority_discovery: runtime_types::sp_authority_discovery::app::Public, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SessionKeys { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(SessionKeys { - grandpa: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SessionKeys::grandpa`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - babe: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SessionKeys::babe`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - im_online: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SessionKeys::im_online`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - para_validator: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SessionKeys::para_validator`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - para_assignment: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SessionKeys::para_assignment`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - authority_discovery: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SessionKeys::authority_discovery`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SessionKeys { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.grandpa), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.babe), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.im_online), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para_validator), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.para_assignment, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.authority_discovery, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.grandpa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.babe, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.im_online, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.para_validator, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.para_assignment, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.authority_discovery, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SessionKeys {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for SessionKeys { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SessionKeys; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SessionKeys { - grandpa: { - let val = *vals - .get(&Some("grandpa")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "grandpa".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("grandpa"))? - }, - babe: { - let val = *vals - .get(&Some("babe")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "babe".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("babe"))? - }, - im_online: { - let val = *vals - .get(&Some("im_online")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "im_online".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("im_online"))? - }, - para_validator: { - let val = *vals - .get(&Some("para_validator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_validator".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("para_validator"))? - }, - para_assignment: { - let val = *vals - .get(&Some("para_assignment")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_assignment".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("para_assignment"))? - }, - authority_discovery: { - let val = *vals - .get(&Some("authority_discovery")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "authority_discovery".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_discovery"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = value; - Ok(SessionKeys { - grandpa: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("grandpa"))? - }, - babe: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("babe"))? - }, - im_online: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("im_online"))? - }, - para_validator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("para_validator"))? - }, - para_assignment: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("para_assignment"))? - }, - authority_discovery: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_discovery"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for SessionKeys { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for SessionKeys { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SessionKeys { - grandpa, - babe, - im_online, - para_validator, - para_assignment, - authority_discovery, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("grandpa"), - grandpa as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("babe"), - babe as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("im_online"), - im_online as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("para_validator"), - para_validator - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("para_assignment"), - para_assignment - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("authority_discovery"), - authority_discovery - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for SessionKeys { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SessionKeys { - grandpa, - babe, - im_online, - para_validator, - para_assignment, - authority_discovery, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("grandpa"), - grandpa as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("babe"), - babe as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("im_online"), - im_online as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("para_validator"), - para_validator - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("para_assignment"), - para_assignment - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("authority_discovery"), - authority_discovery - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SessionKeys { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "grandpa", - "babe", - "im_online", - "para_validator", - "para_assignment", - "authority_discovery", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.grandpa, - &self.babe, - &self.im_online, - &self.para_validator, - &self.para_assignment, - &&self.authority_discovery, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "SessionKeys", - names, - values, - ) - } - } - } - pub mod polkadot_runtime_common { - use super::runtime_types; - pub mod auctions { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - new_auction { - #[codec(compact)] - duration: ::core::primitive::u32, - #[codec(compact)] - lease_period_index: ::core::primitive::u32, - }, - #[codec(index = 1)] - 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)] - cancel_auction, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::new_auction { - duration: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::new_auction::duration`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - lease_period_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::new_auction::lease_period_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::bid { - para: { - let __codec_res_edqy = <::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::bid::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - auction_index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::bid::auction_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - first_slot: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::bid::first_slot`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - last_slot: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::bid::last_slot`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - amount: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::bid::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::cancel_auction) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::new_auction { - ref duration, - ref lease_period_index, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(duration), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(lease_period_index), - ), - ) - } - Call::bid { - ref para, - ref auction_index, - ref first_slot, - ref last_slot, - ref amount, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(para), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(auction_index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(first_slot), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(last_slot), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(amount), - ), - ) - } - Call::cancel_auction => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::new_auction { - ref duration, - ref lease_period_index, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(duration), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(lease_period_index), - __codec_dest_edqy, - ); - } - } - Call::bid { - ref para, - ref auction_index, - ref first_slot, - ref last_slot, - ref amount, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(para), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(auction_index), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(first_slot), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(last_slot), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(amount), - __codec_dest_edqy, - ); - } - } - Call::cancel_auction => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "new_auction" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::new_auction { - duration: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("duration"))? - }, - lease_period_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("lease_period_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::new_auction { - duration: { - let val = *vals - .get(&Some("duration")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "duration".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("duration"))? - }, - lease_period_index: { - let val = *vals - .get(&Some("lease_period_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "lease_period_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("lease_period_index"))? - }, - }) - }; - } - if value.name() == "bid" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Call::bid { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - auction_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("auction_index"))? - }, - first_slot: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("first_slot"))? - }, - last_slot: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("last_slot"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::bid { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - auction_index: { - let val = *vals - .get(&Some("auction_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "auction_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("auction_index"))? - }, - first_slot: { - let val = *vals - .get(&Some("first_slot")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "first_slot".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("first_slot"))? - }, - last_slot: { - let val = *vals - .get(&Some("last_slot")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "last_slot".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("last_slot"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "cancel_auction" { - return Ok(Call::cancel_auction); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "new_auction", - "bid", - "cancel_auction", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::new_auction { duration, lease_period_index } => { - ::subxt::ext::scale_encode::Variant { - name: "new_auction", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("duration"), - duration as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("lease_period_index"), - lease_period_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::bid { - para, - auction_index, - first_slot, - last_slot, - amount, - } => { - ::subxt::ext::scale_encode::Variant { - name: "bid", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("auction_index"), - auction_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_slot"), - first_slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_slot"), - last_slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::cancel_auction => { - ::subxt::ext::scale_encode::Variant { - name: "cancel_auction", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::new_auction { - duration: __self_0, - lease_period_index: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "new_auction", - "duration", - __self_0, - "lease_period_index", - &__self_1, - ) - } - Call::bid { - para: __self_0, - auction_index: __self_1, - first_slot: __self_2, - last_slot: __self_3, - amount: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "bid", - "para", - __self_0, - "auction_index", - __self_1, - "first_slot", - __self_2, - "last_slot", - __self_3, - "amount", - &__self_4, - ) - } - Call::cancel_auction => { - ::core::fmt::Formatter::write_str(f, "cancel_auction") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - AuctionInProgress, - #[codec(index = 1)] - LeasePeriodInPast, - #[codec(index = 2)] - ParaNotRegistered, - #[codec(index = 3)] - NotCurrentAuction, - #[codec(index = 4)] - NotAuction, - #[codec(index = 5)] - AuctionEnded, - #[codec(index = 6)] - AlreadyLeasedOut, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AuctionInProgress) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::LeasePeriodInPast) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ParaNotRegistered) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotCurrentAuction) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotAuction) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AuctionEnded) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyLeasedOut) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::AuctionInProgress => 0_usize, - Error::LeasePeriodInPast => 0_usize, - Error::ParaNotRegistered => 0_usize, - Error::NotCurrentAuction => 0_usize, - Error::NotAuction => 0_usize, - Error::AuctionEnded => 0_usize, - Error::AlreadyLeasedOut => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::AuctionInProgress => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::LeasePeriodInPast => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::ParaNotRegistered => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::NotCurrentAuction => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::NotAuction => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::AuctionEnded => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::AlreadyLeasedOut => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "AuctionInProgress" { - return Ok(Error::AuctionInProgress); - } - if value.name() == "LeasePeriodInPast" { - return Ok(Error::LeasePeriodInPast); - } - if value.name() == "ParaNotRegistered" { - return Ok(Error::ParaNotRegistered); - } - if value.name() == "NotCurrentAuction" { - return Ok(Error::NotCurrentAuction); - } - if value.name() == "NotAuction" { - return Ok(Error::NotAuction); - } - if value.name() == "AuctionEnded" { - return Ok(Error::AuctionEnded); - } - if value.name() == "AlreadyLeasedOut" { - return Ok(Error::AlreadyLeasedOut); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "AuctionInProgress", - "LeasePeriodInPast", - "ParaNotRegistered", - "NotCurrentAuction", - "NotAuction", - "AuctionEnded", - "AlreadyLeasedOut", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::AuctionInProgress => { - ::subxt::ext::scale_encode::Variant { - name: "AuctionInProgress", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LeasePeriodInPast => { - ::subxt::ext::scale_encode::Variant { - name: "LeasePeriodInPast", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ParaNotRegistered => { - ::subxt::ext::scale_encode::Variant { - name: "ParaNotRegistered", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotCurrentAuction => { - ::subxt::ext::scale_encode::Variant { - name: "NotCurrentAuction", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotAuction => { - ::subxt::ext::scale_encode::Variant { - name: "NotAuction", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AuctionEnded => { - ::subxt::ext::scale_encode::Variant { - name: "AuctionEnded", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyLeasedOut => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyLeasedOut", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::AuctionInProgress => "AuctionInProgress", - Error::LeasePeriodInPast => "LeasePeriodInPast", - Error::ParaNotRegistered => "ParaNotRegistered", - Error::NotCurrentAuction => "NotCurrentAuction", - Error::NotAuction => "NotAuction", - Error::AuctionEnded => "AuctionEnded", - Error::AlreadyLeasedOut => "AlreadyLeasedOut", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - AuctionStarted { - auction_index: ::core::primitive::u32, - lease_period: ::core::primitive::u32, - ending: ::core::primitive::u32, - }, - #[codec(index = 1)] - AuctionClosed { auction_index: ::core::primitive::u32 }, - #[codec(index = 2)] - Reserved { - bidder: ::subxt::utils::AccountId32, - extra_reserved: ::core::primitive::u128, - total_amount: ::core::primitive::u128, - }, - #[codec(index = 3)] - Unreserved { - bidder: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 4)] - ReserveConfiscated { - para_id: runtime_types::polkadot_parachain::primitives::Id, - leaser: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 5)] - 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)] - WinningOffset { - auction_index: ::core::primitive::u32, - block_number: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::AuctionStarted { - auction_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::AuctionStarted::auction_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - lease_period: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::AuctionStarted::lease_period`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ending: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::AuctionStarted::ending`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::AuctionClosed { - auction_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::AuctionClosed::auction_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Reserved { - bidder: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Reserved::bidder`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - extra_reserved: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::Reserved::extra_reserved`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - total_amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Reserved::total_amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Unreserved { - bidder: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Unreserved::bidder`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Unreserved::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::ReserveConfiscated { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::ReserveConfiscated::para_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - leaser: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::ReserveConfiscated::leaser`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::ReserveConfiscated::amount`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::BidAccepted { - bidder: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BidAccepted::bidder`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BidAccepted::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BidAccepted::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - first_slot: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BidAccepted::first_slot`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - last_slot: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::BidAccepted::last_slot`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::WinningOffset { - auction_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::WinningOffset::auction_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - block_number: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::WinningOffset::block_number`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::AuctionStarted { - ref auction_index, - ref lease_period, - ref ending, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(auction_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(lease_period), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(ending), - ) - } - Event::AuctionClosed { ref auction_index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(auction_index), - ) - } - Event::Reserved { - ref bidder, - ref extra_reserved, - ref total_amount, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(bidder), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(extra_reserved), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(total_amount), - ) - } - Event::Unreserved { ref bidder, ref amount } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(bidder), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::ReserveConfiscated { - ref para_id, - ref leaser, - ref amount, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(leaser), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::BidAccepted { - ref bidder, - ref para_id, - ref amount, - ref first_slot, - ref last_slot, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(bidder), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(first_slot), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(last_slot), - ) - } - Event::WinningOffset { - ref auction_index, - ref block_number, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(auction_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(block_number), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::AuctionStarted { - ref auction_index, - ref lease_period, - ref ending, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - auction_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - lease_period, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ending, - __codec_dest_edqy, - ); - } - Event::AuctionClosed { ref auction_index } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - auction_index, - __codec_dest_edqy, - ); - } - Event::Reserved { - ref bidder, - ref extra_reserved, - ref total_amount, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - bidder, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - extra_reserved, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - total_amount, - __codec_dest_edqy, - ); - } - Event::Unreserved { ref bidder, ref amount } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - bidder, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::ReserveConfiscated { - ref para_id, - ref leaser, - ref amount, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - leaser, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::BidAccepted { - ref bidder, - ref para_id, - ref amount, - ref first_slot, - ref last_slot, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - bidder, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - first_slot, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - last_slot, - __codec_dest_edqy, - ); - } - Event::WinningOffset { - ref auction_index, - ref block_number, - } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - auction_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - block_number, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "AuctionStarted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::AuctionStarted { - auction_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("auction_index"))? - }, - lease_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("lease_period"))? - }, - ending: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ending"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::AuctionStarted { - auction_index: { - let val = *vals - .get(&Some("auction_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "auction_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("auction_index"))? - }, - lease_period: { - let val = *vals - .get(&Some("lease_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "lease_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("lease_period"))? - }, - ending: { - let val = *vals - .get(&Some("ending")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ending".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ending"))? - }, - }) - }; - } - if value.name() == "AuctionClosed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::AuctionClosed { - auction_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("auction_index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::AuctionClosed { - auction_index: { - let val = *vals - .get(&Some("auction_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "auction_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("auction_index"))? - }, - }) - }; - } - if value.name() == "Reserved" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::Reserved { - bidder: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bidder"))? - }, - extra_reserved: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("extra_reserved"))? - }, - total_amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("total_amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Reserved { - bidder: { - let val = *vals - .get(&Some("bidder")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bidder".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bidder"))? - }, - extra_reserved: { - let val = *vals - .get(&Some("extra_reserved")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "extra_reserved".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("extra_reserved"))? - }, - total_amount: { - let val = *vals - .get(&Some("total_amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "total_amount".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("total_amount"))? - }, - }) - }; - } - if value.name() == "Unreserved" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Unreserved { - bidder: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bidder"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Unreserved { - bidder: { - let val = *vals - .get(&Some("bidder")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bidder".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bidder"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "ReserveConfiscated" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::ReserveConfiscated { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - leaser: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("leaser"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::ReserveConfiscated { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - leaser: { - let val = *vals - .get(&Some("leaser")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "leaser".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("leaser"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "BidAccepted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Event::BidAccepted { - bidder: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bidder"))? - }, - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - first_slot: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("first_slot"))? - }, - last_slot: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("last_slot"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::BidAccepted { - bidder: { - let val = *vals - .get(&Some("bidder")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bidder".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bidder"))? - }, - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - first_slot: { - let val = *vals - .get(&Some("first_slot")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "first_slot".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("first_slot"))? - }, - last_slot: { - let val = *vals - .get(&Some("last_slot")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "last_slot".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("last_slot"))? - }, - }) - }; - } - if value.name() == "WinningOffset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::WinningOffset { - auction_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("auction_index"))? - }, - block_number: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("block_number"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::WinningOffset { - auction_index: { - let val = *vals - .get(&Some("auction_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "auction_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("auction_index"))? - }, - block_number: { - let val = *vals - .get(&Some("block_number")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "block_number".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("block_number"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "AuctionStarted", - "AuctionClosed", - "Reserved", - "Unreserved", - "ReserveConfiscated", - "BidAccepted", - "WinningOffset", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::AuctionStarted { - auction_index, - lease_period, - ending, - } => { - ::subxt::ext::scale_encode::Variant { - name: "AuctionStarted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("auction_index"), - auction_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("lease_period"), - lease_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ending"), - ending as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AuctionClosed { auction_index } => { - ::subxt::ext::scale_encode::Variant { - name: "AuctionClosed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("auction_index"), - auction_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Reserved { bidder, extra_reserved, total_amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Reserved", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bidder"), - bidder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("extra_reserved"), - extra_reserved - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("total_amount"), - total_amount - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unreserved { bidder, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Unreserved", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bidder"), - bidder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReserveConfiscated { para_id, leaser, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "ReserveConfiscated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("leaser"), - leaser as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BidAccepted { - bidder, - para_id, - amount, - first_slot, - last_slot, - } => { - ::subxt::ext::scale_encode::Variant { - name: "BidAccepted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bidder"), - bidder as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_slot"), - first_slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_slot"), - last_slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WinningOffset { auction_index, block_number } => { - ::subxt::ext::scale_encode::Variant { - name: "WinningOffset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("auction_index"), - auction_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("block_number"), - block_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::AuctionStarted { - auction_index: __self_0, - lease_period: __self_1, - ending: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "AuctionStarted", - "auction_index", - __self_0, - "lease_period", - __self_1, - "ending", - &__self_2, - ) - } - Event::AuctionClosed { auction_index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "AuctionClosed", - "auction_index", - &__self_0, - ) - } - Event::Reserved { - bidder: __self_0, - extra_reserved: __self_1, - total_amount: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Reserved", - "bidder", - __self_0, - "extra_reserved", - __self_1, - "total_amount", - &__self_2, - ) - } - Event::Unreserved { bidder: __self_0, amount: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Unreserved", - "bidder", - __self_0, - "amount", - &__self_1, - ) - } - Event::ReserveConfiscated { - para_id: __self_0, - leaser: __self_1, - amount: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ReserveConfiscated", - "para_id", - __self_0, - "leaser", - __self_1, - "amount", - &__self_2, - ) - } - Event::BidAccepted { - bidder: __self_0, - para_id: __self_1, - amount: __self_2, - first_slot: __self_3, - last_slot: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "BidAccepted", - "bidder", - __self_0, - "para_id", - __self_1, - "amount", - __self_2, - "first_slot", - __self_3, - "last_slot", - &__self_4, - ) - } - Event::WinningOffset { - auction_index: __self_0, - block_number: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "WinningOffset", - "auction_index", - __self_0, - "block_number", - &__self_1, - ) - } - } - } - } - } - } - pub mod claims { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - claim { - dest: ::subxt::utils::AccountId32, - ethereum_signature: runtime_types::polkadot_runtime_common::claims::EcdsaSignature, - }, - #[codec(index = 1)] - 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)] - 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)] - 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, - >, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::claim { - dest: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::claim::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ethereum_signature: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::claim::ethereum_signature`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::mint_claim { - who: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::mint_claim::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - value: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::mint_claim::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - vesting_schedule: { - let __codec_res_edqy = <::core::option::Option< - ( - ::core::primitive::u128, - ::core::primitive::u128, - ::core::primitive::u32, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::mint_claim::vesting_schedule`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - statement: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::polkadot_runtime_common::claims::StatementKind, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::mint_claim::statement`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::claim_attest { - dest: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::claim_attest::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ethereum_signature: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::claim_attest::ethereum_signature`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - statement: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::claim_attest::statement`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::attest { - statement: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::attest::statement`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::move_claim { - old: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::move_claim::old`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::move_claim::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maybe_preclaim: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::AccountId32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::move_claim::maybe_preclaim`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::claim { ref dest, ref ethereum_signature } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(ethereum_signature), - ) - } - Call::mint_claim { - ref who, - ref value, - ref vesting_schedule, - ref statement, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(value), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(vesting_schedule), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(statement), - ) - } - Call::claim_attest { - ref dest, - ref ethereum_signature, - ref statement, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(ethereum_signature), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(statement), - ) - } - Call::attest { ref statement } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(statement), - ) - } - Call::move_claim { - ref old, - ref new, - ref maybe_preclaim, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(old)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maybe_preclaim), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::claim { ref dest, ref ethereum_signature } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ethereum_signature, - __codec_dest_edqy, - ); - } - Call::mint_claim { - ref who, - ref value, - ref vesting_schedule, - ref statement, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - value, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - vesting_schedule, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - statement, - __codec_dest_edqy, - ); - } - Call::claim_attest { - ref dest, - ref ethereum_signature, - ref statement, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ethereum_signature, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - statement, - __codec_dest_edqy, - ); - } - Call::attest { ref statement } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - statement, - __codec_dest_edqy, - ); - } - Call::move_claim { - ref old, - ref new, - ref maybe_preclaim, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - old, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - maybe_preclaim, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "claim" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::claim { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - ethereum_signature: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("ethereum_signature"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::claim { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - ethereum_signature: { - let val = *vals - .get(&Some("ethereum_signature")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ethereum_signature".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("ethereum_signature"))? - }, - }) - }; - } - if value.name() == "mint_claim" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Call::mint_claim { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - vesting_schedule: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("vesting_schedule"))? - }, - statement: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("statement"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::mint_claim { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - vesting_schedule: { - let val = *vals - .get(&Some("vesting_schedule")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "vesting_schedule".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("vesting_schedule"))? - }, - statement: { - let val = *vals - .get(&Some("statement")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "statement".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("statement"))? - }, - }) - }; - } - if value.name() == "claim_attest" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::claim_attest { - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - ethereum_signature: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("ethereum_signature"))? - }, - statement: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("statement"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::claim_attest { - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - ethereum_signature: { - let val = *vals - .get(&Some("ethereum_signature")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ethereum_signature".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("ethereum_signature"))? - }, - statement: { - let val = *vals - .get(&Some("statement")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "statement".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("statement"))? - }, - }) - }; - } - if value.name() == "attest" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::attest { - statement: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("statement"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::attest { - statement: { - let val = *vals - .get(&Some("statement")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "statement".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("statement"))? - }, - }) - }; - } - if value.name() == "move_claim" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::move_claim { - old: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("old"))? - }, - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - maybe_preclaim: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_preclaim"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::move_claim { - old: { - let val = *vals - .get(&Some("old")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "old".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("old"))? - }, - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - maybe_preclaim: { - let val = *vals - .get(&Some("maybe_preclaim")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maybe_preclaim".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("maybe_preclaim"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "claim", - "mint_claim", - "claim_attest", - "attest", - "move_claim", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::claim { dest, ethereum_signature } => { - ::subxt::ext::scale_encode::Variant { - name: "claim", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ethereum_signature"), - ethereum_signature - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::mint_claim { - who, - value, - vesting_schedule, - statement, - } => { - ::subxt::ext::scale_encode::Variant { - name: "mint_claim", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("vesting_schedule"), - vesting_schedule - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("statement"), - statement as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::claim_attest { - dest, - ethereum_signature, - statement, - } => { - ::subxt::ext::scale_encode::Variant { - name: "claim_attest", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ethereum_signature"), - ethereum_signature - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("statement"), - statement as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::attest { statement } => { - ::subxt::ext::scale_encode::Variant { - name: "attest", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("statement"), - statement as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::move_claim { old, new, maybe_preclaim } => { - ::subxt::ext::scale_encode::Variant { - name: "move_claim", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("old"), - old as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maybe_preclaim"), - maybe_preclaim - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::claim { - dest: __self_0, - ethereum_signature: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "claim", - "dest", - __self_0, - "ethereum_signature", - &__self_1, - ) - } - Call::mint_claim { - who: __self_0, - value: __self_1, - vesting_schedule: __self_2, - statement: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "mint_claim", - "who", - __self_0, - "value", - __self_1, - "vesting_schedule", - __self_2, - "statement", - &__self_3, - ) - } - Call::claim_attest { - dest: __self_0, - ethereum_signature: __self_1, - statement: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "claim_attest", - "dest", - __self_0, - "ethereum_signature", - __self_1, - "statement", - &__self_2, - ) - } - Call::attest { statement: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "attest", - "statement", - &__self_0, - ) - } - Call::move_claim { - old: __self_0, - new: __self_1, - maybe_preclaim: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "move_claim", - "old", - __self_0, - "new", - __self_1, - "maybe_preclaim", - &__self_2, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - InvalidEthereumSignature, - #[codec(index = 1)] - SignerHasNoClaim, - #[codec(index = 2)] - SenderHasNoClaim, - #[codec(index = 3)] - PotUnderflow, - #[codec(index = 4)] - InvalidStatement, - #[codec(index = 5)] - VestedBalanceExists, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidEthereumSignature) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::SignerHasNoClaim) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::SenderHasNoClaim) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::PotUnderflow) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidStatement) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::VestedBalanceExists) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::InvalidEthereumSignature => 0_usize, - Error::SignerHasNoClaim => 0_usize, - Error::SenderHasNoClaim => 0_usize, - Error::PotUnderflow => 0_usize, - Error::InvalidStatement => 0_usize, - Error::VestedBalanceExists => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::InvalidEthereumSignature => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::SignerHasNoClaim => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::SenderHasNoClaim => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::PotUnderflow => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::InvalidStatement => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::VestedBalanceExists => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "InvalidEthereumSignature" { - return Ok(Error::InvalidEthereumSignature); - } - if value.name() == "SignerHasNoClaim" { - return Ok(Error::SignerHasNoClaim); - } - if value.name() == "SenderHasNoClaim" { - return Ok(Error::SenderHasNoClaim); - } - if value.name() == "PotUnderflow" { - return Ok(Error::PotUnderflow); - } - if value.name() == "InvalidStatement" { - return Ok(Error::InvalidStatement); - } - if value.name() == "VestedBalanceExists" { - return Ok(Error::VestedBalanceExists); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "InvalidEthereumSignature", - "SignerHasNoClaim", - "SenderHasNoClaim", - "PotUnderflow", - "InvalidStatement", - "VestedBalanceExists", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::InvalidEthereumSignature => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidEthereumSignature", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SignerHasNoClaim => { - ::subxt::ext::scale_encode::Variant { - name: "SignerHasNoClaim", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SenderHasNoClaim => { - ::subxt::ext::scale_encode::Variant { - name: "SenderHasNoClaim", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PotUnderflow => { - ::subxt::ext::scale_encode::Variant { - name: "PotUnderflow", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidStatement => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidStatement", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::VestedBalanceExists => { - ::subxt::ext::scale_encode::Variant { - name: "VestedBalanceExists", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::InvalidEthereumSignature => { - "InvalidEthereumSignature" - } - Error::SignerHasNoClaim => "SignerHasNoClaim", - Error::SenderHasNoClaim => "SenderHasNoClaim", - Error::PotUnderflow => "PotUnderflow", - Error::InvalidStatement => "InvalidStatement", - Error::VestedBalanceExists => "VestedBalanceExists", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - Claimed { - who: ::subxt::utils::AccountId32, - ethereum_address: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - amount: ::core::primitive::u128, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Claimed { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Claimed::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ethereum_address: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::Claimed::ethereum_address`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Claimed::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::Claimed { - ref who, - ref ethereum_address, - ref amount, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(ethereum_address), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::Claimed { - ref who, - ref ethereum_address, - ref amount, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ethereum_address, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Claimed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::Claimed { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - ethereum_address: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("ethereum_address"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Claimed { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - ethereum_address: { - let val = *vals - .get(&Some("ethereum_address")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ethereum_address".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("ethereum_address"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Claimed"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Claimed { who, ethereum_address, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Claimed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ethereum_address"), - ethereum_address - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::Claimed { - who: __self_0, - ethereum_address: __self_1, - amount: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Claimed", - "who", - __self_0, - "ethereum_address", - __self_1, - "amount", - &__self_2, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct EcdsaSignature(pub [::core::primitive::u8; 65usize]); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for EcdsaSignature { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - EcdsaSignature({ - let __codec_res_edqy = <[::core::primitive::u8; 65usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `EcdsaSignature.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for EcdsaSignature { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for EcdsaSignature {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for EcdsaSignature { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = EcdsaSignature; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - EcdsaSignature({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for EcdsaSignature { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for EcdsaSignature { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EcdsaSignature(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for EcdsaSignature { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EcdsaSignature(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for EcdsaSignature { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "EcdsaSignature", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct EthereumAddress(pub [::core::primitive::u8; 20usize]); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for EthereumAddress { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - EthereumAddress({ - let __codec_res_edqy = <[::core::primitive::u8; 20usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `EthereumAddress.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for EthereumAddress { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for EthereumAddress {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for EthereumAddress { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = EthereumAddress; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - EthereumAddress({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for EthereumAddress { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for EthereumAddress { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EthereumAddress(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for EthereumAddress { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EthereumAddress(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for EthereumAddress { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "EthereumAddress", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PrevalidateAttests; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PrevalidateAttests { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(PrevalidateAttests) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PrevalidateAttests { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PrevalidateAttests {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for PrevalidateAttests { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PrevalidateAttests; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(PrevalidateAttests) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PrevalidateAttests { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for PrevalidateAttests { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PrevalidateAttests = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for PrevalidateAttests { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PrevalidateAttests = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PrevalidateAttests { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "PrevalidateAttests") - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum StatementKind { - #[codec(index = 0)] - Regular, - #[codec(index = 1)] - Saft, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for StatementKind { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `StatementKind`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(StatementKind::Regular) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(StatementKind::Saft) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `StatementKind`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for StatementKind { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - StatementKind::Regular => 0_usize, - StatementKind::Saft => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - StatementKind::Regular => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - StatementKind::Saft => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for StatementKind {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for StatementKind { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = StatementKind; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Regular" { - return Ok(StatementKind::Regular); - } - if value.name() == "Saft" { - return Ok(StatementKind::Saft); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Regular", "Saft"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for StatementKind { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Regular => { - ::subxt::ext::scale_encode::Variant { - name: "Regular", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Saft => { - ::subxt::ext::scale_encode::Variant { - name: "Saft", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for StatementKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - StatementKind::Regular => "Regular", - StatementKind::Saft => "Saft", - }, - ) - } - } - } - pub mod crowdloan { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - 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)] - 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)] - withdraw { - who: ::subxt::utils::AccountId32, - #[codec(compact)] - index: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 3)] - refund { - #[codec(compact)] - index: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 4)] - dissolve { - #[codec(compact)] - index: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 5)] - 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)] - add_memo { - index: runtime_types::polkadot_parachain::primitives::Id, - memo: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 7)] - poke { - index: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 8)] - contribute_all { - #[codec(compact)] - index: runtime_types::polkadot_parachain::primitives::Id, - signature: ::core::option::Option< - runtime_types::sp_runtime::MultiSignature, - >, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::create { - index: { - let __codec_res_edqy = <::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::create::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - cap: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::create::cap`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - first_period: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::create::first_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - last_period: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::create::last_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - end: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::create::end`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - verifier: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::sp_runtime::MultiSigner, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::create::verifier`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::contribute { - index: { - let __codec_res_edqy = <::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::contribute::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - value: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::contribute::value`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - signature: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::sp_runtime::MultiSignature, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::contribute::signature`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::withdraw { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::withdraw::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::withdraw::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::refund { - index: { - let __codec_res_edqy = <::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::refund::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::dissolve { - index: { - let __codec_res_edqy = <::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::dissolve::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::edit { - index: { - let __codec_res_edqy = <::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::edit::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - cap: { - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::edit::cap`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - first_period: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::edit::first_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - last_period: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::edit::last_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - end: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::edit::end`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - verifier: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::sp_runtime::MultiSigner, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::edit::verifier`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::add_memo { - index: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::add_memo::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - memo: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::add_memo::memo`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::poke { - index: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::poke::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::contribute_all { - index: { - let __codec_res_edqy = <::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::contribute_all::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - signature: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::sp_runtime::MultiSignature, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::contribute_all::signature`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::create { - ref index, - ref cap, - ref first_period, - ref last_period, - ref end, - ref verifier, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(cap), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(first_period), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(last_period), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(end), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(verifier), - ) - } - Call::contribute { ref index, ref value, ref signature } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(signature), - ) - } - Call::withdraw { ref who, ref index } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(index), - ), - ) - } - Call::refund { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(index), - ), - ) - } - Call::dissolve { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(index), - ), - ) - } - Call::edit { - ref index, - ref cap, - ref first_period, - ref last_period, - ref end, - ref verifier, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(cap), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(first_period), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(last_period), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(end), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(verifier), - ) - } - Call::add_memo { ref index, ref memo } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(memo), - ) - } - Call::poke { ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(index), - ) - } - Call::contribute_all { ref index, ref signature } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(signature), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::create { - ref index, - ref cap, - ref first_period, - ref last_period, - ref end, - ref verifier, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(cap), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(first_period), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(last_period), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(end), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - verifier, - __codec_dest_edqy, - ); - } - Call::contribute { - ref index, - ref value, - ref signature, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(value), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - signature, - __codec_dest_edqy, - ); - } - Call::withdraw { ref who, ref index } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - } - Call::refund { ref index } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - } - Call::dissolve { ref index } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - } - Call::edit { - ref index, - ref cap, - ref first_period, - ref last_period, - ref end, - ref verifier, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(cap), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(first_period), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(last_period), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(end), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - verifier, - __codec_dest_edqy, - ); - } - Call::add_memo { ref index, ref memo } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - memo, - __codec_dest_edqy, - ); - } - Call::poke { ref index } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - index, - __codec_dest_edqy, - ); - } - Call::contribute_all { ref index, ref signature } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - runtime_types::polkadot_parachain::primitives::Id, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - signature, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "create" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = fields; - Ok(Call::create { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - cap: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("cap"))? - }, - first_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("first_period"))? - }, - last_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("last_period"))? - }, - end: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - verifier: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("verifier"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::create { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - cap: { - let val = *vals - .get(&Some("cap")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "cap".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("cap"))? - }, - first_period: { - let val = *vals - .get(&Some("first_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "first_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("first_period"))? - }, - last_period: { - let val = *vals - .get(&Some("last_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "last_period".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("last_period"))? - }, - end: { - let val = *vals - .get(&Some("end")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "end".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - verifier: { - let val = *vals - .get(&Some("verifier")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "verifier".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("verifier"))? - }, - }) - }; - } - if value.name() == "contribute" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::contribute { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - value: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - signature: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::contribute { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - value: { - let val = *vals - .get(&Some("value")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "value".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("value"))? - }, - signature: { - let val = *vals - .get(&Some("signature")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "signature".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - }) - }; - } - if value.name() == "withdraw" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::withdraw { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::withdraw { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "refund" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::refund { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::refund { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "dissolve" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::dissolve { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::dissolve { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "edit" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = fields; - Ok(Call::edit { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - cap: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("cap"))? - }, - first_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("first_period"))? - }, - last_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("last_period"))? - }, - end: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - verifier: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("verifier"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::edit { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - cap: { - let val = *vals - .get(&Some("cap")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "cap".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("cap"))? - }, - first_period: { - let val = *vals - .get(&Some("first_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "first_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("first_period"))? - }, - last_period: { - let val = *vals - .get(&Some("last_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "last_period".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("last_period"))? - }, - end: { - let val = *vals - .get(&Some("end")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "end".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - verifier: { - let val = *vals - .get(&Some("verifier")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "verifier".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("verifier"))? - }, - }) - }; - } - if value.name() == "add_memo" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::add_memo { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - memo: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("memo"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::add_memo { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - memo: { - let val = *vals - .get(&Some("memo")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "memo".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("memo"))? - }, - }) - }; - } - if value.name() == "poke" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::poke { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::poke { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "contribute_all" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::contribute_all { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - signature: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::contribute_all { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - signature: { - let val = *vals - .get(&Some("signature")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "signature".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "create", - "contribute", - "withdraw", - "refund", - "dissolve", - "edit", - "add_memo", - "poke", - "contribute_all", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::create { - index, - cap, - first_period, - last_period, - end, - verifier, - } => { - ::subxt::ext::scale_encode::Variant { - name: "create", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("cap"), - cap as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_period"), - first_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_period"), - last_period as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("end"), - end as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("verifier"), - verifier as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::contribute { index, value, signature } => { - ::subxt::ext::scale_encode::Variant { - name: "contribute", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("value"), - value as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("signature"), - signature as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::withdraw { who, index } => { - ::subxt::ext::scale_encode::Variant { - name: "withdraw", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::refund { index } => { - ::subxt::ext::scale_encode::Variant { - name: "refund", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::dissolve { index } => { - ::subxt::ext::scale_encode::Variant { - name: "dissolve", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::edit { - index, - cap, - first_period, - last_period, - end, - verifier, - } => { - ::subxt::ext::scale_encode::Variant { - name: "edit", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("cap"), - cap as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_period"), - first_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_period"), - last_period as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("end"), - end as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("verifier"), - verifier as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::add_memo { index, memo } => { - ::subxt::ext::scale_encode::Variant { - name: "add_memo", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("memo"), - memo as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::poke { index } => { - ::subxt::ext::scale_encode::Variant { - name: "poke", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::contribute_all { index, signature } => { - ::subxt::ext::scale_encode::Variant { - name: "contribute_all", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("signature"), - signature as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::create { - index: __self_0, - cap: __self_1, - first_period: __self_2, - last_period: __self_3, - end: __self_4, - verifier: __self_5, - } => { - let names: &'static _ = &[ - "index", - "cap", - "first_period", - "last_period", - "end", - "verifier", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - &__self_5, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "create", - names, - values, - ) - } - Call::contribute { - index: __self_0, - value: __self_1, - signature: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "contribute", - "index", - __self_0, - "value", - __self_1, - "signature", - &__self_2, - ) - } - Call::withdraw { who: __self_0, index: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "withdraw", - "who", - __self_0, - "index", - &__self_1, - ) - } - Call::refund { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "refund", - "index", - &__self_0, - ) - } - Call::dissolve { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "dissolve", - "index", - &__self_0, - ) - } - Call::edit { - index: __self_0, - cap: __self_1, - first_period: __self_2, - last_period: __self_3, - end: __self_4, - verifier: __self_5, - } => { - let names: &'static _ = &[ - "index", - "cap", - "first_period", - "last_period", - "end", - "verifier", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - &__self_5, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "edit", - names, - values, - ) - } - Call::add_memo { index: __self_0, memo: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "add_memo", - "index", - __self_0, - "memo", - &__self_1, - ) - } - Call::poke { index: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "poke", - "index", - &__self_0, - ) - } - Call::contribute_all { - index: __self_0, - signature: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "contribute_all", - "index", - __self_0, - "signature", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - FirstPeriodInPast, - #[codec(index = 1)] - FirstPeriodTooFarInFuture, - #[codec(index = 2)] - LastPeriodBeforeFirstPeriod, - #[codec(index = 3)] - LastPeriodTooFarInFuture, - #[codec(index = 4)] - CannotEndInPast, - #[codec(index = 5)] - EndTooFarInFuture, - #[codec(index = 6)] - Overflow, - #[codec(index = 7)] - ContributionTooSmall, - #[codec(index = 8)] - InvalidParaId, - #[codec(index = 9)] - CapExceeded, - #[codec(index = 10)] - ContributionPeriodOver, - #[codec(index = 11)] - InvalidOrigin, - #[codec(index = 12)] - NotParachain, - #[codec(index = 13)] - LeaseActive, - #[codec(index = 14)] - BidOrLeaseActive, - #[codec(index = 15)] - FundNotEnded, - #[codec(index = 16)] - NoContributions, - #[codec(index = 17)] - NotReadyToDissolve, - #[codec(index = 18)] - InvalidSignature, - #[codec(index = 19)] - MemoTooLarge, - #[codec(index = 20)] - AlreadyInNewRaise, - #[codec(index = 21)] - VrfDelayInProgress, - #[codec(index = 22)] - NoLeasePeriod, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::FirstPeriodInPast) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::FirstPeriodTooFarInFuture) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::LastPeriodBeforeFirstPeriod, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::LastPeriodTooFarInFuture) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CannotEndInPast) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::EndTooFarInFuture) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Overflow) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ContributionTooSmall) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidParaId) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CapExceeded) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ContributionPeriodOver) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidOrigin) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotParachain) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::LeaseActive) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::BidOrLeaseActive) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::FundNotEnded) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoContributions) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotReadyToDissolve) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidSignature) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MemoTooLarge) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyInNewRaise) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::VrfDelayInProgress) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 22u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoLeasePeriod) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::FirstPeriodInPast => 0_usize, - Error::FirstPeriodTooFarInFuture => 0_usize, - Error::LastPeriodBeforeFirstPeriod => 0_usize, - Error::LastPeriodTooFarInFuture => 0_usize, - Error::CannotEndInPast => 0_usize, - Error::EndTooFarInFuture => 0_usize, - Error::Overflow => 0_usize, - Error::ContributionTooSmall => 0_usize, - Error::InvalidParaId => 0_usize, - Error::CapExceeded => 0_usize, - Error::ContributionPeriodOver => 0_usize, - Error::InvalidOrigin => 0_usize, - Error::NotParachain => 0_usize, - Error::LeaseActive => 0_usize, - Error::BidOrLeaseActive => 0_usize, - Error::FundNotEnded => 0_usize, - Error::NoContributions => 0_usize, - Error::NotReadyToDissolve => 0_usize, - Error::InvalidSignature => 0_usize, - Error::MemoTooLarge => 0_usize, - Error::AlreadyInNewRaise => 0_usize, - Error::VrfDelayInProgress => 0_usize, - Error::NoLeasePeriod => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::FirstPeriodInPast => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::FirstPeriodTooFarInFuture => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::LastPeriodBeforeFirstPeriod => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::LastPeriodTooFarInFuture => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::CannotEndInPast => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::EndTooFarInFuture => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::Overflow => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::ContributionTooSmall => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::InvalidParaId => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::CapExceeded => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::ContributionPeriodOver => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Error::InvalidOrigin => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - Error::NotParachain => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - Error::LeaseActive => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - } - Error::BidOrLeaseActive => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - } - Error::FundNotEnded => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - } - Error::NoContributions => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - } - Error::NotReadyToDissolve => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - } - Error::InvalidSignature => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - } - Error::MemoTooLarge => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - } - Error::AlreadyInNewRaise => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - } - Error::VrfDelayInProgress => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - } - Error::NoLeasePeriod => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(22u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "FirstPeriodInPast" { - return Ok(Error::FirstPeriodInPast); - } - if value.name() == "FirstPeriodTooFarInFuture" { - return Ok(Error::FirstPeriodTooFarInFuture); - } - if value.name() == "LastPeriodBeforeFirstPeriod" { - return Ok(Error::LastPeriodBeforeFirstPeriod); - } - if value.name() == "LastPeriodTooFarInFuture" { - return Ok(Error::LastPeriodTooFarInFuture); - } - if value.name() == "CannotEndInPast" { - return Ok(Error::CannotEndInPast); - } - if value.name() == "EndTooFarInFuture" { - return Ok(Error::EndTooFarInFuture); - } - if value.name() == "Overflow" { - return Ok(Error::Overflow); - } - if value.name() == "ContributionTooSmall" { - return Ok(Error::ContributionTooSmall); - } - if value.name() == "InvalidParaId" { - return Ok(Error::InvalidParaId); - } - if value.name() == "CapExceeded" { - return Ok(Error::CapExceeded); - } - if value.name() == "ContributionPeriodOver" { - return Ok(Error::ContributionPeriodOver); - } - if value.name() == "InvalidOrigin" { - return Ok(Error::InvalidOrigin); - } - if value.name() == "NotParachain" { - return Ok(Error::NotParachain); - } - if value.name() == "LeaseActive" { - return Ok(Error::LeaseActive); - } - if value.name() == "BidOrLeaseActive" { - return Ok(Error::BidOrLeaseActive); - } - if value.name() == "FundNotEnded" { - return Ok(Error::FundNotEnded); - } - if value.name() == "NoContributions" { - return Ok(Error::NoContributions); - } - if value.name() == "NotReadyToDissolve" { - return Ok(Error::NotReadyToDissolve); - } - if value.name() == "InvalidSignature" { - return Ok(Error::InvalidSignature); - } - if value.name() == "MemoTooLarge" { - return Ok(Error::MemoTooLarge); - } - if value.name() == "AlreadyInNewRaise" { - return Ok(Error::AlreadyInNewRaise); - } - if value.name() == "VrfDelayInProgress" { - return Ok(Error::VrfDelayInProgress); - } - if value.name() == "NoLeasePeriod" { - return Ok(Error::NoLeasePeriod); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "FirstPeriodInPast", - "FirstPeriodTooFarInFuture", - "LastPeriodBeforeFirstPeriod", - "LastPeriodTooFarInFuture", - "CannotEndInPast", - "EndTooFarInFuture", - "Overflow", - "ContributionTooSmall", - "InvalidParaId", - "CapExceeded", - "ContributionPeriodOver", - "InvalidOrigin", - "NotParachain", - "LeaseActive", - "BidOrLeaseActive", - "FundNotEnded", - "NoContributions", - "NotReadyToDissolve", - "InvalidSignature", - "MemoTooLarge", - "AlreadyInNewRaise", - "VrfDelayInProgress", - "NoLeasePeriod", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::FirstPeriodInPast => { - ::subxt::ext::scale_encode::Variant { - name: "FirstPeriodInPast", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FirstPeriodTooFarInFuture => { - ::subxt::ext::scale_encode::Variant { - name: "FirstPeriodTooFarInFuture", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LastPeriodBeforeFirstPeriod => { - ::subxt::ext::scale_encode::Variant { - name: "LastPeriodBeforeFirstPeriod", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LastPeriodTooFarInFuture => { - ::subxt::ext::scale_encode::Variant { - name: "LastPeriodTooFarInFuture", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CannotEndInPast => { - ::subxt::ext::scale_encode::Variant { - name: "CannotEndInPast", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::EndTooFarInFuture => { - ::subxt::ext::scale_encode::Variant { - name: "EndTooFarInFuture", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Overflow => { - ::subxt::ext::scale_encode::Variant { - name: "Overflow", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ContributionTooSmall => { - ::subxt::ext::scale_encode::Variant { - name: "ContributionTooSmall", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidParaId => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidParaId", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CapExceeded => { - ::subxt::ext::scale_encode::Variant { - name: "CapExceeded", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ContributionPeriodOver => { - ::subxt::ext::scale_encode::Variant { - name: "ContributionPeriodOver", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidOrigin => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidOrigin", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotParachain => { - ::subxt::ext::scale_encode::Variant { - name: "NotParachain", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LeaseActive => { - ::subxt::ext::scale_encode::Variant { - name: "LeaseActive", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BidOrLeaseActive => { - ::subxt::ext::scale_encode::Variant { - name: "BidOrLeaseActive", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FundNotEnded => { - ::subxt::ext::scale_encode::Variant { - name: "FundNotEnded", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoContributions => { - ::subxt::ext::scale_encode::Variant { - name: "NoContributions", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotReadyToDissolve => { - ::subxt::ext::scale_encode::Variant { - name: "NotReadyToDissolve", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidSignature => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidSignature", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MemoTooLarge => { - ::subxt::ext::scale_encode::Variant { - name: "MemoTooLarge", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyInNewRaise => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyInNewRaise", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::VrfDelayInProgress => { - ::subxt::ext::scale_encode::Variant { - name: "VrfDelayInProgress", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoLeasePeriod => { - ::subxt::ext::scale_encode::Variant { - name: "NoLeasePeriod", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::FirstPeriodInPast => "FirstPeriodInPast", - Error::FirstPeriodTooFarInFuture => { - "FirstPeriodTooFarInFuture" - } - Error::LastPeriodBeforeFirstPeriod => { - "LastPeriodBeforeFirstPeriod" - } - Error::LastPeriodTooFarInFuture => { - "LastPeriodTooFarInFuture" - } - Error::CannotEndInPast => "CannotEndInPast", - Error::EndTooFarInFuture => "EndTooFarInFuture", - Error::Overflow => "Overflow", - Error::ContributionTooSmall => "ContributionTooSmall", - Error::InvalidParaId => "InvalidParaId", - Error::CapExceeded => "CapExceeded", - Error::ContributionPeriodOver => "ContributionPeriodOver", - Error::InvalidOrigin => "InvalidOrigin", - Error::NotParachain => "NotParachain", - Error::LeaseActive => "LeaseActive", - Error::BidOrLeaseActive => "BidOrLeaseActive", - Error::FundNotEnded => "FundNotEnded", - Error::NoContributions => "NoContributions", - Error::NotReadyToDissolve => "NotReadyToDissolve", - Error::InvalidSignature => "InvalidSignature", - Error::MemoTooLarge => "MemoTooLarge", - Error::AlreadyInNewRaise => "AlreadyInNewRaise", - Error::VrfDelayInProgress => "VrfDelayInProgress", - Error::NoLeasePeriod => "NoLeasePeriod", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - Created { - para_id: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 1)] - Contributed { - who: ::subxt::utils::AccountId32, - fund_index: runtime_types::polkadot_parachain::primitives::Id, - amount: ::core::primitive::u128, - }, - #[codec(index = 2)] - Withdrew { - who: ::subxt::utils::AccountId32, - fund_index: runtime_types::polkadot_parachain::primitives::Id, - amount: ::core::primitive::u128, - }, - #[codec(index = 3)] - PartiallyRefunded { - para_id: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 4)] - AllRefunded { - para_id: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 5)] - Dissolved { - para_id: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 6)] - HandleBidResult { - para_id: runtime_types::polkadot_parachain::primitives::Id, - result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - }, - #[codec(index = 7)] - Edited { - para_id: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 8)] - MemoUpdated { - who: ::subxt::utils::AccountId32, - para_id: runtime_types::polkadot_parachain::primitives::Id, - memo: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 9)] - AddedToNewRaise { - para_id: runtime_types::polkadot_parachain::primitives::Id, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Created { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Created::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Contributed { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Contributed::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fund_index: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Contributed::fund_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Contributed::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Withdrew { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Withdrew::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fund_index: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Withdrew::fund_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Withdrew::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::PartiallyRefunded { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::PartiallyRefunded::para_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::AllRefunded { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::AllRefunded::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Dissolved { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Dissolved::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::HandleBidResult { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::HandleBidResult::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - result: { - let __codec_res_edqy = <::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::HandleBidResult::result`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Edited { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Edited::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::MemoUpdated { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::MemoUpdated::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::MemoUpdated::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - memo: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::MemoUpdated::memo`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::AddedToNewRaise { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::AddedToNewRaise::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::Created { ref para_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para_id), - ) - } - Event::Contributed { - ref who, - ref fund_index, - ref amount, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(fund_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::Withdrew { ref who, ref fund_index, ref amount } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(fund_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - } - Event::PartiallyRefunded { ref para_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para_id), - ) - } - Event::AllRefunded { ref para_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para_id), - ) - } - Event::Dissolved { ref para_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para_id), - ) - } - Event::HandleBidResult { ref para_id, ref result } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(result), - ) - } - Event::Edited { ref para_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para_id), - ) - } - Event::MemoUpdated { ref who, ref para_id, ref memo } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(memo), - ) - } - Event::AddedToNewRaise { ref para_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para_id), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::Created { ref para_id } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para_id, - __codec_dest_edqy, - ); - } - Event::Contributed { - ref who, - ref fund_index, - ref amount, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - fund_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::Withdrew { ref who, ref fund_index, ref amount } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - fund_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - } - Event::PartiallyRefunded { ref para_id } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para_id, - __codec_dest_edqy, - ); - } - Event::AllRefunded { ref para_id } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para_id, - __codec_dest_edqy, - ); - } - Event::Dissolved { ref para_id } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para_id, - __codec_dest_edqy, - ); - } - Event::HandleBidResult { ref para_id, ref result } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - result, - __codec_dest_edqy, - ); - } - Event::Edited { ref para_id } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para_id, - __codec_dest_edqy, - ); - } - Event::MemoUpdated { ref who, ref para_id, ref memo } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - memo, - __codec_dest_edqy, - ); - } - Event::AddedToNewRaise { ref para_id } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para_id, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Created" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Created { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Created { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - }; - } - if value.name() == "Contributed" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::Contributed { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - fund_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fund_index"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Contributed { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - fund_index: { - let val = *vals - .get(&Some("fund_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fund_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fund_index"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "Withdrew" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::Withdrew { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - fund_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fund_index"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Withdrew { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - fund_index: { - let val = *vals - .get(&Some("fund_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fund_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fund_index"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - }) - }; - } - if value.name() == "PartiallyRefunded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::PartiallyRefunded { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::PartiallyRefunded { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - }; - } - if value.name() == "AllRefunded" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::AllRefunded { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::AllRefunded { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - }; - } - if value.name() == "Dissolved" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Dissolved { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Dissolved { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - }; - } - if value.name() == "HandleBidResult" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::HandleBidResult { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - result: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::HandleBidResult { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - result: { - let val = *vals - .get(&Some("result")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "result".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("result"))? - }, - }) - }; - } - if value.name() == "Edited" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Edited { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Edited { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - }; - } - if value.name() == "MemoUpdated" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Event::MemoUpdated { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - memo: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("memo"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::MemoUpdated { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - memo: { - let val = *vals - .get(&Some("memo")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "memo".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("memo"))? - }, - }) - }; - } - if value.name() == "AddedToNewRaise" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::AddedToNewRaise { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::AddedToNewRaise { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Created", - "Contributed", - "Withdrew", - "PartiallyRefunded", - "AllRefunded", - "Dissolved", - "HandleBidResult", - "Edited", - "MemoUpdated", - "AddedToNewRaise", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Created { para_id } => { - ::subxt::ext::scale_encode::Variant { - name: "Created", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Contributed { who, fund_index, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Contributed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fund_index"), - fund_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Withdrew { who, fund_index, amount } => { - ::subxt::ext::scale_encode::Variant { - name: "Withdrew", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fund_index"), - fund_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PartiallyRefunded { para_id } => { - ::subxt::ext::scale_encode::Variant { - name: "PartiallyRefunded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AllRefunded { para_id } => { - ::subxt::ext::scale_encode::Variant { - name: "AllRefunded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Dissolved { para_id } => { - ::subxt::ext::scale_encode::Variant { - name: "Dissolved", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HandleBidResult { para_id, result } => { - ::subxt::ext::scale_encode::Variant { - name: "HandleBidResult", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("result"), - result as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Edited { para_id } => { - ::subxt::ext::scale_encode::Variant { - name: "Edited", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MemoUpdated { who, para_id, memo } => { - ::subxt::ext::scale_encode::Variant { - name: "MemoUpdated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("memo"), - memo as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AddedToNewRaise { para_id } => { - ::subxt::ext::scale_encode::Variant { - name: "AddedToNewRaise", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::Created { para_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Created", - "para_id", - &__self_0, - ) - } - Event::Contributed { - who: __self_0, - fund_index: __self_1, - amount: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Contributed", - "who", - __self_0, - "fund_index", - __self_1, - "amount", - &__self_2, - ) - } - Event::Withdrew { - who: __self_0, - fund_index: __self_1, - amount: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Withdrew", - "who", - __self_0, - "fund_index", - __self_1, - "amount", - &__self_2, - ) - } - Event::PartiallyRefunded { para_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "PartiallyRefunded", - "para_id", - &__self_0, - ) - } - Event::AllRefunded { para_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "AllRefunded", - "para_id", - &__self_0, - ) - } - Event::Dissolved { para_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Dissolved", - "para_id", - &__self_0, - ) - } - Event::HandleBidResult { - para_id: __self_0, - result: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "HandleBidResult", - "para_id", - __self_0, - "result", - &__self_1, - ) - } - Event::Edited { para_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Edited", - "para_id", - &__self_0, - ) - } - Event::MemoUpdated { - who: __self_0, - para_id: __self_1, - memo: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "MemoUpdated", - "who", - __self_0, - "para_id", - __self_1, - "memo", - &__self_2, - ) - } - Event::AddedToNewRaise { para_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "AddedToNewRaise", - "para_id", - &__self_0, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct FundInfo<_0, _1, _2, _3> { - 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: _3, - pub last_period: _3, - pub fund_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2, _3> ::subxt::ext::codec::Decode - for FundInfo<_0, _1, _2, _3> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - _2: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - runtime_types::polkadot_runtime_common::crowdloan::LastContribution< - _2, - >: ::subxt::ext::codec::Decode, - runtime_types::polkadot_runtime_common::crowdloan::LastContribution< - _2, - >: ::subxt::ext::codec::Decode, - _3: ::subxt::ext::codec::Decode, - _3: ::subxt::ext::codec::Decode, - _3: ::subxt::ext::codec::Decode, - _3: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(FundInfo::<_0, _1, _2, _3> { - depositor: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `FundInfo::depositor`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - verifier: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::sp_runtime::MultiSigner, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `FundInfo::verifier`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `FundInfo::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - raised: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `FundInfo::raised`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - end: { - let __codec_res_edqy = <_2 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `FundInfo::end`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - cap: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `FundInfo::cap`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - last_contribution: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `FundInfo::last_contribution`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - first_period: { - let __codec_res_edqy = <_3 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `FundInfo::first_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - last_period: { - let __codec_res_edqy = <_3 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `FundInfo::last_period`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fund_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `FundInfo::fund_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1, _2, _3> ::subxt::ext::codec::Encode - for FundInfo<_0, _1, _2, _3> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - runtime_types::polkadot_runtime_common::crowdloan::LastContribution< - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::polkadot_runtime_common::crowdloan::LastContribution< - _2, - >: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.depositor), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.verifier), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deposit), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.raised), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.end), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.cap), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.last_contribution, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.first_period), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.last_period), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.fund_index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.depositor, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.verifier, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.raised, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.end, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.cap, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.last_contribution, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.first_period, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.last_period, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.fund_index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1, _2, _3> ::subxt::ext::codec::EncodeLike - for FundInfo<_0, _1, _2, _3> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _2: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - runtime_types::polkadot_runtime_common::crowdloan::LastContribution< - _2, - >: ::subxt::ext::codec::Encode, - runtime_types::polkadot_runtime_common::crowdloan::LastContribution< - _2, - >: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - _3: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1, _2, _3>( - ::core::marker::PhantomData<(_0, _1, _2, _3)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1, _2, _3> ::subxt::ext::scale_decode::IntoVisitor - for FundInfo<_0, _1, _2, _3> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _3: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_3 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1, _2, _3>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1, _2, _3> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1, _2, _3> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _3: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_3 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = FundInfo<_0, _1, _2, _3>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(FundInfo { - depositor: { - let val = *vals - .get(&Some("depositor")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "depositor".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("depositor"))? - }, - verifier: { - let val = *vals - .get(&Some("verifier")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "verifier".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("verifier"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - raised: { - let val = *vals - .get(&Some("raised")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "raised".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("raised"))? - }, - end: { - let val = *vals - .get(&Some("end")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "end".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - cap: { - let val = *vals - .get(&Some("cap")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "cap".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("cap"))? - }, - last_contribution: { - let val = *vals - .get(&Some("last_contribution")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "last_contribution".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("last_contribution"))? - }, - first_period: { - let val = *vals - .get(&Some("first_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "first_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("first_period"))? - }, - last_period: { - let val = *vals - .get(&Some("last_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "last_period".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("last_period"))? - }, - fund_index: { - let val = *vals - .get(&Some("fund_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fund_index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fund_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 10usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 10usize, - }), - ); - } - let vals = value; - Ok(FundInfo { - depositor: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("depositor"))? - }, - verifier: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("verifier"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - raised: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("raised"))? - }, - end: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("end"))? - }, - cap: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("cap"))? - }, - last_contribution: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("last_contribution"))? - }, - first_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("first_period"))? - }, - last_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("last_period"))? - }, - fund_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fund_index"))? - }, - }) - } - } - impl<_0, _1, _2, _3> ::subxt::ext::scale_decode::DecodeAsFields - for FundInfo<_0, _1, _2, _3> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _2: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_2 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _3: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_3 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1, _2, _3> ::subxt::ext::scale_encode::EncodeAsType - for FundInfo<_0, _1, _2, _3> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - _3: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let FundInfo { - depositor, - verifier, - deposit, - raised, - end, - cap, - last_contribution, - first_period, - last_period, - fund_index, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("depositor"), - depositor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("verifier"), - verifier as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("raised"), - raised as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("end"), - end as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("cap"), - cap as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_contribution"), - last_contribution - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_period"), - first_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_period"), - last_period as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fund_index"), - fund_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1, _2, _3> ::subxt::ext::scale_encode::EncodeAsFields - for FundInfo<_0, _1, _2, _3> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - _2: ::subxt::ext::scale_encode::EncodeAsType, - _3: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let FundInfo { - depositor, - verifier, - deposit, - raised, - end, - cap, - last_contribution, - first_period, - last_period, - fund_index, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("depositor"), - depositor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("verifier"), - verifier as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("raised"), - raised as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("end"), - end as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("cap"), - cap as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_contribution"), - last_contribution - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_period"), - first_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_period"), - last_period as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fund_index"), - fund_index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - _2: ::core::fmt::Debug, - _3: ::core::fmt::Debug, - > ::core::fmt::Debug for FundInfo<_0, _1, _2, _3> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "depositor", - "verifier", - "deposit", - "raised", - "end", - "cap", - "last_contribution", - "first_period", - "last_period", - "fund_index", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.depositor, - &self.verifier, - &self.deposit, - &self.raised, - &self.end, - &self.cap, - &self.last_contribution, - &self.first_period, - &self.last_period, - &&self.fund_index, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "FundInfo", - names, - values, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum LastContribution<_0> { - #[codec(index = 0)] - Never, - #[codec(index = 1)] - PreEnding(::core::primitive::u32), - #[codec(index = 2)] - Ending(_0), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for LastContribution<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `LastContribution`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(LastContribution::<_0>::Never) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - LastContribution::< - _0, - >::PreEnding({ - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `LastContribution::PreEnding.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - LastContribution::< - _0, - >::Ending({ - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `LastContribution::Ending.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `LastContribution`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for LastContribution<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - LastContribution::Never => 0_usize, - LastContribution::PreEnding(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - LastContribution::Ending(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - LastContribution::Never => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - LastContribution::PreEnding(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - LastContribution::Ending(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for LastContribution<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for LastContribution<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = LastContribution<_0>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Never" { - return Ok(LastContribution::Never); - } - if value.name() == "PreEnding" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - LastContribution::PreEnding({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Ending" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - LastContribution::Ending({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Never", "PreEnding", "Ending"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for LastContribution<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Never => { - ::subxt::ext::scale_encode::Variant { - name: "Never", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PreEnding(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "PreEnding", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Ending(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Ending", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for LastContribution<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - LastContribution::Never => { - ::core::fmt::Formatter::write_str(f, "Never") - } - LastContribution::PreEnding(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "PreEnding", - &__self_0, - ) - } - LastContribution::Ending(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Ending", - &__self_0, - ) - } - } - } - } - } - pub mod paras_registrar { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - 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)] - 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)] - deregister { - id: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 3)] - swap { - id: runtime_types::polkadot_parachain::primitives::Id, - other: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 4)] - remove_lock { - para: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 5)] - reserve, - #[codec(index = 6)] - add_lock { - para: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 7)] - schedule_code_upgrade { - para: runtime_types::polkadot_parachain::primitives::Id, - new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - }, - #[codec(index = 8)] - set_current_head { - para: runtime_types::polkadot_parachain::primitives::Id, - new_head: runtime_types::polkadot_parachain::primitives::HeadData, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::register { - id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::register::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - genesis_head: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::register::genesis_head`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validation_code: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::register::validation_code`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_register { - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_register::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_register::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_register::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - genesis_head: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_register::genesis_head`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validation_code: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_register::validation_code`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::deregister { - id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::deregister::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::swap { - id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::swap::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - other: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::swap::other`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::remove_lock { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::remove_lock::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::reserve) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::add_lock { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::add_lock::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::schedule_code_upgrade { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::schedule_code_upgrade::para`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_code: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::schedule_code_upgrade::new_code`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_current_head { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_current_head::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_head: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_current_head::new_head`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::register { - ref id, - ref genesis_head, - ref validation_code, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(genesis_head), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(validation_code), - ) - } - Call::force_register { - ref who, - ref deposit, - ref id, - ref genesis_head, - ref validation_code, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(deposit), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(genesis_head), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(validation_code), - ) - } - Call::deregister { ref id } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - } - Call::swap { ref id, ref other } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(other), - ) - } - Call::remove_lock { ref para } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para), - ) - } - Call::reserve => 0_usize, - Call::add_lock { ref para } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para), - ) - } - Call::schedule_code_upgrade { ref para, ref new_code } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(new_code), - ) - } - Call::set_current_head { ref para, ref new_head } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(new_head), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::register { - ref id, - ref genesis_head, - ref validation_code, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - genesis_head, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - validation_code, - __codec_dest_edqy, - ); - } - Call::force_register { - ref who, - ref deposit, - ref id, - ref genesis_head, - ref validation_code, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - genesis_head, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - validation_code, - __codec_dest_edqy, - ); - } - Call::deregister { ref id } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - } - Call::swap { ref id, ref other } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - other, - __codec_dest_edqy, - ); - } - Call::remove_lock { ref para } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para, - __codec_dest_edqy, - ); - } - Call::reserve => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Call::add_lock { ref para } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para, - __codec_dest_edqy, - ); - } - Call::schedule_code_upgrade { ref para, ref new_code } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - new_code, - __codec_dest_edqy, - ); - } - Call::set_current_head { ref para, ref new_head } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - new_head, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "register" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::register { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - genesis_head: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("genesis_head"))? - }, - validation_code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::register { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - genesis_head: { - let val = *vals - .get(&Some("genesis_head")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "genesis_head".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("genesis_head"))? - }, - validation_code: { - let val = *vals - .get(&Some("validation_code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validation_code".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code"))? - }, - }) - }; - } - if value.name() == "force_register" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Call::force_register { - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - genesis_head: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("genesis_head"))? - }, - validation_code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_register { - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - genesis_head: { - let val = *vals - .get(&Some("genesis_head")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "genesis_head".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("genesis_head"))? - }, - validation_code: { - let val = *vals - .get(&Some("validation_code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validation_code".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code"))? - }, - }) - }; - } - if value.name() == "deregister" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::deregister { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::deregister { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - }; - } - if value.name() == "swap" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::swap { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - other: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("other"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::swap { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - other: { - let val = *vals - .get(&Some("other")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "other".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("other"))? - }, - }) - }; - } - if value.name() == "remove_lock" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::remove_lock { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::remove_lock { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - }; - } - if value.name() == "reserve" { - return Ok(Call::reserve); - } - if value.name() == "add_lock" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::add_lock { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::add_lock { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - }; - } - if value.name() == "schedule_code_upgrade" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::schedule_code_upgrade { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_code"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::schedule_code_upgrade { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_code: { - let val = *vals - .get(&Some("new_code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_code".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_code"))? - }, - }) - }; - } - if value.name() == "set_current_head" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::set_current_head { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_head: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_head"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_current_head { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_head: { - let val = *vals - .get(&Some("new_head")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_head".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_head"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "register", - "force_register", - "deregister", - "swap", - "remove_lock", - "reserve", - "add_lock", - "schedule_code_upgrade", - "set_current_head", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::register { id, genesis_head, validation_code } => { - ::subxt::ext::scale_encode::Variant { - name: "register", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("genesis_head"), - genesis_head - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validation_code"), - validation_code - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_register { - who, - deposit, - id, - genesis_head, - validation_code, - } => { - ::subxt::ext::scale_encode::Variant { - name: "force_register", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("genesis_head"), - genesis_head - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validation_code"), - validation_code - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::deregister { id } => { - ::subxt::ext::scale_encode::Variant { - name: "deregister", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::swap { id, other } => { - ::subxt::ext::scale_encode::Variant { - name: "swap", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("other"), - other as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::remove_lock { para } => { - ::subxt::ext::scale_encode::Variant { - name: "remove_lock", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::reserve => { - ::subxt::ext::scale_encode::Variant { - name: "reserve", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::add_lock { para } => { - ::subxt::ext::scale_encode::Variant { - name: "add_lock", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::schedule_code_upgrade { para, new_code } => { - ::subxt::ext::scale_encode::Variant { - name: "schedule_code_upgrade", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_code"), - new_code as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_current_head { para, new_head } => { - ::subxt::ext::scale_encode::Variant { - name: "set_current_head", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_head"), - new_head as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::register { - id: __self_0, - genesis_head: __self_1, - validation_code: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "register", - "id", - __self_0, - "genesis_head", - __self_1, - "validation_code", - &__self_2, - ) - } - Call::force_register { - who: __self_0, - deposit: __self_1, - id: __self_2, - genesis_head: __self_3, - validation_code: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "force_register", - "who", - __self_0, - "deposit", - __self_1, - "id", - __self_2, - "genesis_head", - __self_3, - "validation_code", - &__self_4, - ) - } - Call::deregister { id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "deregister", - "id", - &__self_0, - ) - } - Call::swap { id: __self_0, other: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "swap", - "id", - __self_0, - "other", - &__self_1, - ) - } - Call::remove_lock { para: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "remove_lock", - "para", - &__self_0, - ) - } - Call::reserve => { - ::core::fmt::Formatter::write_str(f, "reserve") - } - Call::add_lock { para: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "add_lock", - "para", - &__self_0, - ) - } - Call::schedule_code_upgrade { - para: __self_0, - new_code: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "schedule_code_upgrade", - "para", - __self_0, - "new_code", - &__self_1, - ) - } - Call::set_current_head { - para: __self_0, - new_head: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "set_current_head", - "para", - __self_0, - "new_head", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - NotRegistered, - #[codec(index = 1)] - AlreadyRegistered, - #[codec(index = 2)] - NotOwner, - #[codec(index = 3)] - CodeTooLarge, - #[codec(index = 4)] - HeadDataTooLarge, - #[codec(index = 5)] - NotParachain, - #[codec(index = 6)] - NotParathread, - #[codec(index = 7)] - CannotDeregister, - #[codec(index = 8)] - CannotDowngrade, - #[codec(index = 9)] - CannotUpgrade, - #[codec(index = 10)] - ParaLocked, - #[codec(index = 11)] - NotReserved, - #[codec(index = 12)] - EmptyCode, - #[codec(index = 13)] - CannotSwap, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotRegistered) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AlreadyRegistered) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotOwner) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CodeTooLarge) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::HeadDataTooLarge) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotParachain) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotParathread) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CannotDeregister) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CannotDowngrade) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CannotUpgrade) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ParaLocked) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotReserved) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::EmptyCode) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CannotSwap) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::NotRegistered => 0_usize, - Error::AlreadyRegistered => 0_usize, - Error::NotOwner => 0_usize, - Error::CodeTooLarge => 0_usize, - Error::HeadDataTooLarge => 0_usize, - Error::NotParachain => 0_usize, - Error::NotParathread => 0_usize, - Error::CannotDeregister => 0_usize, - Error::CannotDowngrade => 0_usize, - Error::CannotUpgrade => 0_usize, - Error::ParaLocked => 0_usize, - Error::NotReserved => 0_usize, - Error::EmptyCode => 0_usize, - Error::CannotSwap => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::NotRegistered => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::AlreadyRegistered => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::NotOwner => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::CodeTooLarge => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::HeadDataTooLarge => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::NotParachain => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::NotParathread => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::CannotDeregister => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::CannotDowngrade => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::CannotUpgrade => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::ParaLocked => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Error::NotReserved => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - Error::EmptyCode => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - Error::CannotSwap => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NotRegistered" { - return Ok(Error::NotRegistered); - } - if value.name() == "AlreadyRegistered" { - return Ok(Error::AlreadyRegistered); - } - if value.name() == "NotOwner" { - return Ok(Error::NotOwner); - } - if value.name() == "CodeTooLarge" { - return Ok(Error::CodeTooLarge); - } - if value.name() == "HeadDataTooLarge" { - return Ok(Error::HeadDataTooLarge); - } - if value.name() == "NotParachain" { - return Ok(Error::NotParachain); - } - if value.name() == "NotParathread" { - return Ok(Error::NotParathread); - } - if value.name() == "CannotDeregister" { - return Ok(Error::CannotDeregister); - } - if value.name() == "CannotDowngrade" { - return Ok(Error::CannotDowngrade); - } - if value.name() == "CannotUpgrade" { - return Ok(Error::CannotUpgrade); - } - if value.name() == "ParaLocked" { - return Ok(Error::ParaLocked); - } - if value.name() == "NotReserved" { - return Ok(Error::NotReserved); - } - if value.name() == "EmptyCode" { - return Ok(Error::EmptyCode); - } - if value.name() == "CannotSwap" { - return Ok(Error::CannotSwap); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "NotRegistered", - "AlreadyRegistered", - "NotOwner", - "CodeTooLarge", - "HeadDataTooLarge", - "NotParachain", - "NotParathread", - "CannotDeregister", - "CannotDowngrade", - "CannotUpgrade", - "ParaLocked", - "NotReserved", - "EmptyCode", - "CannotSwap", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NotRegistered => { - ::subxt::ext::scale_encode::Variant { - name: "NotRegistered", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AlreadyRegistered => { - ::subxt::ext::scale_encode::Variant { - name: "AlreadyRegistered", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotOwner => { - ::subxt::ext::scale_encode::Variant { - name: "NotOwner", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CodeTooLarge => { - ::subxt::ext::scale_encode::Variant { - name: "CodeTooLarge", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HeadDataTooLarge => { - ::subxt::ext::scale_encode::Variant { - name: "HeadDataTooLarge", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotParachain => { - ::subxt::ext::scale_encode::Variant { - name: "NotParachain", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotParathread => { - ::subxt::ext::scale_encode::Variant { - name: "NotParathread", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CannotDeregister => { - ::subxt::ext::scale_encode::Variant { - name: "CannotDeregister", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CannotDowngrade => { - ::subxt::ext::scale_encode::Variant { - name: "CannotDowngrade", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CannotUpgrade => { - ::subxt::ext::scale_encode::Variant { - name: "CannotUpgrade", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ParaLocked => { - ::subxt::ext::scale_encode::Variant { - name: "ParaLocked", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotReserved => { - ::subxt::ext::scale_encode::Variant { - name: "NotReserved", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::EmptyCode => { - ::subxt::ext::scale_encode::Variant { - name: "EmptyCode", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CannotSwap => { - ::subxt::ext::scale_encode::Variant { - name: "CannotSwap", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::NotRegistered => "NotRegistered", - Error::AlreadyRegistered => "AlreadyRegistered", - Error::NotOwner => "NotOwner", - Error::CodeTooLarge => "CodeTooLarge", - Error::HeadDataTooLarge => "HeadDataTooLarge", - Error::NotParachain => "NotParachain", - Error::NotParathread => "NotParathread", - Error::CannotDeregister => "CannotDeregister", - Error::CannotDowngrade => "CannotDowngrade", - Error::CannotUpgrade => "CannotUpgrade", - Error::ParaLocked => "ParaLocked", - Error::NotReserved => "NotReserved", - Error::EmptyCode => "EmptyCode", - Error::CannotSwap => "CannotSwap", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - 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, - }, - #[codec(index = 3)] - Swapped { - para_id: runtime_types::polkadot_parachain::primitives::Id, - other_id: runtime_types::polkadot_parachain::primitives::Id, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Registered { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Registered::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - manager: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Registered::manager`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Deregistered { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Deregistered::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Reserved { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Reserved::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - who: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Reserved::who`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Swapped { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Swapped::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - other_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Swapped::other_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::Registered { ref para_id, ref manager } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(manager), - ) - } - Event::Deregistered { ref para_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para_id), - ) - } - Event::Reserved { ref para_id, ref who } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para_id), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(who)) - } - Event::Swapped { ref para_id, ref other_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(other_id), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::Registered { ref para_id, ref manager } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - manager, - __codec_dest_edqy, - ); - } - Event::Deregistered { ref para_id } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para_id, - __codec_dest_edqy, - ); - } - Event::Reserved { ref para_id, ref who } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - who, - __codec_dest_edqy, - ); - } - Event::Swapped { ref para_id, ref other_id } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - other_id, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Registered" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Registered { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - manager: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("manager"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Registered { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - manager: { - let val = *vals - .get(&Some("manager")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "manager".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("manager"))? - }, - }) - }; - } - if value.name() == "Deregistered" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::Deregistered { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Deregistered { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - }) - }; - } - if value.name() == "Reserved" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Reserved { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - who: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Reserved { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - who: { - let val = *vals - .get(&Some("who")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "who".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("who"))? - }, - }) - }; - } - if value.name() == "Swapped" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::Swapped { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - other_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("other_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Swapped { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - other_id: { - let val = *vals - .get(&Some("other_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "other_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("other_id"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Registered", - "Deregistered", - "Reserved", - "Swapped", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Registered { para_id, manager } => { - ::subxt::ext::scale_encode::Variant { - name: "Registered", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("manager"), - manager as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Deregistered { para_id } => { - ::subxt::ext::scale_encode::Variant { - name: "Deregistered", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Reserved { para_id, who } => { - ::subxt::ext::scale_encode::Variant { - name: "Reserved", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("who"), - who as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Swapped { para_id, other_id } => { - ::subxt::ext::scale_encode::Variant { - name: "Swapped", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("other_id"), - other_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::Registered { - para_id: __self_0, - manager: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Registered", - "para_id", - __self_0, - "manager", - &__self_1, - ) - } - Event::Deregistered { para_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Deregistered", - "para_id", - &__self_0, - ) - } - Event::Reserved { para_id: __self_0, who: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Reserved", - "para_id", - __self_0, - "who", - &__self_1, - ) - } - Event::Swapped { para_id: __self_0, other_id: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Swapped", - "para_id", - __self_0, - "other_id", - &__self_1, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ParaInfo<_0, _1> { - pub manager: _0, - pub deposit: _1, - pub locked: ::core::primitive::bool, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for ParaInfo<_0, _1> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ParaInfo::<_0, _1> { - manager: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ParaInfo::manager`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - deposit: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ParaInfo::deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - locked: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ParaInfo::locked`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for ParaInfo<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.manager), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.deposit), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.locked), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.manager, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.locked, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike for ParaInfo<_0, _1> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>( - ::core::marker::PhantomData<(_0, _1)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for ParaInfo<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ParaInfo<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ParaInfo { - manager: { - let val = *vals - .get(&Some("manager")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "manager".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("manager"))? - }, - deposit: { - let val = *vals - .get(&Some("deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "deposit".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - locked: { - let val = *vals - .get(&Some("locked")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "locked".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("locked"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(ParaInfo { - manager: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("manager"))? - }, - deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("deposit"))? - }, - locked: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("locked"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for ParaInfo<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for ParaInfo<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ParaInfo { manager, deposit, locked } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("manager"), - manager as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("locked"), - locked as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for ParaInfo<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ParaInfo { manager, deposit, locked } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("manager"), - manager as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("deposit"), - deposit as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("locked"), - locked as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - > ::core::fmt::Debug for ParaInfo<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ParaInfo", - "manager", - &self.manager, - "deposit", - &self.deposit, - "locked", - &&self.locked, - ) - } - } - } - pub mod slots { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - 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)] - clear_all_leases { - para: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 2)] - trigger_onboard { - para: runtime_types::polkadot_parachain::primitives::Id, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_lease { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_lease::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - leaser: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_lease::leaser`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_lease::amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - period_begin: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::force_lease::period_begin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - period_count: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::force_lease::period_count`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::clear_all_leases { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::clear_all_leases::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::trigger_onboard { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::trigger_onboard::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::force_lease { - ref para, - ref leaser, - ref amount, - ref period_begin, - ref period_count, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(leaser), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(amount), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(period_begin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(period_count), - ) - } - Call::clear_all_leases { ref para } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para), - ) - } - Call::trigger_onboard { ref para } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::force_lease { - ref para, - ref leaser, - ref amount, - ref period_begin, - ref period_count, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - leaser, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - amount, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - period_begin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - period_count, - __codec_dest_edqy, - ); - } - Call::clear_all_leases { ref para } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para, - __codec_dest_edqy, - ); - } - Call::trigger_onboard { ref para } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "force_lease" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Call::force_lease { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - leaser: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("leaser"))? - }, - amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - period_begin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("period_begin"))? - }, - period_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("period_count"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_lease { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - leaser: { - let val = *vals - .get(&Some("leaser")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "leaser".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("leaser"))? - }, - amount: { - let val = *vals - .get(&Some("amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "amount".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("amount"))? - }, - period_begin: { - let val = *vals - .get(&Some("period_begin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "period_begin".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("period_begin"))? - }, - period_count: { - let val = *vals - .get(&Some("period_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "period_count".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("period_count"))? - }, - }) - }; - } - if value.name() == "clear_all_leases" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::clear_all_leases { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::clear_all_leases { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - }; - } - if value.name() == "trigger_onboard" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::trigger_onboard { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::trigger_onboard { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "force_lease", - "clear_all_leases", - "trigger_onboard", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::force_lease { - para, - leaser, - amount, - period_begin, - period_count, - } => { - ::subxt::ext::scale_encode::Variant { - name: "force_lease", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("leaser"), - leaser as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("amount"), - amount as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("period_begin"), - period_begin - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("period_count"), - period_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::clear_all_leases { para } => { - ::subxt::ext::scale_encode::Variant { - name: "clear_all_leases", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::trigger_onboard { para } => { - ::subxt::ext::scale_encode::Variant { - name: "trigger_onboard", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::force_lease { - para: __self_0, - leaser: __self_1, - amount: __self_2, - period_begin: __self_3, - period_count: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "force_lease", - "para", - __self_0, - "leaser", - __self_1, - "amount", - __self_2, - "period_begin", - __self_3, - "period_count", - &__self_4, - ) - } - Call::clear_all_leases { para: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "clear_all_leases", - "para", - &__self_0, - ) - } - Call::trigger_onboard { para: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "trigger_onboard", - "para", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - ParaNotOnboarding, - #[codec(index = 1)] - LeaseError, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ParaNotOnboarding) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::LeaseError) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::ParaNotOnboarding => 0_usize, - Error::LeaseError => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::ParaNotOnboarding => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::LeaseError => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "ParaNotOnboarding" { - return Ok(Error::ParaNotOnboarding); - } - if value.name() == "LeaseError" { - return Ok(Error::LeaseError); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "ParaNotOnboarding", - "LeaseError", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::ParaNotOnboarding => { - ::subxt::ext::scale_encode::Variant { - name: "ParaNotOnboarding", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LeaseError => { - ::subxt::ext::scale_encode::Variant { - name: "LeaseError", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::ParaNotOnboarding => "ParaNotOnboarding", - Error::LeaseError => "LeaseError", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - NewLeasePeriod { lease_period: ::core::primitive::u32 }, - #[codec(index = 1)] - 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, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::NewLeasePeriod { - lease_period: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::NewLeasePeriod::lease_period`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::Leased { - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Leased::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - leaser: { - let __codec_res_edqy = <::subxt::utils::AccountId32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Leased::leaser`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - period_begin: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Leased::period_begin`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - period_count: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Leased::period_count`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - extra_reserved: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Leased::extra_reserved`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - total_amount: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Leased::total_amount`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::NewLeasePeriod { ref lease_period } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(lease_period), - ) - } - Event::Leased { - ref para_id, - ref leaser, - ref period_begin, - ref period_count, - ref extra_reserved, - ref total_amount, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(leaser), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(period_begin), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(period_count), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(extra_reserved), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(total_amount), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::NewLeasePeriod { ref lease_period } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - lease_period, - __codec_dest_edqy, - ); - } - Event::Leased { - ref para_id, - ref leaser, - ref period_begin, - ref period_count, - ref extra_reserved, - ref total_amount, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - leaser, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - period_begin, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - period_count, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - extra_reserved, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - total_amount, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NewLeasePeriod" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Event::NewLeasePeriod { - lease_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("lease_period"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::NewLeasePeriod { - lease_period: { - let val = *vals - .get(&Some("lease_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "lease_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("lease_period"))? - }, - }) - }; - } - if value.name() == "Leased" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = fields; - Ok(Event::Leased { - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - leaser: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("leaser"))? - }, - period_begin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("period_begin"))? - }, - period_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("period_count"))? - }, - extra_reserved: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("extra_reserved"))? - }, - total_amount: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("total_amount"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::Leased { - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - leaser: { - let val = *vals - .get(&Some("leaser")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "leaser".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("leaser"))? - }, - period_begin: { - let val = *vals - .get(&Some("period_begin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "period_begin".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("period_begin"))? - }, - period_count: { - let val = *vals - .get(&Some("period_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "period_count".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("period_count"))? - }, - extra_reserved: { - let val = *vals - .get(&Some("extra_reserved")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "extra_reserved".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("extra_reserved"))? - }, - total_amount: { - let val = *vals - .get(&Some("total_amount")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "total_amount".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("total_amount"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["NewLeasePeriod", "Leased"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NewLeasePeriod { lease_period } => { - ::subxt::ext::scale_encode::Variant { - name: "NewLeasePeriod", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("lease_period"), - lease_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Leased { - para_id, - leaser, - period_begin, - period_count, - extra_reserved, - total_amount, - } => { - ::subxt::ext::scale_encode::Variant { - name: "Leased", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("leaser"), - leaser as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("period_begin"), - period_begin - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("period_count"), - period_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("extra_reserved"), - extra_reserved - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("total_amount"), - total_amount - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::NewLeasePeriod { lease_period: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "NewLeasePeriod", - "lease_period", - &__self_0, - ) - } - Event::Leased { - para_id: __self_0, - leaser: __self_1, - period_begin: __self_2, - period_count: __self_3, - extra_reserved: __self_4, - total_amount: __self_5, - } => { - let names: &'static _ = &[ - "para_id", - "leaser", - "period_begin", - "period_count", - "extra_reserved", - "total_amount", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - &__self_5, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "Leased", - names, - values, - ) - } - } - } - } - } - } - } - pub mod polkadot_runtime_parachains { - use super::runtime_types; - pub mod configuration { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - set_validation_upgrade_cooldown { - new: ::core::primitive::u32, - }, - #[codec(index = 1)] - set_validation_upgrade_delay { new: ::core::primitive::u32 }, - #[codec(index = 2)] - set_code_retention_period { new: ::core::primitive::u32 }, - #[codec(index = 3)] - set_max_code_size { new: ::core::primitive::u32 }, - #[codec(index = 4)] - set_max_pov_size { new: ::core::primitive::u32 }, - #[codec(index = 5)] - set_max_head_data_size { new: ::core::primitive::u32 }, - #[codec(index = 6)] - set_parathread_cores { new: ::core::primitive::u32 }, - #[codec(index = 7)] - set_parathread_retries { new: ::core::primitive::u32 }, - #[codec(index = 8)] - set_group_rotation_frequency { new: ::core::primitive::u32 }, - #[codec(index = 9)] - set_chain_availability_period { - new: ::core::primitive::u32, - }, - #[codec(index = 10)] - set_thread_availability_period { - new: ::core::primitive::u32, - }, - #[codec(index = 11)] - set_scheduling_lookahead { new: ::core::primitive::u32 }, - #[codec(index = 12)] - set_max_validators_per_core { - new: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 13)] - set_max_validators { - new: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 14)] - set_dispute_period { new: ::core::primitive::u32 }, - #[codec(index = 15)] - set_dispute_post_conclusion_acceptance_period { - new: ::core::primitive::u32, - }, - #[codec(index = 18)] - set_no_show_slots { new: ::core::primitive::u32 }, - #[codec(index = 19)] - set_n_delay_tranches { new: ::core::primitive::u32 }, - #[codec(index = 20)] - set_zeroth_delay_tranche_width { - new: ::core::primitive::u32, - }, - #[codec(index = 21)] - set_needed_approvals { new: ::core::primitive::u32 }, - #[codec(index = 22)] - set_relay_vrf_modulo_samples { new: ::core::primitive::u32 }, - #[codec(index = 23)] - set_max_upward_queue_count { new: ::core::primitive::u32 }, - #[codec(index = 24)] - set_max_upward_queue_size { new: ::core::primitive::u32 }, - #[codec(index = 25)] - set_max_downward_message_size { - new: ::core::primitive::u32, - }, - #[codec(index = 27)] - set_max_upward_message_size { new: ::core::primitive::u32 }, - #[codec(index = 28)] - set_max_upward_message_num_per_candidate { - new: ::core::primitive::u32, - }, - #[codec(index = 29)] - set_hrmp_open_request_ttl { new: ::core::primitive::u32 }, - #[codec(index = 30)] - set_hrmp_sender_deposit { new: ::core::primitive::u128 }, - #[codec(index = 31)] - set_hrmp_recipient_deposit { new: ::core::primitive::u128 }, - #[codec(index = 32)] - set_hrmp_channel_max_capacity { - new: ::core::primitive::u32, - }, - #[codec(index = 33)] - set_hrmp_channel_max_total_size { - new: ::core::primitive::u32, - }, - #[codec(index = 34)] - set_hrmp_max_parachain_inbound_channels { - new: ::core::primitive::u32, - }, - #[codec(index = 35)] - set_hrmp_max_parathread_inbound_channels { - new: ::core::primitive::u32, - }, - #[codec(index = 36)] - set_hrmp_channel_max_message_size { - new: ::core::primitive::u32, - }, - #[codec(index = 37)] - set_hrmp_max_parachain_outbound_channels { - new: ::core::primitive::u32, - }, - #[codec(index = 38)] - set_hrmp_max_parathread_outbound_channels { - new: ::core::primitive::u32, - }, - #[codec(index = 39)] - set_hrmp_max_message_num_per_candidate { - new: ::core::primitive::u32, - }, - #[codec(index = 41)] - set_pvf_checking_enabled { new: ::core::primitive::bool }, - #[codec(index = 42)] - set_pvf_voting_ttl { new: ::core::primitive::u32 }, - #[codec(index = 43)] - set_minimum_validation_upgrade_delay { - new: ::core::primitive::u32, - }, - #[codec(index = 44)] - set_bypass_consistency_check { - new: ::core::primitive::bool, - }, - #[codec(index = 45)] - set_async_backing_params { - new: runtime_types::polkadot_primitives::vstaging::AsyncBackingParams, - }, - #[codec(index = 46)] - set_executor_params { - new: runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_validation_upgrade_cooldown { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_validation_upgrade_cooldown::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_validation_upgrade_delay { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_validation_upgrade_delay::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_code_retention_period { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_code_retention_period::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_max_code_size { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_max_code_size::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_max_pov_size { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_max_pov_size::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_max_head_data_size { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_max_head_data_size::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_parathread_cores { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::set_parathread_cores::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_parathread_retries { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_parathread_retries::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_group_rotation_frequency { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_group_rotation_frequency::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_chain_availability_period { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_chain_availability_period::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_thread_availability_period { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_thread_availability_period::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_scheduling_lookahead { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_scheduling_lookahead::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_max_validators_per_core { - new: { - let __codec_res_edqy = <::core::option::Option< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_max_validators_per_core::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_max_validators { - new: { - let __codec_res_edqy = <::core::option::Option< - ::core::primitive::u32, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_max_validators::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_dispute_period { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_dispute_period::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_dispute_post_conclusion_acceptance_period { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_dispute_post_conclusion_acceptance_period::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_no_show_slots { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_no_show_slots::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_n_delay_tranches { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::set_n_delay_tranches::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_zeroth_delay_tranche_width { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_zeroth_delay_tranche_width::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_needed_approvals { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::set_needed_approvals::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 22u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_relay_vrf_modulo_samples { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_relay_vrf_modulo_samples::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 23u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_max_upward_queue_count { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_max_upward_queue_count::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 24u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_max_upward_queue_size { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_max_upward_queue_size::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 25u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_max_downward_message_size { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_max_downward_message_size::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 27u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_max_upward_message_size { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_max_upward_message_size::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 28u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_max_upward_message_num_per_candidate { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_max_upward_message_num_per_candidate::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 29u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_hrmp_open_request_ttl { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_hrmp_open_request_ttl::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 30u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_hrmp_sender_deposit { - new: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_hrmp_sender_deposit::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 31u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_hrmp_recipient_deposit { - new: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_hrmp_recipient_deposit::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 32u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_hrmp_channel_max_capacity { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_hrmp_channel_max_capacity::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 33u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_hrmp_channel_max_total_size { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_hrmp_channel_max_total_size::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 34u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_hrmp_max_parachain_inbound_channels { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_hrmp_max_parachain_inbound_channels::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 35u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_hrmp_max_parathread_inbound_channels { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_hrmp_max_parathread_inbound_channels::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 36u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_hrmp_channel_max_message_size { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_hrmp_channel_max_message_size::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 37u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_hrmp_max_parachain_outbound_channels { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_hrmp_max_parachain_outbound_channels::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 38u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_hrmp_max_parathread_outbound_channels { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_hrmp_max_parathread_outbound_channels::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 39u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_hrmp_max_message_num_per_candidate { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_hrmp_max_message_num_per_candidate::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 41u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_pvf_checking_enabled { - new: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_pvf_checking_enabled::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 42u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_pvf_voting_ttl { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_pvf_voting_ttl::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 43u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_minimum_validation_upgrade_delay { - new: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_minimum_validation_upgrade_delay::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 44u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_bypass_consistency_check { - new: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_bypass_consistency_check::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 45u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_async_backing_params { - new: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::set_async_backing_params::new`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 46u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::set_executor_params { - new: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::set_executor_params::new`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::set_validation_upgrade_cooldown { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_validation_upgrade_delay { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_code_retention_period { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_max_code_size { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_max_pov_size { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_max_head_data_size { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_parathread_cores { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_parathread_retries { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_group_rotation_frequency { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_chain_availability_period { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_thread_availability_period { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_scheduling_lookahead { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_max_validators_per_core { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_max_validators { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_dispute_period { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_dispute_post_conclusion_acceptance_period { - ref new, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_no_show_slots { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_n_delay_tranches { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_zeroth_delay_tranche_width { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_needed_approvals { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_relay_vrf_modulo_samples { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_max_upward_queue_count { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_max_upward_queue_size { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_max_downward_message_size { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_max_upward_message_size { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_max_upward_message_num_per_candidate { - ref new, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_hrmp_open_request_ttl { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_hrmp_sender_deposit { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_hrmp_recipient_deposit { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_hrmp_channel_max_capacity { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_hrmp_channel_max_total_size { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_hrmp_max_parachain_inbound_channels { - ref new, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_hrmp_max_parathread_inbound_channels { - ref new, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_hrmp_channel_max_message_size { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_hrmp_max_parachain_outbound_channels { - ref new, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_hrmp_max_parathread_outbound_channels { - ref new, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_hrmp_max_message_num_per_candidate { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_pvf_checking_enabled { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_pvf_voting_ttl { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_minimum_validation_upgrade_delay { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_bypass_consistency_check { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_async_backing_params { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - Call::set_executor_params { ref new } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(new)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::set_validation_upgrade_cooldown { ref new } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_validation_upgrade_delay { ref new } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_code_retention_period { ref new } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_max_code_size { ref new } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_max_pov_size { ref new } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_max_head_data_size { ref new } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_parathread_cores { ref new } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_parathread_retries { ref new } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_group_rotation_frequency { ref new } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_chain_availability_period { ref new } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_thread_availability_period { ref new } => { - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_scheduling_lookahead { ref new } => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_max_validators_per_core { ref new } => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_max_validators { ref new } => { - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_dispute_period { ref new } => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_dispute_post_conclusion_acceptance_period { - ref new, - } => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_no_show_slots { ref new } => { - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_n_delay_tranches { ref new } => { - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_zeroth_delay_tranche_width { ref new } => { - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_needed_approvals { ref new } => { - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_relay_vrf_modulo_samples { ref new } => { - __codec_dest_edqy.push_byte(22u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_max_upward_queue_count { ref new } => { - __codec_dest_edqy.push_byte(23u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_max_upward_queue_size { ref new } => { - __codec_dest_edqy.push_byte(24u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_max_downward_message_size { ref new } => { - __codec_dest_edqy.push_byte(25u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_max_upward_message_size { ref new } => { - __codec_dest_edqy.push_byte(27u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_max_upward_message_num_per_candidate { - ref new, - } => { - __codec_dest_edqy.push_byte(28u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_hrmp_open_request_ttl { ref new } => { - __codec_dest_edqy.push_byte(29u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_hrmp_sender_deposit { ref new } => { - __codec_dest_edqy.push_byte(30u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_hrmp_recipient_deposit { ref new } => { - __codec_dest_edqy.push_byte(31u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_hrmp_channel_max_capacity { ref new } => { - __codec_dest_edqy.push_byte(32u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_hrmp_channel_max_total_size { ref new } => { - __codec_dest_edqy.push_byte(33u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_hrmp_max_parachain_inbound_channels { - ref new, - } => { - __codec_dest_edqy.push_byte(34u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_hrmp_max_parathread_inbound_channels { - ref new, - } => { - __codec_dest_edqy.push_byte(35u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_hrmp_channel_max_message_size { ref new } => { - __codec_dest_edqy.push_byte(36u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_hrmp_max_parachain_outbound_channels { - ref new, - } => { - __codec_dest_edqy.push_byte(37u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_hrmp_max_parathread_outbound_channels { - ref new, - } => { - __codec_dest_edqy.push_byte(38u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_hrmp_max_message_num_per_candidate { - ref new, - } => { - __codec_dest_edqy.push_byte(39u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_pvf_checking_enabled { ref new } => { - __codec_dest_edqy.push_byte(41u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_pvf_voting_ttl { ref new } => { - __codec_dest_edqy.push_byte(42u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_minimum_validation_upgrade_delay { ref new } => { - __codec_dest_edqy.push_byte(43u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_bypass_consistency_check { ref new } => { - __codec_dest_edqy.push_byte(44u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_async_backing_params { ref new } => { - __codec_dest_edqy.push_byte(45u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - Call::set_executor_params { ref new } => { - __codec_dest_edqy.push_byte(46u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - new, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "set_validation_upgrade_cooldown" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_validation_upgrade_cooldown { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_validation_upgrade_cooldown { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_validation_upgrade_delay" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_validation_upgrade_delay { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_validation_upgrade_delay { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_code_retention_period" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_code_retention_period { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_code_retention_period { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_max_code_size" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_max_code_size { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_max_code_size { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_max_pov_size" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_max_pov_size { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_max_pov_size { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_max_head_data_size" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_max_head_data_size { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_max_head_data_size { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_parathread_cores" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_parathread_cores { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_parathread_cores { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_parathread_retries" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_parathread_retries { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_parathread_retries { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_group_rotation_frequency" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_group_rotation_frequency { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_group_rotation_frequency { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_chain_availability_period" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_chain_availability_period { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_chain_availability_period { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_thread_availability_period" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_thread_availability_period { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_thread_availability_period { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_scheduling_lookahead" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_scheduling_lookahead { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_scheduling_lookahead { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_max_validators_per_core" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_max_validators_per_core { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_max_validators_per_core { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_max_validators" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_max_validators { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_max_validators { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_dispute_period" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_dispute_period { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_dispute_period { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() - == "set_dispute_post_conclusion_acceptance_period" - { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_dispute_post_conclusion_acceptance_period { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_dispute_post_conclusion_acceptance_period { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_no_show_slots" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_no_show_slots { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_no_show_slots { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_n_delay_tranches" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_n_delay_tranches { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_n_delay_tranches { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_zeroth_delay_tranche_width" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_zeroth_delay_tranche_width { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_zeroth_delay_tranche_width { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_needed_approvals" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_needed_approvals { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_needed_approvals { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_relay_vrf_modulo_samples" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_relay_vrf_modulo_samples { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_relay_vrf_modulo_samples { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_max_upward_queue_count" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_max_upward_queue_count { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_max_upward_queue_count { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_max_upward_queue_size" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_max_upward_queue_size { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_max_upward_queue_size { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_max_downward_message_size" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_max_downward_message_size { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_max_downward_message_size { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_max_upward_message_size" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_max_upward_message_size { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_max_upward_message_size { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() - == "set_max_upward_message_num_per_candidate" - { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_max_upward_message_num_per_candidate { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_max_upward_message_num_per_candidate { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_hrmp_open_request_ttl" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_hrmp_open_request_ttl { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_hrmp_open_request_ttl { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_hrmp_sender_deposit" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_hrmp_sender_deposit { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_hrmp_sender_deposit { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_hrmp_recipient_deposit" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_hrmp_recipient_deposit { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_hrmp_recipient_deposit { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_hrmp_channel_max_capacity" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_hrmp_channel_max_capacity { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_hrmp_channel_max_capacity { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_hrmp_channel_max_total_size" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_hrmp_channel_max_total_size { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_hrmp_channel_max_total_size { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_hrmp_max_parachain_inbound_channels" - { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_hrmp_max_parachain_inbound_channels { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_hrmp_max_parachain_inbound_channels { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() - == "set_hrmp_max_parathread_inbound_channels" - { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_hrmp_max_parathread_inbound_channels { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_hrmp_max_parathread_inbound_channels { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_hrmp_channel_max_message_size" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_hrmp_channel_max_message_size { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_hrmp_channel_max_message_size { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() - == "set_hrmp_max_parachain_outbound_channels" - { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_hrmp_max_parachain_outbound_channels { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_hrmp_max_parachain_outbound_channels { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() - == "set_hrmp_max_parathread_outbound_channels" - { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_hrmp_max_parathread_outbound_channels { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_hrmp_max_parathread_outbound_channels { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_hrmp_max_message_num_per_candidate" - { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_hrmp_max_message_num_per_candidate { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_hrmp_max_message_num_per_candidate { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_pvf_checking_enabled" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_pvf_checking_enabled { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_pvf_checking_enabled { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_pvf_voting_ttl" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_pvf_voting_ttl { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_pvf_voting_ttl { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_minimum_validation_upgrade_delay" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_minimum_validation_upgrade_delay { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_minimum_validation_upgrade_delay { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_bypass_consistency_check" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_bypass_consistency_check { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_bypass_consistency_check { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_async_backing_params" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_async_backing_params { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_async_backing_params { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - if value.name() == "set_executor_params" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::set_executor_params { - new: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::set_executor_params { - new: { - let val = *vals - .get(&Some("new")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "set_validation_upgrade_cooldown", - "set_validation_upgrade_delay", - "set_code_retention_period", - "set_max_code_size", - "set_max_pov_size", - "set_max_head_data_size", - "set_parathread_cores", - "set_parathread_retries", - "set_group_rotation_frequency", - "set_chain_availability_period", - "set_thread_availability_period", - "set_scheduling_lookahead", - "set_max_validators_per_core", - "set_max_validators", - "set_dispute_period", - "set_dispute_post_conclusion_acceptance_period", - "set_no_show_slots", - "set_n_delay_tranches", - "set_zeroth_delay_tranche_width", - "set_needed_approvals", - "set_relay_vrf_modulo_samples", - "set_max_upward_queue_count", - "set_max_upward_queue_size", - "set_max_downward_message_size", - "set_max_upward_message_size", - "set_max_upward_message_num_per_candidate", - "set_hrmp_open_request_ttl", - "set_hrmp_sender_deposit", - "set_hrmp_recipient_deposit", - "set_hrmp_channel_max_capacity", - "set_hrmp_channel_max_total_size", - "set_hrmp_max_parachain_inbound_channels", - "set_hrmp_max_parathread_inbound_channels", - "set_hrmp_channel_max_message_size", - "set_hrmp_max_parachain_outbound_channels", - "set_hrmp_max_parathread_outbound_channels", - "set_hrmp_max_message_num_per_candidate", - "set_pvf_checking_enabled", - "set_pvf_voting_ttl", - "set_minimum_validation_upgrade_delay", - "set_bypass_consistency_check", - "set_async_backing_params", - "set_executor_params", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::set_validation_upgrade_cooldown { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_validation_upgrade_cooldown", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_validation_upgrade_delay { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_validation_upgrade_delay", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_code_retention_period { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_code_retention_period", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_max_code_size { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_max_code_size", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_max_pov_size { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_max_pov_size", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_max_head_data_size { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_max_head_data_size", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_parathread_cores { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_parathread_cores", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_parathread_retries { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_parathread_retries", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_group_rotation_frequency { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_group_rotation_frequency", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_chain_availability_period { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_chain_availability_period", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_thread_availability_period { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_thread_availability_period", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_scheduling_lookahead { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_scheduling_lookahead", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_max_validators_per_core { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_max_validators_per_core", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_max_validators { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_max_validators", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_dispute_period { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_dispute_period", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_dispute_post_conclusion_acceptance_period { - new, - } => { - ::subxt::ext::scale_encode::Variant { - name: "set_dispute_post_conclusion_acceptance_period", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_no_show_slots { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_no_show_slots", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_n_delay_tranches { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_n_delay_tranches", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_zeroth_delay_tranche_width { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_zeroth_delay_tranche_width", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_needed_approvals { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_needed_approvals", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_relay_vrf_modulo_samples { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_relay_vrf_modulo_samples", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_max_upward_queue_count { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_max_upward_queue_count", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_max_upward_queue_size { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_max_upward_queue_size", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_max_downward_message_size { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_max_downward_message_size", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_max_upward_message_size { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_max_upward_message_size", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_max_upward_message_num_per_candidate { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_max_upward_message_num_per_candidate", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_hrmp_open_request_ttl { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_hrmp_open_request_ttl", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_hrmp_sender_deposit { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_hrmp_sender_deposit", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_hrmp_recipient_deposit { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_hrmp_recipient_deposit", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_hrmp_channel_max_capacity { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_hrmp_channel_max_capacity", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_hrmp_channel_max_total_size { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_hrmp_channel_max_total_size", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_hrmp_max_parachain_inbound_channels { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_hrmp_max_parachain_inbound_channels", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_hrmp_max_parathread_inbound_channels { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_hrmp_max_parathread_inbound_channels", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_hrmp_channel_max_message_size { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_hrmp_channel_max_message_size", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_hrmp_max_parachain_outbound_channels { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_hrmp_max_parachain_outbound_channels", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_hrmp_max_parathread_outbound_channels { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_hrmp_max_parathread_outbound_channels", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_hrmp_max_message_num_per_candidate { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_hrmp_max_message_num_per_candidate", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_pvf_checking_enabled { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_pvf_checking_enabled", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_pvf_voting_ttl { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_pvf_voting_ttl", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_minimum_validation_upgrade_delay { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_minimum_validation_upgrade_delay", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_bypass_consistency_check { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_bypass_consistency_check", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_async_backing_params { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_async_backing_params", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::set_executor_params { new } => { - ::subxt::ext::scale_encode::Variant { - name: "set_executor_params", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("new"), - new as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::set_validation_upgrade_cooldown { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_validation_upgrade_cooldown", - "new", - &__self_0, - ) - } - Call::set_validation_upgrade_delay { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_validation_upgrade_delay", - "new", - &__self_0, - ) - } - Call::set_code_retention_period { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_code_retention_period", - "new", - &__self_0, - ) - } - Call::set_max_code_size { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_max_code_size", - "new", - &__self_0, - ) - } - Call::set_max_pov_size { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_max_pov_size", - "new", - &__self_0, - ) - } - Call::set_max_head_data_size { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_max_head_data_size", - "new", - &__self_0, - ) - } - Call::set_parathread_cores { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_parathread_cores", - "new", - &__self_0, - ) - } - Call::set_parathread_retries { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_parathread_retries", - "new", - &__self_0, - ) - } - Call::set_group_rotation_frequency { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_group_rotation_frequency", - "new", - &__self_0, - ) - } - Call::set_chain_availability_period { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_chain_availability_period", - "new", - &__self_0, - ) - } - Call::set_thread_availability_period { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_thread_availability_period", - "new", - &__self_0, - ) - } - Call::set_scheduling_lookahead { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_scheduling_lookahead", - "new", - &__self_0, - ) - } - Call::set_max_validators_per_core { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_max_validators_per_core", - "new", - &__self_0, - ) - } - Call::set_max_validators { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_max_validators", - "new", - &__self_0, - ) - } - Call::set_dispute_period { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_dispute_period", - "new", - &__self_0, - ) - } - Call::set_dispute_post_conclusion_acceptance_period { - new: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_dispute_post_conclusion_acceptance_period", - "new", - &__self_0, - ) - } - Call::set_no_show_slots { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_no_show_slots", - "new", - &__self_0, - ) - } - Call::set_n_delay_tranches { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_n_delay_tranches", - "new", - &__self_0, - ) - } - Call::set_zeroth_delay_tranche_width { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_zeroth_delay_tranche_width", - "new", - &__self_0, - ) - } - Call::set_needed_approvals { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_needed_approvals", - "new", - &__self_0, - ) - } - Call::set_relay_vrf_modulo_samples { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_relay_vrf_modulo_samples", - "new", - &__self_0, - ) - } - Call::set_max_upward_queue_count { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_max_upward_queue_count", - "new", - &__self_0, - ) - } - Call::set_max_upward_queue_size { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_max_upward_queue_size", - "new", - &__self_0, - ) - } - Call::set_max_downward_message_size { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_max_downward_message_size", - "new", - &__self_0, - ) - } - Call::set_max_upward_message_size { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_max_upward_message_size", - "new", - &__self_0, - ) - } - Call::set_max_upward_message_num_per_candidate { - new: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_max_upward_message_num_per_candidate", - "new", - &__self_0, - ) - } - Call::set_hrmp_open_request_ttl { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_hrmp_open_request_ttl", - "new", - &__self_0, - ) - } - Call::set_hrmp_sender_deposit { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_hrmp_sender_deposit", - "new", - &__self_0, - ) - } - Call::set_hrmp_recipient_deposit { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_hrmp_recipient_deposit", - "new", - &__self_0, - ) - } - Call::set_hrmp_channel_max_capacity { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_hrmp_channel_max_capacity", - "new", - &__self_0, - ) - } - Call::set_hrmp_channel_max_total_size { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_hrmp_channel_max_total_size", - "new", - &__self_0, - ) - } - Call::set_hrmp_max_parachain_inbound_channels { - new: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_hrmp_max_parachain_inbound_channels", - "new", - &__self_0, - ) - } - Call::set_hrmp_max_parathread_inbound_channels { - new: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_hrmp_max_parathread_inbound_channels", - "new", - &__self_0, - ) - } - Call::set_hrmp_channel_max_message_size { - new: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_hrmp_channel_max_message_size", - "new", - &__self_0, - ) - } - Call::set_hrmp_max_parachain_outbound_channels { - new: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_hrmp_max_parachain_outbound_channels", - "new", - &__self_0, - ) - } - Call::set_hrmp_max_parathread_outbound_channels { - new: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_hrmp_max_parathread_outbound_channels", - "new", - &__self_0, - ) - } - Call::set_hrmp_max_message_num_per_candidate { - new: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_hrmp_max_message_num_per_candidate", - "new", - &__self_0, - ) - } - Call::set_pvf_checking_enabled { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_pvf_checking_enabled", - "new", - &__self_0, - ) - } - Call::set_pvf_voting_ttl { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_pvf_voting_ttl", - "new", - &__self_0, - ) - } - Call::set_minimum_validation_upgrade_delay { - new: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_minimum_validation_upgrade_delay", - "new", - &__self_0, - ) - } - Call::set_bypass_consistency_check { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_bypass_consistency_check", - "new", - &__self_0, - ) - } - Call::set_async_backing_params { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_async_backing_params", - "new", - &__self_0, - ) - } - Call::set_executor_params { new: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "set_executor_params", - "new", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - InvalidNewValue, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidNewValue) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::InvalidNewValue => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::InvalidNewValue => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "InvalidNewValue" { - return Ok(Error::InvalidNewValue); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["InvalidNewValue"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::InvalidNewValue => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidNewValue", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "InvalidNewValue") - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HostConfiguration<_0> { - pub max_code_size: ::core::primitive::u32, - pub max_head_data_size: ::core::primitive::u32, - pub max_upward_queue_count: ::core::primitive::u32, - pub max_upward_queue_size: ::core::primitive::u32, - pub max_upward_message_size: ::core::primitive::u32, - pub max_upward_message_num_per_candidate: ::core::primitive::u32, - pub hrmp_max_message_num_per_candidate: ::core::primitive::u32, - pub validation_upgrade_cooldown: _0, - pub validation_upgrade_delay: _0, - pub async_backing_params: runtime_types::polkadot_primitives::vstaging::AsyncBackingParams, - pub max_pov_size: ::core::primitive::u32, - pub max_downward_message_size: ::core::primitive::u32, - pub hrmp_max_parachain_outbound_channels: ::core::primitive::u32, - pub hrmp_max_parathread_outbound_channels: ::core::primitive::u32, - pub hrmp_sender_deposit: ::core::primitive::u128, - pub hrmp_recipient_deposit: ::core::primitive::u128, - pub hrmp_channel_max_capacity: ::core::primitive::u32, - pub hrmp_channel_max_total_size: ::core::primitive::u32, - pub hrmp_max_parachain_inbound_channels: ::core::primitive::u32, - pub hrmp_max_parathread_inbound_channels: ::core::primitive::u32, - pub hrmp_channel_max_message_size: ::core::primitive::u32, - pub executor_params: runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, - pub code_retention_period: _0, - pub parathread_cores: ::core::primitive::u32, - pub parathread_retries: ::core::primitive::u32, - pub group_rotation_frequency: _0, - pub chain_availability_period: _0, - pub thread_availability_period: _0, - pub scheduling_lookahead: ::core::primitive::u32, - pub max_validators_per_core: ::core::option::Option<_0>, - pub max_validators: ::core::option::Option<_0>, - pub dispute_period: ::core::primitive::u32, - pub dispute_post_conclusion_acceptance_period: _0, - pub no_show_slots: ::core::primitive::u32, - pub n_delay_tranches: ::core::primitive::u32, - pub zeroth_delay_tranche_width: ::core::primitive::u32, - pub needed_approvals: ::core::primitive::u32, - pub relay_vrf_modulo_samples: ::core::primitive::u32, - pub pvf_checking_enabled: ::core::primitive::bool, - pub pvf_voting_ttl: ::core::primitive::u32, - pub minimum_validation_upgrade_delay: _0, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for HostConfiguration<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(HostConfiguration::<_0> { - max_code_size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::max_code_size`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_head_data_size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::max_head_data_size`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_upward_queue_count: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::max_upward_queue_count`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_upward_queue_size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::max_upward_queue_size`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_upward_message_size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::max_upward_message_size`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_upward_message_num_per_candidate: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::max_upward_message_num_per_candidate`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hrmp_max_message_num_per_candidate: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::hrmp_max_message_num_per_candidate`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validation_upgrade_cooldown: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::validation_upgrade_cooldown`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validation_upgrade_delay: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::validation_upgrade_delay`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - async_backing_params: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::async_backing_params`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_pov_size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `HostConfiguration::max_pov_size`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_downward_message_size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::max_downward_message_size`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hrmp_max_parachain_outbound_channels: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::hrmp_max_parachain_outbound_channels`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hrmp_max_parathread_outbound_channels: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::hrmp_max_parathread_outbound_channels`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hrmp_sender_deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::hrmp_sender_deposit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hrmp_recipient_deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::hrmp_recipient_deposit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hrmp_channel_max_capacity: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::hrmp_channel_max_capacity`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hrmp_channel_max_total_size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::hrmp_channel_max_total_size`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hrmp_max_parachain_inbound_channels: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::hrmp_max_parachain_inbound_channels`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hrmp_max_parathread_inbound_channels: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::hrmp_max_parathread_inbound_channels`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hrmp_channel_max_message_size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::hrmp_channel_max_message_size`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - executor_params: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::executor_params`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - code_retention_period: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::code_retention_period`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - parathread_cores: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::parathread_cores`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - parathread_retries: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::parathread_retries`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - group_rotation_frequency: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::group_rotation_frequency`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - chain_availability_period: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::chain_availability_period`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - thread_availability_period: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::thread_availability_period`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - scheduling_lookahead: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::scheduling_lookahead`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_validators_per_core: { - let __codec_res_edqy = <::core::option::Option< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::max_validators_per_core`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_validators: { - let __codec_res_edqy = <::core::option::Option< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::max_validators`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - dispute_period: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::dispute_period`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - dispute_post_conclusion_acceptance_period: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::dispute_post_conclusion_acceptance_period`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - no_show_slots: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::no_show_slots`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - n_delay_tranches: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::n_delay_tranches`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - zeroth_delay_tranche_width: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::zeroth_delay_tranche_width`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - needed_approvals: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::needed_approvals`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - relay_vrf_modulo_samples: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::relay_vrf_modulo_samples`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pvf_checking_enabled: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::pvf_checking_enabled`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - pvf_voting_ttl: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::pvf_voting_ttl`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - minimum_validation_upgrade_delay: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HostConfiguration::minimum_validation_upgrade_delay`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for HostConfiguration<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_code_size), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.max_head_data_size, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.max_upward_queue_count, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.max_upward_queue_size, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.max_upward_message_size, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.max_upward_message_num_per_candidate, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.hrmp_max_message_num_per_candidate, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.validation_upgrade_cooldown, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.validation_upgrade_delay, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.async_backing_params, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_pov_size), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.max_downward_message_size, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.hrmp_max_parachain_outbound_channels, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.hrmp_max_parathread_outbound_channels, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.hrmp_sender_deposit, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.hrmp_recipient_deposit, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.hrmp_channel_max_capacity, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.hrmp_channel_max_total_size, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.hrmp_max_parachain_inbound_channels, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.hrmp_max_parathread_inbound_channels, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.hrmp_channel_max_message_size, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.executor_params, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.code_retention_period, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.parathread_cores, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.parathread_retries, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.group_rotation_frequency, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.chain_availability_period, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.thread_availability_period, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.scheduling_lookahead, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.max_validators_per_core, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_validators), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.dispute_period), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.dispute_post_conclusion_acceptance_period, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.no_show_slots), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.n_delay_tranches, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.zeroth_delay_tranche_width, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.needed_approvals, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.relay_vrf_modulo_samples, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.pvf_checking_enabled, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.pvf_voting_ttl), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.minimum_validation_upgrade_delay, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.max_code_size, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_head_data_size, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_upward_queue_count, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_upward_queue_size, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_upward_message_size, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_upward_message_num_per_candidate, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hrmp_max_message_num_per_candidate, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validation_upgrade_cooldown, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validation_upgrade_delay, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.async_backing_params, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_pov_size, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_downward_message_size, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hrmp_max_parachain_outbound_channels, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hrmp_max_parathread_outbound_channels, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hrmp_sender_deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hrmp_recipient_deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hrmp_channel_max_capacity, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hrmp_channel_max_total_size, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hrmp_max_parachain_inbound_channels, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hrmp_max_parathread_inbound_channels, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hrmp_channel_max_message_size, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.executor_params, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.code_retention_period, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.parathread_cores, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.parathread_retries, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.group_rotation_frequency, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.chain_availability_period, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.thread_availability_period, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.scheduling_lookahead, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_validators_per_core, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_validators, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.dispute_period, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.dispute_post_conclusion_acceptance_period, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.no_show_slots, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.n_delay_tranches, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.zeroth_delay_tranche_width, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.needed_approvals, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.relay_vrf_modulo_samples, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.pvf_checking_enabled, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.pvf_voting_ttl, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.minimum_validation_upgrade_delay, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike - for HostConfiguration<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for HostConfiguration<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = HostConfiguration<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(HostConfiguration { - max_code_size: { - let val = *vals - .get(&Some("max_code_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_code_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_code_size"))? - }, - max_head_data_size: { - let val = *vals - .get(&Some("max_head_data_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_head_data_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_head_data_size"))? - }, - max_upward_queue_count: { - let val = *vals - .get(&Some("max_upward_queue_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_upward_queue_count".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_upward_queue_count"))? - }, - max_upward_queue_size: { - let val = *vals - .get(&Some("max_upward_queue_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_upward_queue_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_upward_queue_size"))? - }, - max_upward_message_size: { - let val = *vals - .get(&Some("max_upward_message_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_upward_message_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_upward_message_size"))? - }, - max_upward_message_num_per_candidate: { - let val = *vals - .get(&Some("max_upward_message_num_per_candidate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_upward_message_num_per_candidate".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| { - e.at_field("max_upward_message_num_per_candidate") - })? - }, - hrmp_max_message_num_per_candidate: { - let val = *vals - .get(&Some("hrmp_max_message_num_per_candidate")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hrmp_max_message_num_per_candidate".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| { - e.at_field("hrmp_max_message_num_per_candidate") - })? - }, - validation_upgrade_cooldown: { - let val = *vals - .get(&Some("validation_upgrade_cooldown")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validation_upgrade_cooldown".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_upgrade_cooldown"))? - }, - validation_upgrade_delay: { - let val = *vals - .get(&Some("validation_upgrade_delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validation_upgrade_delay".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_upgrade_delay"))? - }, - async_backing_params: { - let val = *vals - .get(&Some("async_backing_params")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "async_backing_params".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("async_backing_params"))? - }, - max_pov_size: { - let val = *vals - .get(&Some("max_pov_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_pov_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_pov_size"))? - }, - max_downward_message_size: { - let val = *vals - .get(&Some("max_downward_message_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_downward_message_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_downward_message_size"))? - }, - hrmp_max_parachain_outbound_channels: { - let val = *vals - .get(&Some("hrmp_max_parachain_outbound_channels")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hrmp_max_parachain_outbound_channels".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| { - e.at_field("hrmp_max_parachain_outbound_channels") - })? - }, - hrmp_max_parathread_outbound_channels: { - let val = *vals - .get(&Some("hrmp_max_parathread_outbound_channels")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hrmp_max_parathread_outbound_channels".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| { - e.at_field("hrmp_max_parathread_outbound_channels") - })? - }, - hrmp_sender_deposit: { - let val = *vals - .get(&Some("hrmp_sender_deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hrmp_sender_deposit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("hrmp_sender_deposit"))? - }, - hrmp_recipient_deposit: { - let val = *vals - .get(&Some("hrmp_recipient_deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hrmp_recipient_deposit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("hrmp_recipient_deposit"))? - }, - hrmp_channel_max_capacity: { - let val = *vals - .get(&Some("hrmp_channel_max_capacity")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hrmp_channel_max_capacity".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("hrmp_channel_max_capacity"))? - }, - hrmp_channel_max_total_size: { - let val = *vals - .get(&Some("hrmp_channel_max_total_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hrmp_channel_max_total_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("hrmp_channel_max_total_size"))? - }, - hrmp_max_parachain_inbound_channels: { - let val = *vals - .get(&Some("hrmp_max_parachain_inbound_channels")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hrmp_max_parachain_inbound_channels".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| { - e.at_field("hrmp_max_parachain_inbound_channels") - })? - }, - hrmp_max_parathread_inbound_channels: { - let val = *vals - .get(&Some("hrmp_max_parathread_inbound_channels")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hrmp_max_parathread_inbound_channels".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| { - e.at_field("hrmp_max_parathread_inbound_channels") - })? - }, - hrmp_channel_max_message_size: { - let val = *vals - .get(&Some("hrmp_channel_max_message_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hrmp_channel_max_message_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("hrmp_channel_max_message_size"))? - }, - executor_params: { - let val = *vals - .get(&Some("executor_params")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "executor_params".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("executor_params"))? - }, - code_retention_period: { - let val = *vals - .get(&Some("code_retention_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "code_retention_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("code_retention_period"))? - }, - parathread_cores: { - let val = *vals - .get(&Some("parathread_cores")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parathread_cores".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parathread_cores"))? - }, - parathread_retries: { - let val = *vals - .get(&Some("parathread_retries")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parathread_retries".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("parathread_retries"))? - }, - group_rotation_frequency: { - let val = *vals - .get(&Some("group_rotation_frequency")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "group_rotation_frequency".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("group_rotation_frequency"))? - }, - chain_availability_period: { - let val = *vals - .get(&Some("chain_availability_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "chain_availability_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("chain_availability_period"))? - }, - thread_availability_period: { - let val = *vals - .get(&Some("thread_availability_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "thread_availability_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("thread_availability_period"))? - }, - scheduling_lookahead: { - let val = *vals - .get(&Some("scheduling_lookahead")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "scheduling_lookahead".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("scheduling_lookahead"))? - }, - max_validators_per_core: { - let val = *vals - .get(&Some("max_validators_per_core")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_validators_per_core".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_validators_per_core"))? - }, - max_validators: { - let val = *vals - .get(&Some("max_validators")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_validators".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_validators"))? - }, - dispute_period: { - let val = *vals - .get(&Some("dispute_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dispute_period".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("dispute_period"))? - }, - dispute_post_conclusion_acceptance_period: { - let val = *vals - .get(&Some("dispute_post_conclusion_acceptance_period")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dispute_post_conclusion_acceptance_period" - .to_string(), - }))?; - val.decode_as_type() - .map_err(|e| { - e.at_field("dispute_post_conclusion_acceptance_period") - })? - }, - no_show_slots: { - let val = *vals - .get(&Some("no_show_slots")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "no_show_slots".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("no_show_slots"))? - }, - n_delay_tranches: { - let val = *vals - .get(&Some("n_delay_tranches")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "n_delay_tranches".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("n_delay_tranches"))? - }, - zeroth_delay_tranche_width: { - let val = *vals - .get(&Some("zeroth_delay_tranche_width")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "zeroth_delay_tranche_width".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("zeroth_delay_tranche_width"))? - }, - needed_approvals: { - let val = *vals - .get(&Some("needed_approvals")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "needed_approvals".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("needed_approvals"))? - }, - relay_vrf_modulo_samples: { - let val = *vals - .get(&Some("relay_vrf_modulo_samples")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "relay_vrf_modulo_samples".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("relay_vrf_modulo_samples"))? - }, - pvf_checking_enabled: { - let val = *vals - .get(&Some("pvf_checking_enabled")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pvf_checking_enabled".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("pvf_checking_enabled"))? - }, - pvf_voting_ttl: { - let val = *vals - .get(&Some("pvf_voting_ttl")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "pvf_voting_ttl".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("pvf_voting_ttl"))? - }, - minimum_validation_upgrade_delay: { - let val = *vals - .get(&Some("minimum_validation_upgrade_delay")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "minimum_validation_upgrade_delay".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| { - e.at_field("minimum_validation_upgrade_delay") - })? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 41usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 41usize, - }), - ); - } - let vals = value; - Ok(HostConfiguration { - max_code_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_code_size"))? - }, - max_head_data_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_head_data_size"))? - }, - max_upward_queue_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_upward_queue_count"))? - }, - max_upward_queue_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_upward_queue_size"))? - }, - max_upward_message_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_upward_message_size"))? - }, - max_upward_message_num_per_candidate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| { - e.at_field("max_upward_message_num_per_candidate") - })? - }, - hrmp_max_message_num_per_candidate: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| { - e.at_field("hrmp_max_message_num_per_candidate") - })? - }, - validation_upgrade_cooldown: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_upgrade_cooldown"))? - }, - validation_upgrade_delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_upgrade_delay"))? - }, - async_backing_params: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("async_backing_params"))? - }, - max_pov_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_pov_size"))? - }, - max_downward_message_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_downward_message_size"))? - }, - hrmp_max_parachain_outbound_channels: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| { - e.at_field("hrmp_max_parachain_outbound_channels") - })? - }, - hrmp_max_parathread_outbound_channels: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| { - e.at_field("hrmp_max_parathread_outbound_channels") - })? - }, - hrmp_sender_deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("hrmp_sender_deposit"))? - }, - hrmp_recipient_deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("hrmp_recipient_deposit"))? - }, - hrmp_channel_max_capacity: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("hrmp_channel_max_capacity"))? - }, - hrmp_channel_max_total_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("hrmp_channel_max_total_size"))? - }, - hrmp_max_parachain_inbound_channels: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| { - e.at_field("hrmp_max_parachain_inbound_channels") - })? - }, - hrmp_max_parathread_inbound_channels: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| { - e.at_field("hrmp_max_parathread_inbound_channels") - })? - }, - hrmp_channel_max_message_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("hrmp_channel_max_message_size"))? - }, - executor_params: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("executor_params"))? - }, - code_retention_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("code_retention_period"))? - }, - parathread_cores: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parathread_cores"))? - }, - parathread_retries: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("parathread_retries"))? - }, - group_rotation_frequency: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("group_rotation_frequency"))? - }, - chain_availability_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("chain_availability_period"))? - }, - thread_availability_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("thread_availability_period"))? - }, - scheduling_lookahead: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("scheduling_lookahead"))? - }, - max_validators_per_core: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_validators_per_core"))? - }, - max_validators: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_validators"))? - }, - dispute_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("dispute_period"))? - }, - dispute_post_conclusion_acceptance_period: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| { - e.at_field("dispute_post_conclusion_acceptance_period") - })? - }, - no_show_slots: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("no_show_slots"))? - }, - n_delay_tranches: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("n_delay_tranches"))? - }, - zeroth_delay_tranche_width: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("zeroth_delay_tranche_width"))? - }, - needed_approvals: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("needed_approvals"))? - }, - relay_vrf_modulo_samples: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("relay_vrf_modulo_samples"))? - }, - pvf_checking_enabled: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("pvf_checking_enabled"))? - }, - pvf_voting_ttl: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("pvf_voting_ttl"))? - }, - minimum_validation_upgrade_delay: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| { - e.at_field("minimum_validation_upgrade_delay") - })? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for HostConfiguration<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for HostConfiguration<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HostConfiguration { - max_code_size, - max_head_data_size, - max_upward_queue_count, - max_upward_queue_size, - max_upward_message_size, - max_upward_message_num_per_candidate, - hrmp_max_message_num_per_candidate, - validation_upgrade_cooldown, - validation_upgrade_delay, - async_backing_params, - max_pov_size, - max_downward_message_size, - hrmp_max_parachain_outbound_channels, - hrmp_max_parathread_outbound_channels, - hrmp_sender_deposit, - hrmp_recipient_deposit, - hrmp_channel_max_capacity, - hrmp_channel_max_total_size, - hrmp_max_parachain_inbound_channels, - hrmp_max_parathread_inbound_channels, - hrmp_channel_max_message_size, - executor_params, - code_retention_period, - parathread_cores, - parathread_retries, - group_rotation_frequency, - chain_availability_period, - thread_availability_period, - scheduling_lookahead, - max_validators_per_core, - max_validators, - dispute_period, - dispute_post_conclusion_acceptance_period, - no_show_slots, - n_delay_tranches, - zeroth_delay_tranche_width, - needed_approvals, - relay_vrf_modulo_samples, - pvf_checking_enabled, - pvf_voting_ttl, - minimum_validation_upgrade_delay, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("max_code_size"), - max_code_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_head_data_size"), - max_head_data_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_upward_queue_count"), - max_upward_queue_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_upward_queue_size"), - max_upward_queue_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_upward_message_size"), - max_upward_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_upward_message_num_per_candidate"), - max_upward_message_num_per_candidate - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_max_message_num_per_candidate"), - hrmp_max_message_num_per_candidate - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validation_upgrade_cooldown"), - validation_upgrade_cooldown - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validation_upgrade_delay"), - validation_upgrade_delay - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("async_backing_params"), - async_backing_params - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_pov_size"), - max_pov_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_downward_message_size"), - max_downward_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_max_parachain_outbound_channels"), - hrmp_max_parachain_outbound_channels - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_max_parathread_outbound_channels"), - hrmp_max_parathread_outbound_channels - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_sender_deposit"), - hrmp_sender_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_recipient_deposit"), - hrmp_recipient_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_channel_max_capacity"), - hrmp_channel_max_capacity - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_channel_max_total_size"), - hrmp_channel_max_total_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_max_parachain_inbound_channels"), - hrmp_max_parachain_inbound_channels - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_max_parathread_inbound_channels"), - hrmp_max_parathread_inbound_channels - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_channel_max_message_size"), - hrmp_channel_max_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("executor_params"), - executor_params - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("code_retention_period"), - code_retention_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("parathread_cores"), - parathread_cores - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("parathread_retries"), - parathread_retries - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("group_rotation_frequency"), - group_rotation_frequency - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("chain_availability_period"), - chain_availability_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("thread_availability_period"), - thread_availability_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("scheduling_lookahead"), - scheduling_lookahead - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_validators_per_core"), - max_validators_per_core - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_validators"), - max_validators - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dispute_period"), - dispute_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dispute_post_conclusion_acceptance_period"), - dispute_post_conclusion_acceptance_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("no_show_slots"), - no_show_slots - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("n_delay_tranches"), - n_delay_tranches - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("zeroth_delay_tranche_width"), - zeroth_delay_tranche_width - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("needed_approvals"), - needed_approvals - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("relay_vrf_modulo_samples"), - relay_vrf_modulo_samples - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pvf_checking_enabled"), - pvf_checking_enabled - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pvf_voting_ttl"), - pvf_voting_ttl - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("minimum_validation_upgrade_delay"), - minimum_validation_upgrade_delay - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for HostConfiguration<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HostConfiguration { - max_code_size, - max_head_data_size, - max_upward_queue_count, - max_upward_queue_size, - max_upward_message_size, - max_upward_message_num_per_candidate, - hrmp_max_message_num_per_candidate, - validation_upgrade_cooldown, - validation_upgrade_delay, - async_backing_params, - max_pov_size, - max_downward_message_size, - hrmp_max_parachain_outbound_channels, - hrmp_max_parathread_outbound_channels, - hrmp_sender_deposit, - hrmp_recipient_deposit, - hrmp_channel_max_capacity, - hrmp_channel_max_total_size, - hrmp_max_parachain_inbound_channels, - hrmp_max_parathread_inbound_channels, - hrmp_channel_max_message_size, - executor_params, - code_retention_period, - parathread_cores, - parathread_retries, - group_rotation_frequency, - chain_availability_period, - thread_availability_period, - scheduling_lookahead, - max_validators_per_core, - max_validators, - dispute_period, - dispute_post_conclusion_acceptance_period, - no_show_slots, - n_delay_tranches, - zeroth_delay_tranche_width, - needed_approvals, - relay_vrf_modulo_samples, - pvf_checking_enabled, - pvf_voting_ttl, - minimum_validation_upgrade_delay, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("max_code_size"), - max_code_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_head_data_size"), - max_head_data_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_upward_queue_count"), - max_upward_queue_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_upward_queue_size"), - max_upward_queue_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_upward_message_size"), - max_upward_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_upward_message_num_per_candidate"), - max_upward_message_num_per_candidate - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_max_message_num_per_candidate"), - hrmp_max_message_num_per_candidate - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validation_upgrade_cooldown"), - validation_upgrade_cooldown - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validation_upgrade_delay"), - validation_upgrade_delay - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("async_backing_params"), - async_backing_params - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_pov_size"), - max_pov_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_downward_message_size"), - max_downward_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_max_parachain_outbound_channels"), - hrmp_max_parachain_outbound_channels - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_max_parathread_outbound_channels"), - hrmp_max_parathread_outbound_channels - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_sender_deposit"), - hrmp_sender_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_recipient_deposit"), - hrmp_recipient_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_channel_max_capacity"), - hrmp_channel_max_capacity - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_channel_max_total_size"), - hrmp_channel_max_total_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_max_parachain_inbound_channels"), - hrmp_max_parachain_inbound_channels - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_max_parathread_inbound_channels"), - hrmp_max_parathread_inbound_channels - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hrmp_channel_max_message_size"), - hrmp_channel_max_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("executor_params"), - executor_params - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("code_retention_period"), - code_retention_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("parathread_cores"), - parathread_cores - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("parathread_retries"), - parathread_retries - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("group_rotation_frequency"), - group_rotation_frequency - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("chain_availability_period"), - chain_availability_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("thread_availability_period"), - thread_availability_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("scheduling_lookahead"), - scheduling_lookahead - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_validators_per_core"), - max_validators_per_core - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_validators"), - max_validators - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dispute_period"), - dispute_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dispute_post_conclusion_acceptance_period"), - dispute_post_conclusion_acceptance_period - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("no_show_slots"), - no_show_slots - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("n_delay_tranches"), - n_delay_tranches - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("zeroth_delay_tranche_width"), - zeroth_delay_tranche_width - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("needed_approvals"), - needed_approvals - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("relay_vrf_modulo_samples"), - relay_vrf_modulo_samples - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pvf_checking_enabled"), - pvf_checking_enabled - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("pvf_voting_ttl"), - pvf_voting_ttl - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("minimum_validation_upgrade_delay"), - minimum_validation_upgrade_delay - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for HostConfiguration<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "max_code_size", - "max_head_data_size", - "max_upward_queue_count", - "max_upward_queue_size", - "max_upward_message_size", - "max_upward_message_num_per_candidate", - "hrmp_max_message_num_per_candidate", - "validation_upgrade_cooldown", - "validation_upgrade_delay", - "async_backing_params", - "max_pov_size", - "max_downward_message_size", - "hrmp_max_parachain_outbound_channels", - "hrmp_max_parathread_outbound_channels", - "hrmp_sender_deposit", - "hrmp_recipient_deposit", - "hrmp_channel_max_capacity", - "hrmp_channel_max_total_size", - "hrmp_max_parachain_inbound_channels", - "hrmp_max_parathread_inbound_channels", - "hrmp_channel_max_message_size", - "executor_params", - "code_retention_period", - "parathread_cores", - "parathread_retries", - "group_rotation_frequency", - "chain_availability_period", - "thread_availability_period", - "scheduling_lookahead", - "max_validators_per_core", - "max_validators", - "dispute_period", - "dispute_post_conclusion_acceptance_period", - "no_show_slots", - "n_delay_tranches", - "zeroth_delay_tranche_width", - "needed_approvals", - "relay_vrf_modulo_samples", - "pvf_checking_enabled", - "pvf_voting_ttl", - "minimum_validation_upgrade_delay", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.max_code_size, - &self.max_head_data_size, - &self.max_upward_queue_count, - &self.max_upward_queue_size, - &self.max_upward_message_size, - &self.max_upward_message_num_per_candidate, - &self.hrmp_max_message_num_per_candidate, - &self.validation_upgrade_cooldown, - &self.validation_upgrade_delay, - &self.async_backing_params, - &self.max_pov_size, - &self.max_downward_message_size, - &self.hrmp_max_parachain_outbound_channels, - &self.hrmp_max_parathread_outbound_channels, - &self.hrmp_sender_deposit, - &self.hrmp_recipient_deposit, - &self.hrmp_channel_max_capacity, - &self.hrmp_channel_max_total_size, - &self.hrmp_max_parachain_inbound_channels, - &self.hrmp_max_parathread_inbound_channels, - &self.hrmp_channel_max_message_size, - &self.executor_params, - &self.code_retention_period, - &self.parathread_cores, - &self.parathread_retries, - &self.group_rotation_frequency, - &self.chain_availability_period, - &self.thread_availability_period, - &self.scheduling_lookahead, - &self.max_validators_per_core, - &self.max_validators, - &self.dispute_period, - &self.dispute_post_conclusion_acceptance_period, - &self.no_show_slots, - &self.n_delay_tranches, - &self.zeroth_delay_tranche_width, - &self.needed_approvals, - &self.relay_vrf_modulo_samples, - &self.pvf_checking_enabled, - &self.pvf_voting_ttl, - &&self.minimum_validation_upgrade_delay, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "HostConfiguration", - names, - values, - ) - } - } - } - pub mod disputes { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - force_unfreeze, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_unfreeze) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::force_unfreeze => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::force_unfreeze => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "force_unfreeze" { - return Ok(Call::force_unfreeze); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["force_unfreeze"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::force_unfreeze => { - ::subxt::ext::scale_encode::Variant { - name: "force_unfreeze", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "force_unfreeze") - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - DuplicateDisputeStatementSets, - #[codec(index = 1)] - AncientDisputeStatement, - #[codec(index = 2)] - ValidatorIndexOutOfBounds, - #[codec(index = 3)] - InvalidSignature, - #[codec(index = 4)] - DuplicateStatement, - #[codec(index = 5)] - SingleSidedDispute, - #[codec(index = 6)] - MaliciousBacker, - #[codec(index = 7)] - MissingBackingVotes, - #[codec(index = 8)] - UnconfirmedDispute, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::DuplicateDisputeStatementSets, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AncientDisputeStatement) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ValidatorIndexOutOfBounds) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidSignature) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::DuplicateStatement) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::SingleSidedDispute) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MaliciousBacker) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MissingBackingVotes) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UnconfirmedDispute) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::DuplicateDisputeStatementSets => 0_usize, - Error::AncientDisputeStatement => 0_usize, - Error::ValidatorIndexOutOfBounds => 0_usize, - Error::InvalidSignature => 0_usize, - Error::DuplicateStatement => 0_usize, - Error::SingleSidedDispute => 0_usize, - Error::MaliciousBacker => 0_usize, - Error::MissingBackingVotes => 0_usize, - Error::UnconfirmedDispute => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::DuplicateDisputeStatementSets => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::AncientDisputeStatement => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::ValidatorIndexOutOfBounds => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::InvalidSignature => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::DuplicateStatement => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::SingleSidedDispute => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::MaliciousBacker => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::MissingBackingVotes => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::UnconfirmedDispute => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "DuplicateDisputeStatementSets" { - return Ok(Error::DuplicateDisputeStatementSets); - } - if value.name() == "AncientDisputeStatement" { - return Ok(Error::AncientDisputeStatement); - } - if value.name() == "ValidatorIndexOutOfBounds" { - return Ok(Error::ValidatorIndexOutOfBounds); - } - if value.name() == "InvalidSignature" { - return Ok(Error::InvalidSignature); - } - if value.name() == "DuplicateStatement" { - return Ok(Error::DuplicateStatement); - } - if value.name() == "SingleSidedDispute" { - return Ok(Error::SingleSidedDispute); - } - if value.name() == "MaliciousBacker" { - return Ok(Error::MaliciousBacker); - } - if value.name() == "MissingBackingVotes" { - return Ok(Error::MissingBackingVotes); - } - if value.name() == "UnconfirmedDispute" { - return Ok(Error::UnconfirmedDispute); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "DuplicateDisputeStatementSets", - "AncientDisputeStatement", - "ValidatorIndexOutOfBounds", - "InvalidSignature", - "DuplicateStatement", - "SingleSidedDispute", - "MaliciousBacker", - "MissingBackingVotes", - "UnconfirmedDispute", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::DuplicateDisputeStatementSets => { - ::subxt::ext::scale_encode::Variant { - name: "DuplicateDisputeStatementSets", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AncientDisputeStatement => { - ::subxt::ext::scale_encode::Variant { - name: "AncientDisputeStatement", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ValidatorIndexOutOfBounds => { - ::subxt::ext::scale_encode::Variant { - name: "ValidatorIndexOutOfBounds", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidSignature => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidSignature", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DuplicateStatement => { - ::subxt::ext::scale_encode::Variant { - name: "DuplicateStatement", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SingleSidedDispute => { - ::subxt::ext::scale_encode::Variant { - name: "SingleSidedDispute", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MaliciousBacker => { - ::subxt::ext::scale_encode::Variant { - name: "MaliciousBacker", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MissingBackingVotes => { - ::subxt::ext::scale_encode::Variant { - name: "MissingBackingVotes", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnconfirmedDispute => { - ::subxt::ext::scale_encode::Variant { - name: "UnconfirmedDispute", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::DuplicateDisputeStatementSets => { - "DuplicateDisputeStatementSets" - } - Error::AncientDisputeStatement => "AncientDisputeStatement", - Error::ValidatorIndexOutOfBounds => { - "ValidatorIndexOutOfBounds" - } - Error::InvalidSignature => "InvalidSignature", - Error::DuplicateStatement => "DuplicateStatement", - Error::SingleSidedDispute => "SingleSidedDispute", - Error::MaliciousBacker => "MaliciousBacker", - Error::MissingBackingVotes => "MissingBackingVotes", - Error::UnconfirmedDispute => "UnconfirmedDispute", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - DisputeInitiated( - runtime_types::polkadot_core_primitives::CandidateHash, - runtime_types::polkadot_runtime_parachains::disputes::DisputeLocation, - ), - #[codec(index = 1)] - DisputeConcluded( - runtime_types::polkadot_core_primitives::CandidateHash, - runtime_types::polkadot_runtime_parachains::disputes::DisputeResult, - ), - #[codec(index = 2)] - Revert(::core::primitive::u32), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::DisputeInitiated( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::DisputeInitiated.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::DisputeInitiated.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::DisputeConcluded( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::DisputeConcluded.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::DisputeConcluded.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::Revert({ - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::Revert.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::DisputeInitiated(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::DisputeConcluded(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::Revert(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::DisputeInitiated(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::DisputeConcluded(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::Revert(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "DisputeInitiated" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::DisputeInitiated( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "DisputeConcluded" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::DisputeConcluded( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "Revert" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Event::Revert({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "DisputeInitiated", - "DisputeConcluded", - "Revert", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::DisputeInitiated(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "DisputeInitiated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DisputeConcluded(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "DisputeConcluded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Revert(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Revert", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::DisputeInitiated(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "DisputeInitiated", - __self_0, - &__self_1, - ) - } - Event::DisputeConcluded(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "DisputeConcluded", - __self_0, - &__self_1, - ) - } - Event::Revert(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Revert", - &__self_0, - ) - } - } - } - } - } - pub mod slashing { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type( - crate_path = ":: subxt :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: scale_encode" - )] - pub enum Call { - #[codec(index = 0)] - report_dispute_lost_unsigned { - dispute_proof: ::std::boxed::Box< - runtime_types::polkadot_runtime_parachains::disputes::slashing::DisputeProof, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::report_dispute_lost_unsigned { - dispute_proof: { - let __codec_res_edqy = <::std::boxed::Box< - runtime_types::polkadot_runtime_parachains::disputes::slashing::DisputeProof, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::report_dispute_lost_unsigned::dispute_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - key_owner_proof: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::report_dispute_lost_unsigned::key_owner_proof`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::report_dispute_lost_unsigned { - ref dispute_proof, - ref key_owner_proof, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dispute_proof), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(key_owner_proof), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::report_dispute_lost_unsigned { - ref dispute_proof, - ref key_owner_proof, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - dispute_proof, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - key_owner_proof, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "report_dispute_lost_unsigned" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::report_dispute_lost_unsigned { - dispute_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("dispute_proof"))? - }, - key_owner_proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::report_dispute_lost_unsigned { - dispute_proof: { - let val = *vals - .get(&Some("dispute_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dispute_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("dispute_proof"))? - }, - key_owner_proof: { - let val = *vals - .get(&Some("key_owner_proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "key_owner_proof".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("key_owner_proof"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["report_dispute_lost_unsigned"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::report_dispute_lost_unsigned { - dispute_proof, - key_owner_proof, - } => { - ::subxt::ext::scale_encode::Variant { - name: "report_dispute_lost_unsigned", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("dispute_proof"), - dispute_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("key_owner_proof"), - key_owner_proof - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::report_dispute_lost_unsigned { - dispute_proof: __self_0, - key_owner_proof: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "report_dispute_lost_unsigned", - "dispute_proof", - __self_0, - "key_owner_proof", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type( - crate_path = ":: subxt :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: scale_encode" - )] - pub enum Error { - #[codec(index = 0)] - InvalidKeyOwnershipProof, - #[codec(index = 1)] - InvalidSessionIndex, - #[codec(index = 2)] - InvalidCandidateHash, - #[codec(index = 3)] - InvalidValidatorIndex, - #[codec(index = 4)] - ValidatorIndexIdMismatch, - #[codec(index = 5)] - DuplicateSlashingReport, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidKeyOwnershipProof) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidSessionIndex) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidCandidateHash) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidValidatorIndex) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ValidatorIndexIdMismatch) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::DuplicateSlashingReport) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::InvalidKeyOwnershipProof => 0_usize, - Error::InvalidSessionIndex => 0_usize, - Error::InvalidCandidateHash => 0_usize, - Error::InvalidValidatorIndex => 0_usize, - Error::ValidatorIndexIdMismatch => 0_usize, - Error::DuplicateSlashingReport => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::InvalidKeyOwnershipProof => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::InvalidSessionIndex => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::InvalidCandidateHash => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::InvalidValidatorIndex => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::ValidatorIndexIdMismatch => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::DuplicateSlashingReport => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "InvalidKeyOwnershipProof" { - return Ok(Error::InvalidKeyOwnershipProof); - } - if value.name() == "InvalidSessionIndex" { - return Ok(Error::InvalidSessionIndex); - } - if value.name() == "InvalidCandidateHash" { - return Ok(Error::InvalidCandidateHash); - } - if value.name() == "InvalidValidatorIndex" { - return Ok(Error::InvalidValidatorIndex); - } - if value.name() == "ValidatorIndexIdMismatch" { - return Ok(Error::ValidatorIndexIdMismatch); - } - if value.name() == "DuplicateSlashingReport" { - return Ok(Error::DuplicateSlashingReport); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "InvalidKeyOwnershipProof", - "InvalidSessionIndex", - "InvalidCandidateHash", - "InvalidValidatorIndex", - "ValidatorIndexIdMismatch", - "DuplicateSlashingReport", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::InvalidKeyOwnershipProof => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidKeyOwnershipProof", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidSessionIndex => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidSessionIndex", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidCandidateHash => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidCandidateHash", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidValidatorIndex => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidValidatorIndex", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ValidatorIndexIdMismatch => { - ::subxt::ext::scale_encode::Variant { - name: "ValidatorIndexIdMismatch", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DuplicateSlashingReport => { - ::subxt::ext::scale_encode::Variant { - name: "DuplicateSlashingReport", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::InvalidKeyOwnershipProof => { - "InvalidKeyOwnershipProof" - } - Error::InvalidSessionIndex => "InvalidSessionIndex", - Error::InvalidCandidateHash => "InvalidCandidateHash", - Error::InvalidValidatorIndex => "InvalidValidatorIndex", - Error::ValidatorIndexIdMismatch => { - "ValidatorIndexIdMismatch" - } - Error::DuplicateSlashingReport => "DuplicateSlashingReport", - }, - ) - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DisputeProof { - pub time_slot: runtime_types::polkadot_runtime_parachains::disputes::slashing::DisputesTimeSlot, - pub kind: runtime_types::polkadot_runtime_parachains::disputes::slashing::SlashingOffenceKind, - pub validator_index: runtime_types::polkadot_primitives::v4::ValidatorIndex, - pub validator_id: runtime_types::polkadot_primitives::v4::validator_app::Public, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DisputeProof { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(DisputeProof { - time_slot: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DisputeProof::time_slot`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - kind: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DisputeProof::kind`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validator_index: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DisputeProof::validator_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validator_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DisputeProof::validator_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DisputeProof { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.time_slot), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.kind), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.validator_index, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.validator_id), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.time_slot, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.kind, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validator_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validator_id, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DisputeProof {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for DisputeProof { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DisputeProof; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DisputeProof { - time_slot: { - let val = *vals - .get(&Some("time_slot")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "time_slot".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("time_slot"))? - }, - kind: { - let val = *vals - .get(&Some("kind")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "kind".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("kind"))? - }, - validator_index: { - let val = *vals - .get(&Some("validator_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_index"))? - }, - validator_id: { - let val = *vals - .get(&Some("validator_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator_id".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_id"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(DisputeProof { - time_slot: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("time_slot"))? - }, - kind: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("kind"))? - }, - validator_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_index"))? - }, - validator_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_id"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for DisputeProof { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DisputeProof { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DisputeProof { - time_slot, - kind, - validator_index, - validator_id, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("time_slot"), - time_slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("kind"), - kind as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_index"), - validator_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_id"), - validator_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for DisputeProof { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DisputeProof { - time_slot, - kind, - validator_index, - validator_id, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("time_slot"), - time_slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("kind"), - kind as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_index"), - validator_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_id"), - validator_id - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DisputeProof { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "DisputeProof", - "time_slot", - &self.time_slot, - "kind", - &self.kind, - "validator_index", - &self.validator_index, - "validator_id", - &&self.validator_id, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DisputesTimeSlot { - pub session_index: ::core::primitive::u32, - pub candidate_hash: runtime_types::polkadot_core_primitives::CandidateHash, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DisputesTimeSlot { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(DisputesTimeSlot { - session_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `DisputesTimeSlot::session_index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - candidate_hash: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `DisputesTimeSlot::candidate_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DisputesTimeSlot { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.session_index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.candidate_hash), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.session_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.candidate_hash, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DisputesTimeSlot {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for DisputesTimeSlot { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DisputesTimeSlot; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DisputesTimeSlot { - session_index: { - let val = *vals - .get(&Some("session_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "session_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("session_index"))? - }, - candidate_hash: { - let val = *vals - .get(&Some("candidate_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "candidate_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("candidate_hash"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(DisputesTimeSlot { - session_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("session_index"))? - }, - candidate_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("candidate_hash"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for DisputesTimeSlot { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for DisputesTimeSlot { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DisputesTimeSlot { session_index, candidate_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("session_index"), - session_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("candidate_hash"), - candidate_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for DisputesTimeSlot { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DisputesTimeSlot { session_index, candidate_hash } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("session_index"), - session_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("candidate_hash"), - candidate_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DisputesTimeSlot { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "DisputesTimeSlot", - "session_index", - &self.session_index, - "candidate_hash", - &&self.candidate_hash, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PendingSlashes { - pub keys: ::subxt::utils::KeyedVec< - runtime_types::polkadot_primitives::v4::ValidatorIndex, - runtime_types::polkadot_primitives::v4::validator_app::Public, - >, - pub kind: runtime_types::polkadot_runtime_parachains::disputes::slashing::SlashingOffenceKind, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PendingSlashes { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(PendingSlashes { - keys: { - let __codec_res_edqy = <::subxt::utils::KeyedVec< - runtime_types::polkadot_primitives::v4::ValidatorIndex, - runtime_types::polkadot_primitives::v4::validator_app::Public, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PendingSlashes::keys`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - kind: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PendingSlashes::kind`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PendingSlashes { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.keys), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.kind), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.keys, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.kind, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PendingSlashes {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for PendingSlashes { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PendingSlashes; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PendingSlashes { - keys: { - let val = *vals - .get(&Some("keys")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "keys".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("keys"))? - }, - kind: { - let val = *vals - .get(&Some("kind")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "kind".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("kind"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(PendingSlashes { - keys: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("keys"))? - }, - kind: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("kind"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PendingSlashes { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for PendingSlashes { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PendingSlashes { keys, kind } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("keys"), - keys as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("kind"), - kind as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for PendingSlashes { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PendingSlashes { keys, kind } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("keys"), - keys as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("kind"), - kind as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PendingSlashes { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "PendingSlashes", - "keys", - &self.keys, - "kind", - &&self.kind, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum SlashingOffenceKind { - #[codec(index = 0)] - ForInvalid, - #[codec(index = 1)] - AgainstValid, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SlashingOffenceKind { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `SlashingOffenceKind`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(SlashingOffenceKind::ForInvalid) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - SlashingOffenceKind::AgainstValid, - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `SlashingOffenceKind`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SlashingOffenceKind { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - SlashingOffenceKind::ForInvalid => 0_usize, - SlashingOffenceKind::AgainstValid => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - SlashingOffenceKind::ForInvalid => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - SlashingOffenceKind::AgainstValid => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SlashingOffenceKind {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SlashingOffenceKind { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SlashingOffenceKind; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "ForInvalid" { - return Ok(SlashingOffenceKind::ForInvalid); - } - if value.name() == "AgainstValid" { - return Ok(SlashingOffenceKind::AgainstValid); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["ForInvalid", "AgainstValid"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SlashingOffenceKind { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::ForInvalid => { - ::subxt::ext::scale_encode::Variant { - name: "ForInvalid", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AgainstValid => { - ::subxt::ext::scale_encode::Variant { - name: "AgainstValid", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SlashingOffenceKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - SlashingOffenceKind::ForInvalid => "ForInvalid", - SlashingOffenceKind::AgainstValid => "AgainstValid", - }, - ) - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum DisputeLocation { - #[codec(index = 0)] - Local, - #[codec(index = 1)] - Remote, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DisputeLocation { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `DisputeLocation`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DisputeLocation::Local) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DisputeLocation::Remote) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `DisputeLocation`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DisputeLocation { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - DisputeLocation::Local => 0_usize, - DisputeLocation::Remote => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - DisputeLocation::Local => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - DisputeLocation::Remote => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DisputeLocation {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for DisputeLocation { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DisputeLocation; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Local" { - return Ok(DisputeLocation::Local); - } - if value.name() == "Remote" { - return Ok(DisputeLocation::Remote); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Local", "Remote"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DisputeLocation { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Local => { - ::subxt::ext::scale_encode::Variant { - name: "Local", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Remote => { - ::subxt::ext::scale_encode::Variant { - name: "Remote", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DisputeLocation { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - DisputeLocation::Local => "Local", - DisputeLocation::Remote => "Remote", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum DisputeResult { - #[codec(index = 0)] - Valid, - #[codec(index = 1)] - Invalid, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DisputeResult { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `DisputeResult`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DisputeResult::Valid) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DisputeResult::Invalid) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `DisputeResult`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DisputeResult { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - DisputeResult::Valid => 0_usize, - DisputeResult::Invalid => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - DisputeResult::Valid => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - DisputeResult::Invalid => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DisputeResult {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for DisputeResult { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DisputeResult; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Valid" { - return Ok(DisputeResult::Valid); - } - if value.name() == "Invalid" { - return Ok(DisputeResult::Invalid); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Valid", "Invalid"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DisputeResult { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Valid => { - ::subxt::ext::scale_encode::Variant { - name: "Valid", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Invalid => { - ::subxt::ext::scale_encode::Variant { - name: "Invalid", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DisputeResult { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - DisputeResult::Valid => "Valid", - DisputeResult::Invalid => "Invalid", - }, - ) - } - } - } - pub mod hrmp { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - 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)] - hrmp_accept_open_channel { - sender: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 2)] - hrmp_close_channel { - channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, - }, - #[codec(index = 3)] - force_clean_hrmp { - para: runtime_types::polkadot_parachain::primitives::Id, - inbound: ::core::primitive::u32, - outbound: ::core::primitive::u32, - }, - #[codec(index = 4)] - force_process_hrmp_open { channels: ::core::primitive::u32 }, - #[codec(index = 5)] - force_process_hrmp_close { - channels: ::core::primitive::u32, - }, - #[codec(index = 6)] - hrmp_cancel_open_request { - channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, - open_requests: ::core::primitive::u32, - }, - #[codec(index = 7)] - 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, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::hrmp_init_open_channel { - recipient: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::hrmp_init_open_channel::recipient`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposed_max_capacity: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::hrmp_init_open_channel::proposed_max_capacity`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proposed_max_message_size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::hrmp_init_open_channel::proposed_max_message_size`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::hrmp_accept_open_channel { - sender: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::hrmp_accept_open_channel::sender`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::hrmp_close_channel { - channel_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::hrmp_close_channel::channel_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_clean_hrmp { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_clean_hrmp::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - inbound: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::force_clean_hrmp::inbound`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - outbound: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_clean_hrmp::outbound`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_process_hrmp_open { - channels: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_process_hrmp_open::channels`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_process_hrmp_close { - channels: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_process_hrmp_close::channels`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::hrmp_cancel_open_request { - channel_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::hrmp_cancel_open_request::channel_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - open_requests: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::hrmp_cancel_open_request::open_requests`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_open_hrmp_channel { - sender: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_open_hrmp_channel::sender`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - recipient: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_open_hrmp_channel::recipient`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_capacity: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_open_hrmp_channel::max_capacity`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_message_size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_open_hrmp_channel::max_message_size`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::hrmp_init_open_channel { - ref recipient, - ref proposed_max_capacity, - ref proposed_max_message_size, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(recipient), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - proposed_max_capacity, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - proposed_max_message_size, - ), - ) - } - Call::hrmp_accept_open_channel { ref sender } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(sender), - ) - } - Call::hrmp_close_channel { ref channel_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(channel_id), - ) - } - Call::force_clean_hrmp { - ref para, - ref inbound, - ref outbound, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(inbound), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(outbound), - ) - } - Call::force_process_hrmp_open { ref channels } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(channels), - ) - } - Call::force_process_hrmp_close { ref channels } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(channels), - ) - } - Call::hrmp_cancel_open_request { - ref channel_id, - ref open_requests, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(channel_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(open_requests), - ) - } - Call::force_open_hrmp_channel { - ref sender, - ref recipient, - ref max_capacity, - ref max_message_size, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(sender), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(recipient), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(max_capacity), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(max_message_size), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::hrmp_init_open_channel { - ref recipient, - ref proposed_max_capacity, - ref proposed_max_message_size, - } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - recipient, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proposed_max_capacity, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - proposed_max_message_size, - __codec_dest_edqy, - ); - } - Call::hrmp_accept_open_channel { ref sender } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - sender, - __codec_dest_edqy, - ); - } - Call::hrmp_close_channel { ref channel_id } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - channel_id, - __codec_dest_edqy, - ); - } - Call::force_clean_hrmp { - ref para, - ref inbound, - ref outbound, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - inbound, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - outbound, - __codec_dest_edqy, - ); - } - Call::force_process_hrmp_open { ref channels } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - channels, - __codec_dest_edqy, - ); - } - Call::force_process_hrmp_close { ref channels } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - channels, - __codec_dest_edqy, - ); - } - Call::hrmp_cancel_open_request { - ref channel_id, - ref open_requests, - } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - channel_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - open_requests, - __codec_dest_edqy, - ); - } - Call::force_open_hrmp_channel { - ref sender, - ref recipient, - ref max_capacity, - ref max_message_size, - } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - sender, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - recipient, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - max_capacity, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - max_message_size, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "hrmp_init_open_channel" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::hrmp_init_open_channel { - recipient: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - proposed_max_capacity: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposed_max_capacity"))? - }, - proposed_max_message_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("proposed_max_message_size"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::hrmp_init_open_channel { - recipient: { - let val = *vals - .get(&Some("recipient")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "recipient".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - proposed_max_capacity: { - let val = *vals - .get(&Some("proposed_max_capacity")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposed_max_capacity".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposed_max_capacity"))? - }, - proposed_max_message_size: { - let val = *vals - .get(&Some("proposed_max_message_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proposed_max_message_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("proposed_max_message_size"))? - }, - }) - }; - } - if value.name() == "hrmp_accept_open_channel" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::hrmp_accept_open_channel { - sender: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::hrmp_accept_open_channel { - sender: { - let val = *vals - .get(&Some("sender")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sender".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - }) - }; - } - if value.name() == "hrmp_close_channel" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::hrmp_close_channel { - channel_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("channel_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::hrmp_close_channel { - channel_id: { - let val = *vals - .get(&Some("channel_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "channel_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("channel_id"))? - }, - }) - }; - } - if value.name() == "force_clean_hrmp" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::force_clean_hrmp { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - inbound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("inbound"))? - }, - outbound: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("outbound"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_clean_hrmp { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - inbound: { - let val = *vals - .get(&Some("inbound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "inbound".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("inbound"))? - }, - outbound: { - let val = *vals - .get(&Some("outbound")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "outbound".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("outbound"))? - }, - }) - }; - } - if value.name() == "force_process_hrmp_open" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::force_process_hrmp_open { - channels: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("channels"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_process_hrmp_open { - channels: { - let val = *vals - .get(&Some("channels")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "channels".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("channels"))? - }, - }) - }; - } - if value.name() == "force_process_hrmp_close" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::force_process_hrmp_close { - channels: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("channels"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_process_hrmp_close { - channels: { - let val = *vals - .get(&Some("channels")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "channels".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("channels"))? - }, - }) - }; - } - if value.name() == "hrmp_cancel_open_request" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::hrmp_cancel_open_request { - channel_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("channel_id"))? - }, - open_requests: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("open_requests"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::hrmp_cancel_open_request { - channel_id: { - let val = *vals - .get(&Some("channel_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "channel_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("channel_id"))? - }, - open_requests: { - let val = *vals - .get(&Some("open_requests")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "open_requests".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("open_requests"))? - }, - }) - }; - } - if value.name() == "force_open_hrmp_channel" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Call::force_open_hrmp_channel { - sender: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - recipient: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - max_capacity: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_capacity"))? - }, - max_message_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_message_size"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_open_hrmp_channel { - sender: { - let val = *vals - .get(&Some("sender")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sender".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - recipient: { - let val = *vals - .get(&Some("recipient")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "recipient".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - max_capacity: { - let val = *vals - .get(&Some("max_capacity")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_capacity".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_capacity"))? - }, - max_message_size: { - let val = *vals - .get(&Some("max_message_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_message_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_message_size"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "hrmp_init_open_channel", - "hrmp_accept_open_channel", - "hrmp_close_channel", - "force_clean_hrmp", - "force_process_hrmp_open", - "force_process_hrmp_close", - "hrmp_cancel_open_request", - "force_open_hrmp_channel", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::hrmp_init_open_channel { - recipient, - proposed_max_capacity, - proposed_max_message_size, - } => { - ::subxt::ext::scale_encode::Variant { - name: "hrmp_init_open_channel", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposed_max_capacity"), - proposed_max_capacity - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proposed_max_message_size"), - proposed_max_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::hrmp_accept_open_channel { sender } => { - ::subxt::ext::scale_encode::Variant { - name: "hrmp_accept_open_channel", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::hrmp_close_channel { channel_id } => { - ::subxt::ext::scale_encode::Variant { - name: "hrmp_close_channel", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("channel_id"), - channel_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_clean_hrmp { para, inbound, outbound } => { - ::subxt::ext::scale_encode::Variant { - name: "force_clean_hrmp", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("inbound"), - inbound as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("outbound"), - outbound as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_process_hrmp_open { channels } => { - ::subxt::ext::scale_encode::Variant { - name: "force_process_hrmp_open", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("channels"), - channels as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_process_hrmp_close { channels } => { - ::subxt::ext::scale_encode::Variant { - name: "force_process_hrmp_close", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("channels"), - channels as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::hrmp_cancel_open_request { - channel_id, - open_requests, - } => { - ::subxt::ext::scale_encode::Variant { - name: "hrmp_cancel_open_request", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("channel_id"), - channel_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("open_requests"), - open_requests - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_open_hrmp_channel { - sender, - recipient, - max_capacity, - max_message_size, - } => { - ::subxt::ext::scale_encode::Variant { - name: "force_open_hrmp_channel", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_capacity"), - max_capacity - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_message_size"), - max_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::hrmp_init_open_channel { - recipient: __self_0, - proposed_max_capacity: __self_1, - proposed_max_message_size: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "hrmp_init_open_channel", - "recipient", - __self_0, - "proposed_max_capacity", - __self_1, - "proposed_max_message_size", - &__self_2, - ) - } - Call::hrmp_accept_open_channel { sender: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "hrmp_accept_open_channel", - "sender", - &__self_0, - ) - } - Call::hrmp_close_channel { channel_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "hrmp_close_channel", - "channel_id", - &__self_0, - ) - } - Call::force_clean_hrmp { - para: __self_0, - inbound: __self_1, - outbound: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "force_clean_hrmp", - "para", - __self_0, - "inbound", - __self_1, - "outbound", - &__self_2, - ) - } - Call::force_process_hrmp_open { channels: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "force_process_hrmp_open", - "channels", - &__self_0, - ) - } - Call::force_process_hrmp_close { channels: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "force_process_hrmp_close", - "channels", - &__self_0, - ) - } - Call::hrmp_cancel_open_request { - channel_id: __self_0, - open_requests: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "hrmp_cancel_open_request", - "channel_id", - __self_0, - "open_requests", - &__self_1, - ) - } - Call::force_open_hrmp_channel { - sender: __self_0, - recipient: __self_1, - max_capacity: __self_2, - max_message_size: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "force_open_hrmp_channel", - "sender", - __self_0, - "recipient", - __self_1, - "max_capacity", - __self_2, - "max_message_size", - &__self_3, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - OpenHrmpChannelToSelf, - #[codec(index = 1)] - OpenHrmpChannelInvalidRecipient, - #[codec(index = 2)] - OpenHrmpChannelZeroCapacity, - #[codec(index = 3)] - OpenHrmpChannelCapacityExceedsLimit, - #[codec(index = 4)] - OpenHrmpChannelZeroMessageSize, - #[codec(index = 5)] - OpenHrmpChannelMessageSizeExceedsLimit, - #[codec(index = 6)] - OpenHrmpChannelAlreadyExists, - #[codec(index = 7)] - OpenHrmpChannelAlreadyRequested, - #[codec(index = 8)] - OpenHrmpChannelLimitExceeded, - #[codec(index = 9)] - AcceptHrmpChannelDoesntExist, - #[codec(index = 10)] - AcceptHrmpChannelAlreadyConfirmed, - #[codec(index = 11)] - AcceptHrmpChannelLimitExceeded, - #[codec(index = 12)] - CloseHrmpChannelUnauthorized, - #[codec(index = 13)] - CloseHrmpChannelDoesntExist, - #[codec(index = 14)] - CloseHrmpChannelAlreadyUnderway, - #[codec(index = 15)] - CancelHrmpOpenChannelUnauthorized, - #[codec(index = 16)] - OpenHrmpChannelDoesntExist, - #[codec(index = 17)] - OpenHrmpChannelAlreadyConfirmed, - #[codec(index = 18)] - WrongWitness, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::OpenHrmpChannelToSelf) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::OpenHrmpChannelInvalidRecipient, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::OpenHrmpChannelZeroCapacity, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::OpenHrmpChannelCapacityExceedsLimit, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::OpenHrmpChannelZeroMessageSize, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::OpenHrmpChannelMessageSizeExceedsLimit, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::OpenHrmpChannelAlreadyExists, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::OpenHrmpChannelAlreadyRequested, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::OpenHrmpChannelLimitExceeded, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::AcceptHrmpChannelDoesntExist, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::AcceptHrmpChannelAlreadyConfirmed, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::AcceptHrmpChannelLimitExceeded, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::CloseHrmpChannelUnauthorized, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::CloseHrmpChannelDoesntExist, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::CloseHrmpChannelAlreadyUnderway, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::CancelHrmpOpenChannelUnauthorized, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::OpenHrmpChannelDoesntExist, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::OpenHrmpChannelAlreadyConfirmed, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::WrongWitness) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::OpenHrmpChannelToSelf => 0_usize, - Error::OpenHrmpChannelInvalidRecipient => 0_usize, - Error::OpenHrmpChannelZeroCapacity => 0_usize, - Error::OpenHrmpChannelCapacityExceedsLimit => 0_usize, - Error::OpenHrmpChannelZeroMessageSize => 0_usize, - Error::OpenHrmpChannelMessageSizeExceedsLimit => 0_usize, - Error::OpenHrmpChannelAlreadyExists => 0_usize, - Error::OpenHrmpChannelAlreadyRequested => 0_usize, - Error::OpenHrmpChannelLimitExceeded => 0_usize, - Error::AcceptHrmpChannelDoesntExist => 0_usize, - Error::AcceptHrmpChannelAlreadyConfirmed => 0_usize, - Error::AcceptHrmpChannelLimitExceeded => 0_usize, - Error::CloseHrmpChannelUnauthorized => 0_usize, - Error::CloseHrmpChannelDoesntExist => 0_usize, - Error::CloseHrmpChannelAlreadyUnderway => 0_usize, - Error::CancelHrmpOpenChannelUnauthorized => 0_usize, - Error::OpenHrmpChannelDoesntExist => 0_usize, - Error::OpenHrmpChannelAlreadyConfirmed => 0_usize, - Error::WrongWitness => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::OpenHrmpChannelToSelf => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::OpenHrmpChannelInvalidRecipient => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::OpenHrmpChannelZeroCapacity => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::OpenHrmpChannelCapacityExceedsLimit => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::OpenHrmpChannelZeroMessageSize => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::OpenHrmpChannelMessageSizeExceedsLimit => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::OpenHrmpChannelAlreadyExists => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::OpenHrmpChannelAlreadyRequested => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::OpenHrmpChannelLimitExceeded => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::AcceptHrmpChannelDoesntExist => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::AcceptHrmpChannelAlreadyConfirmed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Error::AcceptHrmpChannelLimitExceeded => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - Error::CloseHrmpChannelUnauthorized => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - Error::CloseHrmpChannelDoesntExist => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - } - Error::CloseHrmpChannelAlreadyUnderway => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - } - Error::CancelHrmpOpenChannelUnauthorized => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - } - Error::OpenHrmpChannelDoesntExist => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - } - Error::OpenHrmpChannelAlreadyConfirmed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - } - Error::WrongWitness => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "OpenHrmpChannelToSelf" { - return Ok(Error::OpenHrmpChannelToSelf); - } - if value.name() == "OpenHrmpChannelInvalidRecipient" { - return Ok(Error::OpenHrmpChannelInvalidRecipient); - } - if value.name() == "OpenHrmpChannelZeroCapacity" { - return Ok(Error::OpenHrmpChannelZeroCapacity); - } - if value.name() == "OpenHrmpChannelCapacityExceedsLimit" { - return Ok(Error::OpenHrmpChannelCapacityExceedsLimit); - } - if value.name() == "OpenHrmpChannelZeroMessageSize" { - return Ok(Error::OpenHrmpChannelZeroMessageSize); - } - if value.name() == "OpenHrmpChannelMessageSizeExceedsLimit" - { - return Ok(Error::OpenHrmpChannelMessageSizeExceedsLimit); - } - if value.name() == "OpenHrmpChannelAlreadyExists" { - return Ok(Error::OpenHrmpChannelAlreadyExists); - } - if value.name() == "OpenHrmpChannelAlreadyRequested" { - return Ok(Error::OpenHrmpChannelAlreadyRequested); - } - if value.name() == "OpenHrmpChannelLimitExceeded" { - return Ok(Error::OpenHrmpChannelLimitExceeded); - } - if value.name() == "AcceptHrmpChannelDoesntExist" { - return Ok(Error::AcceptHrmpChannelDoesntExist); - } - if value.name() == "AcceptHrmpChannelAlreadyConfirmed" { - return Ok(Error::AcceptHrmpChannelAlreadyConfirmed); - } - if value.name() == "AcceptHrmpChannelLimitExceeded" { - return Ok(Error::AcceptHrmpChannelLimitExceeded); - } - if value.name() == "CloseHrmpChannelUnauthorized" { - return Ok(Error::CloseHrmpChannelUnauthorized); - } - if value.name() == "CloseHrmpChannelDoesntExist" { - return Ok(Error::CloseHrmpChannelDoesntExist); - } - if value.name() == "CloseHrmpChannelAlreadyUnderway" { - return Ok(Error::CloseHrmpChannelAlreadyUnderway); - } - if value.name() == "CancelHrmpOpenChannelUnauthorized" { - return Ok(Error::CancelHrmpOpenChannelUnauthorized); - } - if value.name() == "OpenHrmpChannelDoesntExist" { - return Ok(Error::OpenHrmpChannelDoesntExist); - } - if value.name() == "OpenHrmpChannelAlreadyConfirmed" { - return Ok(Error::OpenHrmpChannelAlreadyConfirmed); - } - if value.name() == "WrongWitness" { - return Ok(Error::WrongWitness); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "OpenHrmpChannelToSelf", - "OpenHrmpChannelInvalidRecipient", - "OpenHrmpChannelZeroCapacity", - "OpenHrmpChannelCapacityExceedsLimit", - "OpenHrmpChannelZeroMessageSize", - "OpenHrmpChannelMessageSizeExceedsLimit", - "OpenHrmpChannelAlreadyExists", - "OpenHrmpChannelAlreadyRequested", - "OpenHrmpChannelLimitExceeded", - "AcceptHrmpChannelDoesntExist", - "AcceptHrmpChannelAlreadyConfirmed", - "AcceptHrmpChannelLimitExceeded", - "CloseHrmpChannelUnauthorized", - "CloseHrmpChannelDoesntExist", - "CloseHrmpChannelAlreadyUnderway", - "CancelHrmpOpenChannelUnauthorized", - "OpenHrmpChannelDoesntExist", - "OpenHrmpChannelAlreadyConfirmed", - "WrongWitness", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::OpenHrmpChannelToSelf => { - ::subxt::ext::scale_encode::Variant { - name: "OpenHrmpChannelToSelf", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OpenHrmpChannelInvalidRecipient => { - ::subxt::ext::scale_encode::Variant { - name: "OpenHrmpChannelInvalidRecipient", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OpenHrmpChannelZeroCapacity => { - ::subxt::ext::scale_encode::Variant { - name: "OpenHrmpChannelZeroCapacity", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OpenHrmpChannelCapacityExceedsLimit => { - ::subxt::ext::scale_encode::Variant { - name: "OpenHrmpChannelCapacityExceedsLimit", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OpenHrmpChannelZeroMessageSize => { - ::subxt::ext::scale_encode::Variant { - name: "OpenHrmpChannelZeroMessageSize", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OpenHrmpChannelMessageSizeExceedsLimit => { - ::subxt::ext::scale_encode::Variant { - name: "OpenHrmpChannelMessageSizeExceedsLimit", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OpenHrmpChannelAlreadyExists => { - ::subxt::ext::scale_encode::Variant { - name: "OpenHrmpChannelAlreadyExists", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OpenHrmpChannelAlreadyRequested => { - ::subxt::ext::scale_encode::Variant { - name: "OpenHrmpChannelAlreadyRequested", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OpenHrmpChannelLimitExceeded => { - ::subxt::ext::scale_encode::Variant { - name: "OpenHrmpChannelLimitExceeded", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AcceptHrmpChannelDoesntExist => { - ::subxt::ext::scale_encode::Variant { - name: "AcceptHrmpChannelDoesntExist", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AcceptHrmpChannelAlreadyConfirmed => { - ::subxt::ext::scale_encode::Variant { - name: "AcceptHrmpChannelAlreadyConfirmed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AcceptHrmpChannelLimitExceeded => { - ::subxt::ext::scale_encode::Variant { - name: "AcceptHrmpChannelLimitExceeded", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CloseHrmpChannelUnauthorized => { - ::subxt::ext::scale_encode::Variant { - name: "CloseHrmpChannelUnauthorized", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CloseHrmpChannelDoesntExist => { - ::subxt::ext::scale_encode::Variant { - name: "CloseHrmpChannelDoesntExist", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CloseHrmpChannelAlreadyUnderway => { - ::subxt::ext::scale_encode::Variant { - name: "CloseHrmpChannelAlreadyUnderway", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CancelHrmpOpenChannelUnauthorized => { - ::subxt::ext::scale_encode::Variant { - name: "CancelHrmpOpenChannelUnauthorized", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OpenHrmpChannelDoesntExist => { - ::subxt::ext::scale_encode::Variant { - name: "OpenHrmpChannelDoesntExist", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OpenHrmpChannelAlreadyConfirmed => { - ::subxt::ext::scale_encode::Variant { - name: "OpenHrmpChannelAlreadyConfirmed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WrongWitness => { - ::subxt::ext::scale_encode::Variant { - name: "WrongWitness", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::OpenHrmpChannelToSelf => "OpenHrmpChannelToSelf", - Error::OpenHrmpChannelInvalidRecipient => { - "OpenHrmpChannelInvalidRecipient" - } - Error::OpenHrmpChannelZeroCapacity => { - "OpenHrmpChannelZeroCapacity" - } - Error::OpenHrmpChannelCapacityExceedsLimit => { - "OpenHrmpChannelCapacityExceedsLimit" - } - Error::OpenHrmpChannelZeroMessageSize => { - "OpenHrmpChannelZeroMessageSize" - } - Error::OpenHrmpChannelMessageSizeExceedsLimit => { - "OpenHrmpChannelMessageSizeExceedsLimit" - } - Error::OpenHrmpChannelAlreadyExists => { - "OpenHrmpChannelAlreadyExists" - } - Error::OpenHrmpChannelAlreadyRequested => { - "OpenHrmpChannelAlreadyRequested" - } - Error::OpenHrmpChannelLimitExceeded => { - "OpenHrmpChannelLimitExceeded" - } - Error::AcceptHrmpChannelDoesntExist => { - "AcceptHrmpChannelDoesntExist" - } - Error::AcceptHrmpChannelAlreadyConfirmed => { - "AcceptHrmpChannelAlreadyConfirmed" - } - Error::AcceptHrmpChannelLimitExceeded => { - "AcceptHrmpChannelLimitExceeded" - } - Error::CloseHrmpChannelUnauthorized => { - "CloseHrmpChannelUnauthorized" - } - Error::CloseHrmpChannelDoesntExist => { - "CloseHrmpChannelDoesntExist" - } - Error::CloseHrmpChannelAlreadyUnderway => { - "CloseHrmpChannelAlreadyUnderway" - } - Error::CancelHrmpOpenChannelUnauthorized => { - "CancelHrmpOpenChannelUnauthorized" - } - Error::OpenHrmpChannelDoesntExist => { - "OpenHrmpChannelDoesntExist" - } - Error::OpenHrmpChannelAlreadyConfirmed => { - "OpenHrmpChannelAlreadyConfirmed" - } - Error::WrongWitness => "WrongWitness", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - OpenChannelRequested( - runtime_types::polkadot_parachain::primitives::Id, - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - ::core::primitive::u32, - ), - #[codec(index = 1)] - OpenChannelCanceled( - runtime_types::polkadot_parachain::primitives::Id, - runtime_types::polkadot_parachain::primitives::HrmpChannelId, - ), - #[codec(index = 2)] - OpenChannelAccepted( - runtime_types::polkadot_parachain::primitives::Id, - runtime_types::polkadot_parachain::primitives::Id, - ), - #[codec(index = 3)] - ChannelClosed( - runtime_types::polkadot_parachain::primitives::Id, - runtime_types::polkadot_parachain::primitives::HrmpChannelId, - ), - #[codec(index = 4)] - HrmpChannelForceOpened( - runtime_types::polkadot_parachain::primitives::Id, - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - ::core::primitive::u32, - ), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::OpenChannelRequested( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::OpenChannelRequested.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::OpenChannelRequested.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::OpenChannelRequested.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::OpenChannelRequested.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::OpenChannelCanceled( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::OpenChannelCanceled.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::OpenChannelCanceled.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::OpenChannelAccepted( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::OpenChannelAccepted.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::OpenChannelAccepted.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::ChannelClosed( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ChannelClosed.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ChannelClosed.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::HrmpChannelForceOpened( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::HrmpChannelForceOpened.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::HrmpChannelForceOpened.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::HrmpChannelForceOpened.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Event::HrmpChannelForceOpened.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::OpenChannelRequested( - ref aa, - ref ba, - ref ca, - ref da, - ) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(da)) - } - Event::OpenChannelCanceled(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::OpenChannelAccepted(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::ChannelClosed(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::HrmpChannelForceOpened( - ref aa, - ref ba, - ref ca, - ref da, - ) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(da)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::OpenChannelRequested( - ref aa, - ref ba, - ref ca, - ref da, - ) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - da, - __codec_dest_edqy, - ); - } - Event::OpenChannelCanceled(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::OpenChannelAccepted(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::ChannelClosed(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::HrmpChannelForceOpened( - ref aa, - ref ba, - ref ca, - ref da, - ) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - da, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "OpenChannelRequested" { - let fields = value.fields(); - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - return Ok( - Event::OpenChannelRequested( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - ), - ); - } - if value.name() == "OpenChannelCanceled" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::OpenChannelCanceled( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "OpenChannelAccepted" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::OpenChannelAccepted( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "ChannelClosed" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::ChannelClosed( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "HrmpChannelForceOpened" { - let fields = value.fields(); - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - return Ok( - Event::HrmpChannelForceOpened( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - ), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "OpenChannelRequested", - "OpenChannelCanceled", - "OpenChannelAccepted", - "ChannelClosed", - "HrmpChannelForceOpened", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::OpenChannelRequested(_0, _1, _2, _3) => { - ::subxt::ext::scale_encode::Variant { - name: "OpenChannelRequested", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OpenChannelCanceled(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "OpenChannelCanceled", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OpenChannelAccepted(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "OpenChannelAccepted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ChannelClosed(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "ChannelClosed", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HrmpChannelForceOpened(_0, _1, _2, _3) => { - ::subxt::ext::scale_encode::Variant { - name: "HrmpChannelForceOpened", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::OpenChannelRequested( - __self_0, - __self_1, - __self_2, - __self_3, - ) => { - ::core::fmt::Formatter::debug_tuple_field4_finish( - f, - "OpenChannelRequested", - __self_0, - __self_1, - __self_2, - &__self_3, - ) - } - Event::OpenChannelCanceled(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "OpenChannelCanceled", - __self_0, - &__self_1, - ) - } - Event::OpenChannelAccepted(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "OpenChannelAccepted", - __self_0, - &__self_1, - ) - } - Event::ChannelClosed(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "ChannelClosed", - __self_0, - &__self_1, - ) - } - Event::HrmpChannelForceOpened( - __self_0, - __self_1, - __self_2, - __self_3, - ) => { - ::core::fmt::Formatter::debug_tuple_field4_finish( - f, - "HrmpChannelForceOpened", - __self_0, - __self_1, - __self_2, - &__self_3, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpChannel { - 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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for HrmpChannel { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(HrmpChannel { - max_capacity: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpChannel::max_capacity`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_total_size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpChannel::max_total_size`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_message_size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpChannel::max_message_size`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - msg_count: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpChannel::msg_count`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - total_size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpChannel::total_size`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - mqc_head: { - let __codec_res_edqy = <::core::option::Option< - ::subxt::utils::H256, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpChannel::mqc_head`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - sender_deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpChannel::sender_deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - recipient_deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpChannel::recipient_deposit`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for HrmpChannel { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_capacity), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_total_size), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.max_message_size, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.msg_count), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.total_size), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.mqc_head), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.sender_deposit), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.recipient_deposit, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.max_capacity, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_total_size, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_message_size, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.msg_count, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.total_size, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.mqc_head, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.sender_deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.recipient_deposit, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for HrmpChannel {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for HrmpChannel { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = HrmpChannel; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(HrmpChannel { - max_capacity: { - let val = *vals - .get(&Some("max_capacity")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_capacity".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_capacity"))? - }, - max_total_size: { - let val = *vals - .get(&Some("max_total_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_total_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_total_size"))? - }, - max_message_size: { - let val = *vals - .get(&Some("max_message_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_message_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_message_size"))? - }, - msg_count: { - let val = *vals - .get(&Some("msg_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "msg_count".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("msg_count"))? - }, - total_size: { - let val = *vals - .get(&Some("total_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "total_size".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("total_size"))? - }, - mqc_head: { - let val = *vals - .get(&Some("mqc_head")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "mqc_head".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("mqc_head"))? - }, - sender_deposit: { - let val = *vals - .get(&Some("sender_deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sender_deposit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("sender_deposit"))? - }, - recipient_deposit: { - let val = *vals - .get(&Some("recipient_deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "recipient_deposit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("recipient_deposit"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 8usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 8usize, - }), - ); - } - let vals = value; - Ok(HrmpChannel { - max_capacity: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_capacity"))? - }, - max_total_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_total_size"))? - }, - max_message_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_message_size"))? - }, - msg_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("msg_count"))? - }, - total_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("total_size"))? - }, - mqc_head: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("mqc_head"))? - }, - sender_deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("sender_deposit"))? - }, - recipient_deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("recipient_deposit"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for HrmpChannel { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for HrmpChannel { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HrmpChannel { - max_capacity, - max_total_size, - max_message_size, - msg_count, - total_size, - mqc_head, - sender_deposit, - recipient_deposit, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("max_capacity"), - max_capacity - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_total_size"), - max_total_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_message_size"), - max_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("msg_count"), - msg_count as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("total_size"), - total_size as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("mqc_head"), - mqc_head as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("sender_deposit"), - sender_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("recipient_deposit"), - recipient_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for HrmpChannel { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HrmpChannel { - max_capacity, - max_total_size, - max_message_size, - msg_count, - total_size, - mqc_head, - sender_deposit, - recipient_deposit, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("max_capacity"), - max_capacity - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_total_size"), - max_total_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_message_size"), - max_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("msg_count"), - msg_count as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("total_size"), - total_size as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("mqc_head"), - mqc_head as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("sender_deposit"), - sender_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("recipient_deposit"), - recipient_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for HrmpChannel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "max_capacity", - "max_total_size", - "max_message_size", - "msg_count", - "total_size", - "mqc_head", - "sender_deposit", - "recipient_deposit", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.max_capacity, - &self.max_total_size, - &self.max_message_size, - &self.msg_count, - &self.total_size, - &self.mqc_head, - &self.sender_deposit, - &&self.recipient_deposit, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "HrmpChannel", - names, - values, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpOpenChannelRequest { - 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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for HrmpOpenChannelRequest { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(HrmpOpenChannelRequest { - confirmed: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HrmpOpenChannelRequest::confirmed`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - _age: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `HrmpOpenChannelRequest::_age`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - sender_deposit: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HrmpOpenChannelRequest::sender_deposit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_message_size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HrmpOpenChannelRequest::max_message_size`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_capacity: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HrmpOpenChannelRequest::max_capacity`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_total_size: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `HrmpOpenChannelRequest::max_total_size`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for HrmpOpenChannelRequest { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.confirmed), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self._age), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.sender_deposit), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.max_message_size, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_capacity), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_total_size), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.confirmed, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self._age, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.sender_deposit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_message_size, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_capacity, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.max_total_size, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for HrmpOpenChannelRequest {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for HrmpOpenChannelRequest { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = HrmpOpenChannelRequest; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(HrmpOpenChannelRequest { - confirmed: { - let val = *vals - .get(&Some("confirmed")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "confirmed".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("confirmed"))? - }, - _age: { - let val = *vals - .get(&Some("_age")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "_age".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("_age"))? - }, - sender_deposit: { - let val = *vals - .get(&Some("sender_deposit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sender_deposit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("sender_deposit"))? - }, - max_message_size: { - let val = *vals - .get(&Some("max_message_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_message_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_message_size"))? - }, - max_capacity: { - let val = *vals - .get(&Some("max_capacity")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_capacity".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_capacity"))? - }, - max_total_size: { - let val = *vals - .get(&Some("max_total_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_total_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_total_size"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = value; - Ok(HrmpOpenChannelRequest { - confirmed: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("confirmed"))? - }, - _age: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("_age"))? - }, - sender_deposit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("sender_deposit"))? - }, - max_message_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_message_size"))? - }, - max_capacity: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_capacity"))? - }, - max_total_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_total_size"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for HrmpOpenChannelRequest { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for HrmpOpenChannelRequest { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HrmpOpenChannelRequest { - confirmed, - _age, - sender_deposit, - max_message_size, - max_capacity, - max_total_size, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("confirmed"), - confirmed as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("_age"), - _age as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("sender_deposit"), - sender_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_message_size"), - max_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_capacity"), - max_capacity - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_total_size"), - max_total_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for HrmpOpenChannelRequest { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let HrmpOpenChannelRequest { - confirmed, - _age, - sender_deposit, - max_message_size, - max_capacity, - max_total_size, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("confirmed"), - confirmed as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("_age"), - _age as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("sender_deposit"), - sender_deposit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_message_size"), - max_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_capacity"), - max_capacity - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_total_size"), - max_total_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for HrmpOpenChannelRequest { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "confirmed", - "_age", - "sender_deposit", - "max_message_size", - "max_capacity", - "max_total_size", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.confirmed, - &self._age, - &self.sender_deposit, - &self.max_message_size, - &self.max_capacity, - &&self.max_total_size, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "HrmpOpenChannelRequest", - names, - values, - ) - } - } - } - pub mod inclusion { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call {} - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call {} - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: ::alloc::vec::Vec::new(), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - unsafe { ::core::intrinsics::unreachable() } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - UnsortedOrDuplicateValidatorIndices, - #[codec(index = 1)] - UnsortedOrDuplicateDisputeStatementSet, - #[codec(index = 2)] - UnsortedOrDuplicateBackedCandidates, - #[codec(index = 3)] - UnexpectedRelayParent, - #[codec(index = 4)] - WrongBitfieldSize, - #[codec(index = 5)] - BitfieldAllZeros, - #[codec(index = 6)] - BitfieldDuplicateOrUnordered, - #[codec(index = 7)] - ValidatorIndexOutOfBounds, - #[codec(index = 8)] - InvalidBitfieldSignature, - #[codec(index = 9)] - UnscheduledCandidate, - #[codec(index = 10)] - CandidateScheduledBeforeParaFree, - #[codec(index = 11)] - WrongCollator, - #[codec(index = 12)] - ScheduledOutOfOrder, - #[codec(index = 13)] - HeadDataTooLarge, - #[codec(index = 14)] - PrematureCodeUpgrade, - #[codec(index = 15)] - NewCodeTooLarge, - #[codec(index = 16)] - CandidateNotInParentContext, - #[codec(index = 17)] - InvalidGroupIndex, - #[codec(index = 18)] - InsufficientBacking, - #[codec(index = 19)] - InvalidBacking, - #[codec(index = 20)] - NotCollatorSigned, - #[codec(index = 21)] - ValidationDataHashMismatch, - #[codec(index = 22)] - IncorrectDownwardMessageHandling, - #[codec(index = 23)] - InvalidUpwardMessages, - #[codec(index = 24)] - HrmpWatermarkMishandling, - #[codec(index = 25)] - InvalidOutboundHrmp, - #[codec(index = 26)] - InvalidValidationCodeHash, - #[codec(index = 27)] - ParaHeadMismatch, - #[codec(index = 28)] - BitfieldReferencesFreedCore, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::UnsortedOrDuplicateValidatorIndices, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::UnsortedOrDuplicateDisputeStatementSet, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::UnsortedOrDuplicateBackedCandidates, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UnexpectedRelayParent) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::WrongBitfieldSize) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::BitfieldAllZeros) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::BitfieldDuplicateOrUnordered, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ValidatorIndexOutOfBounds) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidBitfieldSignature) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UnscheduledCandidate) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::CandidateScheduledBeforeParaFree, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::WrongCollator) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ScheduledOutOfOrder) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::HeadDataTooLarge) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::PrematureCodeUpgrade) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NewCodeTooLarge) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::CandidateNotInParentContext, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidGroupIndex) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InsufficientBacking) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidBacking) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotCollatorSigned) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::ValidationDataHashMismatch, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 22u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::IncorrectDownwardMessageHandling, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 23u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidUpwardMessages) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 24u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::HrmpWatermarkMishandling) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 25u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidOutboundHrmp) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 26u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidValidationCodeHash) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 27u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ParaHeadMismatch) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 28u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::BitfieldReferencesFreedCore, - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::UnsortedOrDuplicateValidatorIndices => 0_usize, - Error::UnsortedOrDuplicateDisputeStatementSet => 0_usize, - Error::UnsortedOrDuplicateBackedCandidates => 0_usize, - Error::UnexpectedRelayParent => 0_usize, - Error::WrongBitfieldSize => 0_usize, - Error::BitfieldAllZeros => 0_usize, - Error::BitfieldDuplicateOrUnordered => 0_usize, - Error::ValidatorIndexOutOfBounds => 0_usize, - Error::InvalidBitfieldSignature => 0_usize, - Error::UnscheduledCandidate => 0_usize, - Error::CandidateScheduledBeforeParaFree => 0_usize, - Error::WrongCollator => 0_usize, - Error::ScheduledOutOfOrder => 0_usize, - Error::HeadDataTooLarge => 0_usize, - Error::PrematureCodeUpgrade => 0_usize, - Error::NewCodeTooLarge => 0_usize, - Error::CandidateNotInParentContext => 0_usize, - Error::InvalidGroupIndex => 0_usize, - Error::InsufficientBacking => 0_usize, - Error::InvalidBacking => 0_usize, - Error::NotCollatorSigned => 0_usize, - Error::ValidationDataHashMismatch => 0_usize, - Error::IncorrectDownwardMessageHandling => 0_usize, - Error::InvalidUpwardMessages => 0_usize, - Error::HrmpWatermarkMishandling => 0_usize, - Error::InvalidOutboundHrmp => 0_usize, - Error::InvalidValidationCodeHash => 0_usize, - Error::ParaHeadMismatch => 0_usize, - Error::BitfieldReferencesFreedCore => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::UnsortedOrDuplicateValidatorIndices => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::UnsortedOrDuplicateDisputeStatementSet => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::UnsortedOrDuplicateBackedCandidates => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::UnexpectedRelayParent => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::WrongBitfieldSize => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::BitfieldAllZeros => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::BitfieldDuplicateOrUnordered => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::ValidatorIndexOutOfBounds => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::InvalidBitfieldSignature => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::UnscheduledCandidate => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::CandidateScheduledBeforeParaFree => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Error::WrongCollator => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - Error::ScheduledOutOfOrder => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - Error::HeadDataTooLarge => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - } - Error::PrematureCodeUpgrade => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - } - Error::NewCodeTooLarge => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - } - Error::CandidateNotInParentContext => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - } - Error::InvalidGroupIndex => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - } - Error::InsufficientBacking => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - } - Error::InvalidBacking => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - } - Error::NotCollatorSigned => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - } - Error::ValidationDataHashMismatch => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - } - Error::IncorrectDownwardMessageHandling => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(22u8 as ::core::primitive::u8); - } - Error::InvalidUpwardMessages => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(23u8 as ::core::primitive::u8); - } - Error::HrmpWatermarkMishandling => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(24u8 as ::core::primitive::u8); - } - Error::InvalidOutboundHrmp => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(25u8 as ::core::primitive::u8); - } - Error::InvalidValidationCodeHash => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(26u8 as ::core::primitive::u8); - } - Error::ParaHeadMismatch => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(27u8 as ::core::primitive::u8); - } - Error::BitfieldReferencesFreedCore => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(28u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "UnsortedOrDuplicateValidatorIndices" { - return Ok(Error::UnsortedOrDuplicateValidatorIndices); - } - if value.name() == "UnsortedOrDuplicateDisputeStatementSet" - { - return Ok(Error::UnsortedOrDuplicateDisputeStatementSet); - } - if value.name() == "UnsortedOrDuplicateBackedCandidates" { - return Ok(Error::UnsortedOrDuplicateBackedCandidates); - } - if value.name() == "UnexpectedRelayParent" { - return Ok(Error::UnexpectedRelayParent); - } - if value.name() == "WrongBitfieldSize" { - return Ok(Error::WrongBitfieldSize); - } - if value.name() == "BitfieldAllZeros" { - return Ok(Error::BitfieldAllZeros); - } - if value.name() == "BitfieldDuplicateOrUnordered" { - return Ok(Error::BitfieldDuplicateOrUnordered); - } - if value.name() == "ValidatorIndexOutOfBounds" { - return Ok(Error::ValidatorIndexOutOfBounds); - } - if value.name() == "InvalidBitfieldSignature" { - return Ok(Error::InvalidBitfieldSignature); - } - if value.name() == "UnscheduledCandidate" { - return Ok(Error::UnscheduledCandidate); - } - if value.name() == "CandidateScheduledBeforeParaFree" { - return Ok(Error::CandidateScheduledBeforeParaFree); - } - if value.name() == "WrongCollator" { - return Ok(Error::WrongCollator); - } - if value.name() == "ScheduledOutOfOrder" { - return Ok(Error::ScheduledOutOfOrder); - } - if value.name() == "HeadDataTooLarge" { - return Ok(Error::HeadDataTooLarge); - } - if value.name() == "PrematureCodeUpgrade" { - return Ok(Error::PrematureCodeUpgrade); - } - if value.name() == "NewCodeTooLarge" { - return Ok(Error::NewCodeTooLarge); - } - if value.name() == "CandidateNotInParentContext" { - return Ok(Error::CandidateNotInParentContext); - } - if value.name() == "InvalidGroupIndex" { - return Ok(Error::InvalidGroupIndex); - } - if value.name() == "InsufficientBacking" { - return Ok(Error::InsufficientBacking); - } - if value.name() == "InvalidBacking" { - return Ok(Error::InvalidBacking); - } - if value.name() == "NotCollatorSigned" { - return Ok(Error::NotCollatorSigned); - } - if value.name() == "ValidationDataHashMismatch" { - return Ok(Error::ValidationDataHashMismatch); - } - if value.name() == "IncorrectDownwardMessageHandling" { - return Ok(Error::IncorrectDownwardMessageHandling); - } - if value.name() == "InvalidUpwardMessages" { - return Ok(Error::InvalidUpwardMessages); - } - if value.name() == "HrmpWatermarkMishandling" { - return Ok(Error::HrmpWatermarkMishandling); - } - if value.name() == "InvalidOutboundHrmp" { - return Ok(Error::InvalidOutboundHrmp); - } - if value.name() == "InvalidValidationCodeHash" { - return Ok(Error::InvalidValidationCodeHash); - } - if value.name() == "ParaHeadMismatch" { - return Ok(Error::ParaHeadMismatch); - } - if value.name() == "BitfieldReferencesFreedCore" { - return Ok(Error::BitfieldReferencesFreedCore); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "UnsortedOrDuplicateValidatorIndices", - "UnsortedOrDuplicateDisputeStatementSet", - "UnsortedOrDuplicateBackedCandidates", - "UnexpectedRelayParent", - "WrongBitfieldSize", - "BitfieldAllZeros", - "BitfieldDuplicateOrUnordered", - "ValidatorIndexOutOfBounds", - "InvalidBitfieldSignature", - "UnscheduledCandidate", - "CandidateScheduledBeforeParaFree", - "WrongCollator", - "ScheduledOutOfOrder", - "HeadDataTooLarge", - "PrematureCodeUpgrade", - "NewCodeTooLarge", - "CandidateNotInParentContext", - "InvalidGroupIndex", - "InsufficientBacking", - "InvalidBacking", - "NotCollatorSigned", - "ValidationDataHashMismatch", - "IncorrectDownwardMessageHandling", - "InvalidUpwardMessages", - "HrmpWatermarkMishandling", - "InvalidOutboundHrmp", - "InvalidValidationCodeHash", - "ParaHeadMismatch", - "BitfieldReferencesFreedCore", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::UnsortedOrDuplicateValidatorIndices => { - ::subxt::ext::scale_encode::Variant { - name: "UnsortedOrDuplicateValidatorIndices", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnsortedOrDuplicateDisputeStatementSet => { - ::subxt::ext::scale_encode::Variant { - name: "UnsortedOrDuplicateDisputeStatementSet", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnsortedOrDuplicateBackedCandidates => { - ::subxt::ext::scale_encode::Variant { - name: "UnsortedOrDuplicateBackedCandidates", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnexpectedRelayParent => { - ::subxt::ext::scale_encode::Variant { - name: "UnexpectedRelayParent", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WrongBitfieldSize => { - ::subxt::ext::scale_encode::Variant { - name: "WrongBitfieldSize", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BitfieldAllZeros => { - ::subxt::ext::scale_encode::Variant { - name: "BitfieldAllZeros", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BitfieldDuplicateOrUnordered => { - ::subxt::ext::scale_encode::Variant { - name: "BitfieldDuplicateOrUnordered", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ValidatorIndexOutOfBounds => { - ::subxt::ext::scale_encode::Variant { - name: "ValidatorIndexOutOfBounds", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidBitfieldSignature => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidBitfieldSignature", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnscheduledCandidate => { - ::subxt::ext::scale_encode::Variant { - name: "UnscheduledCandidate", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CandidateScheduledBeforeParaFree => { - ::subxt::ext::scale_encode::Variant { - name: "CandidateScheduledBeforeParaFree", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WrongCollator => { - ::subxt::ext::scale_encode::Variant { - name: "WrongCollator", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ScheduledOutOfOrder => { - ::subxt::ext::scale_encode::Variant { - name: "ScheduledOutOfOrder", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HeadDataTooLarge => { - ::subxt::ext::scale_encode::Variant { - name: "HeadDataTooLarge", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PrematureCodeUpgrade => { - ::subxt::ext::scale_encode::Variant { - name: "PrematureCodeUpgrade", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NewCodeTooLarge => { - ::subxt::ext::scale_encode::Variant { - name: "NewCodeTooLarge", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CandidateNotInParentContext => { - ::subxt::ext::scale_encode::Variant { - name: "CandidateNotInParentContext", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidGroupIndex => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidGroupIndex", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InsufficientBacking => { - ::subxt::ext::scale_encode::Variant { - name: "InsufficientBacking", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidBacking => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidBacking", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotCollatorSigned => { - ::subxt::ext::scale_encode::Variant { - name: "NotCollatorSigned", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ValidationDataHashMismatch => { - ::subxt::ext::scale_encode::Variant { - name: "ValidationDataHashMismatch", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::IncorrectDownwardMessageHandling => { - ::subxt::ext::scale_encode::Variant { - name: "IncorrectDownwardMessageHandling", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidUpwardMessages => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidUpwardMessages", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HrmpWatermarkMishandling => { - ::subxt::ext::scale_encode::Variant { - name: "HrmpWatermarkMishandling", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidOutboundHrmp => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidOutboundHrmp", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidValidationCodeHash => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidValidationCodeHash", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ParaHeadMismatch => { - ::subxt::ext::scale_encode::Variant { - name: "ParaHeadMismatch", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BitfieldReferencesFreedCore => { - ::subxt::ext::scale_encode::Variant { - name: "BitfieldReferencesFreedCore", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::UnsortedOrDuplicateValidatorIndices => { - "UnsortedOrDuplicateValidatorIndices" - } - Error::UnsortedOrDuplicateDisputeStatementSet => { - "UnsortedOrDuplicateDisputeStatementSet" - } - Error::UnsortedOrDuplicateBackedCandidates => { - "UnsortedOrDuplicateBackedCandidates" - } - Error::UnexpectedRelayParent => "UnexpectedRelayParent", - Error::WrongBitfieldSize => "WrongBitfieldSize", - Error::BitfieldAllZeros => "BitfieldAllZeros", - Error::BitfieldDuplicateOrUnordered => { - "BitfieldDuplicateOrUnordered" - } - Error::ValidatorIndexOutOfBounds => { - "ValidatorIndexOutOfBounds" - } - Error::InvalidBitfieldSignature => { - "InvalidBitfieldSignature" - } - Error::UnscheduledCandidate => "UnscheduledCandidate", - Error::CandidateScheduledBeforeParaFree => { - "CandidateScheduledBeforeParaFree" - } - Error::WrongCollator => "WrongCollator", - Error::ScheduledOutOfOrder => "ScheduledOutOfOrder", - Error::HeadDataTooLarge => "HeadDataTooLarge", - Error::PrematureCodeUpgrade => "PrematureCodeUpgrade", - Error::NewCodeTooLarge => "NewCodeTooLarge", - Error::CandidateNotInParentContext => { - "CandidateNotInParentContext" - } - Error::InvalidGroupIndex => "InvalidGroupIndex", - Error::InsufficientBacking => "InsufficientBacking", - Error::InvalidBacking => "InvalidBacking", - Error::NotCollatorSigned => "NotCollatorSigned", - Error::ValidationDataHashMismatch => { - "ValidationDataHashMismatch" - } - Error::IncorrectDownwardMessageHandling => { - "IncorrectDownwardMessageHandling" - } - Error::InvalidUpwardMessages => "InvalidUpwardMessages", - Error::HrmpWatermarkMishandling => { - "HrmpWatermarkMishandling" - } - Error::InvalidOutboundHrmp => "InvalidOutboundHrmp", - Error::InvalidValidationCodeHash => { - "InvalidValidationCodeHash" - } - Error::ParaHeadMismatch => "ParaHeadMismatch", - Error::BitfieldReferencesFreedCore => { - "BitfieldReferencesFreedCore" - } - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - CandidateBacked( - runtime_types::polkadot_primitives::v4::CandidateReceipt< - ::subxt::utils::H256, - >, - runtime_types::polkadot_parachain::primitives::HeadData, - runtime_types::polkadot_primitives::v4::CoreIndex, - runtime_types::polkadot_primitives::v4::GroupIndex, - ), - #[codec(index = 1)] - CandidateIncluded( - runtime_types::polkadot_primitives::v4::CandidateReceipt< - ::subxt::utils::H256, - >, - runtime_types::polkadot_parachain::primitives::HeadData, - runtime_types::polkadot_primitives::v4::CoreIndex, - runtime_types::polkadot_primitives::v4::GroupIndex, - ), - #[codec(index = 2)] - CandidateTimedOut( - runtime_types::polkadot_primitives::v4::CandidateReceipt< - ::subxt::utils::H256, - >, - runtime_types::polkadot_parachain::primitives::HeadData, - runtime_types::polkadot_primitives::v4::CoreIndex, - ), - #[codec(index = 3)] - UpwardMessagesReceived { - from: runtime_types::polkadot_parachain::primitives::Id, - count: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::CandidateBacked( - { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::CandidateBacked.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::CandidateBacked.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::CandidateBacked.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::CandidateBacked.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::CandidateIncluded( - { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::CandidateIncluded.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::CandidateIncluded.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::CandidateIncluded.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::CandidateIncluded.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::CandidateTimedOut( - { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::CandidateTimedOut.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::CandidateTimedOut.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::CandidateTimedOut.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Event::UpwardMessagesReceived { - from: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::UpwardMessagesReceived::from`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - count: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Event::UpwardMessagesReceived::count`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::CandidateBacked(ref aa, ref ba, ref ca, ref da) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(da)) - } - Event::CandidateIncluded(ref aa, ref ba, ref ca, ref da) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(da)) - } - Event::CandidateTimedOut(ref aa, ref ba, ref ca) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - } - Event::UpwardMessagesReceived { ref from, ref count } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(from), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(count), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::CandidateBacked(ref aa, ref ba, ref ca, ref da) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - da, - __codec_dest_edqy, - ); - } - Event::CandidateIncluded( - ref aa, - ref ba, - ref ca, - ref da, - ) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - da, - __codec_dest_edqy, - ); - } - Event::CandidateTimedOut(ref aa, ref ba, ref ca) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - } - Event::UpwardMessagesReceived { ref from, ref count } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - from, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - count, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "CandidateBacked" { - let fields = value.fields(); - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - return Ok( - Event::CandidateBacked( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - ), - ); - } - if value.name() == "CandidateIncluded" { - let fields = value.fields(); - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - return Ok( - Event::CandidateIncluded( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - ), - ); - } - if value.name() == "CandidateTimedOut" { - let fields = value.fields(); - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - return Ok( - Event::CandidateTimedOut( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ); - } - if value.name() == "UpwardMessagesReceived" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Event::UpwardMessagesReceived { - from: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("count"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Event::UpwardMessagesReceived { - from: { - let val = *vals - .get(&Some("from")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "from".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("from"))? - }, - count: { - let val = *vals - .get(&Some("count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "count".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("count"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "CandidateBacked", - "CandidateIncluded", - "CandidateTimedOut", - "UpwardMessagesReceived", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::CandidateBacked(_0, _1, _2, _3) => { - ::subxt::ext::scale_encode::Variant { - name: "CandidateBacked", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CandidateIncluded(_0, _1, _2, _3) => { - ::subxt::ext::scale_encode::Variant { - name: "CandidateIncluded", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CandidateTimedOut(_0, _1, _2) => { - ::subxt::ext::scale_encode::Variant { - name: "CandidateTimedOut", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UpwardMessagesReceived { from, count } => { - ::subxt::ext::scale_encode::Variant { - name: "UpwardMessagesReceived", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("from"), - from as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("count"), - count as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::CandidateBacked( - __self_0, - __self_1, - __self_2, - __self_3, - ) => { - ::core::fmt::Formatter::debug_tuple_field4_finish( - f, - "CandidateBacked", - __self_0, - __self_1, - __self_2, - &__self_3, - ) - } - Event::CandidateIncluded( - __self_0, - __self_1, - __self_2, - __self_3, - ) => { - ::core::fmt::Formatter::debug_tuple_field4_finish( - f, - "CandidateIncluded", - __self_0, - __self_1, - __self_2, - &__self_3, - ) - } - Event::CandidateTimedOut(__self_0, __self_1, __self_2) => { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "CandidateTimedOut", - __self_0, - __self_1, - &__self_2, - ) - } - Event::UpwardMessagesReceived { - from: __self_0, - count: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "UpwardMessagesReceived", - "from", - __self_0, - "count", - &__self_1, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum AggregateMessageOrigin { - #[codec(index = 0)] - Ump( - runtime_types::polkadot_runtime_parachains::inclusion::UmpQueueId, - ), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AggregateMessageOrigin { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `AggregateMessageOrigin`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AggregateMessageOrigin::Ump({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AggregateMessageOrigin::Ump.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `AggregateMessageOrigin`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AggregateMessageOrigin { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - AggregateMessageOrigin::Ump(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - AggregateMessageOrigin::Ump(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AggregateMessageOrigin {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for AggregateMessageOrigin { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AggregateMessageOrigin; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Ump" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - AggregateMessageOrigin::Ump({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Ump"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for AggregateMessageOrigin { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Ump(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Ump", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AggregateMessageOrigin { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - AggregateMessageOrigin::Ump(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Ump", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AvailabilityBitfieldRecord<_0> { - pub bitfield: runtime_types::polkadot_primitives::v4::AvailabilityBitfield, - pub submitted_at: _0, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode - for AvailabilityBitfieldRecord<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(AvailabilityBitfieldRecord::< - _0, - > { - bitfield: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `AvailabilityBitfieldRecord::bitfield`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - submitted_at: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `AvailabilityBitfieldRecord::submitted_at`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode - for AvailabilityBitfieldRecord<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.bitfield), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.submitted_at), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.bitfield, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.submitted_at, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike - for AvailabilityBitfieldRecord<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for AvailabilityBitfieldRecord<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AvailabilityBitfieldRecord<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(AvailabilityBitfieldRecord { - bitfield: { - let val = *vals - .get(&Some("bitfield")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "bitfield".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("bitfield"))? - }, - submitted_at: { - let val = *vals - .get(&Some("submitted_at")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "submitted_at".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("submitted_at"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(AvailabilityBitfieldRecord { - bitfield: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("bitfield"))? - }, - submitted_at: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("submitted_at"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for AvailabilityBitfieldRecord<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for AvailabilityBitfieldRecord<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AvailabilityBitfieldRecord { bitfield, submitted_at } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bitfield"), - bitfield as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("submitted_at"), - submitted_at - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for AvailabilityBitfieldRecord<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let AvailabilityBitfieldRecord { bitfield, submitted_at } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("bitfield"), - bitfield as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("submitted_at"), - submitted_at - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for AvailabilityBitfieldRecord<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AvailabilityBitfieldRecord", - "bitfield", - &self.bitfield, - "submitted_at", - &&self.submitted_at, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CandidatePendingAvailability<_0, _1> { - pub core: runtime_types::polkadot_primitives::v4::CoreIndex, - pub hash: runtime_types::polkadot_core_primitives::CandidateHash, - pub descriptor: runtime_types::polkadot_primitives::v4::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 relay_parent_number: _1, - pub backed_in_number: _1, - pub backing_group: runtime_types::polkadot_primitives::v4::GroupIndex, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode - for CandidatePendingAvailability<_0, _1> - where - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Decode, - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CandidatePendingAvailability::< - _0, - _1, - > { - core: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidatePendingAvailability::core`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - hash: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidatePendingAvailability::hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - descriptor: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidatePendingAvailability::descriptor`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - availability_votes: { - let __codec_res_edqy = <::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidatePendingAvailability::availability_votes`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - backers: { - let __codec_res_edqy = <::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidatePendingAvailability::backers`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - relay_parent_number: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidatePendingAvailability::relay_parent_number`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - backed_in_number: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidatePendingAvailability::backed_in_number`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - backing_group: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `CandidatePendingAvailability::backing_group`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode - for CandidatePendingAvailability<_0, _1> - where - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.core), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.descriptor), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.availability_votes, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.backers), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.relay_parent_number, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.backed_in_number, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.backing_group), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.core, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.hash, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.descriptor, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.availability_votes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.backers, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.relay_parent_number, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.backed_in_number, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.backing_group, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for CandidatePendingAvailability<_0, _1> - where - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Encode, - runtime_types::polkadot_primitives::v4::CandidateDescriptor< - _0, - >: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>( - ::core::marker::PhantomData<(_0, _1)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for CandidatePendingAvailability<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CandidatePendingAvailability< - _0, - _1, - >; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CandidatePendingAvailability { - core: { - let val = *vals - .get(&Some("core")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "core".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("core"))? - }, - hash: { - let val = *vals - .get(&Some("hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - descriptor: { - let val = *vals - .get(&Some("descriptor")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "descriptor".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("descriptor"))? - }, - availability_votes: { - let val = *vals - .get(&Some("availability_votes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "availability_votes".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("availability_votes"))? - }, - backers: { - let val = *vals - .get(&Some("backers")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "backers".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("backers"))? - }, - relay_parent_number: { - let val = *vals - .get(&Some("relay_parent_number")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "relay_parent_number".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("relay_parent_number"))? - }, - backed_in_number: { - let val = *vals - .get(&Some("backed_in_number")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "backed_in_number".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("backed_in_number"))? - }, - backing_group: { - let val = *vals - .get(&Some("backing_group")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "backing_group".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("backing_group"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 8usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 8usize, - }), - ); - } - let vals = value; - Ok(CandidatePendingAvailability { - core: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("core"))? - }, - hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("hash"))? - }, - descriptor: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("descriptor"))? - }, - availability_votes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("availability_votes"))? - }, - backers: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("backers"))? - }, - relay_parent_number: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("relay_parent_number"))? - }, - backed_in_number: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("backed_in_number"))? - }, - backing_group: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("backing_group"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for CandidatePendingAvailability<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for CandidatePendingAvailability<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidatePendingAvailability { - core, - hash, - descriptor, - availability_votes, - backers, - relay_parent_number, - backed_in_number, - backing_group, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("core"), - core as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("descriptor"), - descriptor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("availability_votes"), - availability_votes - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("backers"), - backers as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("relay_parent_number"), - relay_parent_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("backed_in_number"), - backed_in_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("backing_group"), - backing_group - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for CandidatePendingAvailability<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CandidatePendingAvailability { - core, - hash, - descriptor, - availability_votes, - backers, - relay_parent_number, - backed_in_number, - backing_group, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("core"), - core as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("hash"), - hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("descriptor"), - descriptor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("availability_votes"), - availability_votes - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("backers"), - backers as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("relay_parent_number"), - relay_parent_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("backed_in_number"), - backed_in_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("backing_group"), - backing_group - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - > ::core::fmt::Debug for CandidatePendingAvailability<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "core", - "hash", - "descriptor", - "availability_votes", - "backers", - "relay_parent_number", - "backed_in_number", - "backing_group", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.core, - &self.hash, - &self.descriptor, - &self.availability_votes, - &self.backers, - &self.relay_parent_number, - &self.backed_in_number, - &&self.backing_group, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "CandidatePendingAvailability", - names, - values, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum UmpQueueId { - #[codec(index = 0)] - Para(runtime_types::polkadot_parachain::primitives::Id), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for UmpQueueId { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `UmpQueueId`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - UmpQueueId::Para({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `UmpQueueId::Para.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `UmpQueueId`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for UmpQueueId { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - UmpQueueId::Para(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - UmpQueueId::Para(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for UmpQueueId {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for UmpQueueId { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = UmpQueueId; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Para" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - UmpQueueId::Para({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Para"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for UmpQueueId { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Para(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Para", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for UmpQueueId { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - UmpQueueId::Para(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Para", - &__self_0, - ) - } - } - } - } - } - pub mod initializer { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - force_approve { up_to: ::core::primitive::u32 }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_approve { - up_to: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_approve::up_to`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::force_approve { ref up_to } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(up_to), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::force_approve { ref up_to } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - up_to, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "force_approve" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::force_approve { - up_to: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("up_to"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_approve { - up_to: { - let val = *vals - .get(&Some("up_to")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "up_to".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("up_to"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["force_approve"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::force_approve { up_to } => { - ::subxt::ext::scale_encode::Variant { - name: "force_approve", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("up_to"), - up_to as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::force_approve { up_to: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "force_approve", - "up_to", - &__self_0, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BufferedSessionChange { - pub validators: ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::validator_app::Public, - >, - pub queued: ::std::vec::Vec< - runtime_types::polkadot_primitives::v4::validator_app::Public, - >, - pub session_index: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BufferedSessionChange { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(BufferedSessionChange { - validators: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_primitives::v4::validator_app::Public, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BufferedSessionChange::validators`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - queued: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_primitives::v4::validator_app::Public, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BufferedSessionChange::queued`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - session_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BufferedSessionChange::session_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BufferedSessionChange { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.validators), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.queued), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.session_index), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.validators, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.queued, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.session_index, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BufferedSessionChange {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for BufferedSessionChange { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BufferedSessionChange; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BufferedSessionChange { - validators: { - let val = *vals - .get(&Some("validators")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validators".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("validators"))? - }, - queued: { - let val = *vals - .get(&Some("queued")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "queued".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("queued"))? - }, - session_index: { - let val = *vals - .get(&Some("session_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "session_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("session_index"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(BufferedSessionChange { - validators: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("validators"))? - }, - queued: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("queued"))? - }, - session_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("session_index"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for BufferedSessionChange { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for BufferedSessionChange { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BufferedSessionChange { - validators, - queued, - session_index, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validators"), - validators as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("queued"), - queued as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("session_index"), - session_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for BufferedSessionChange { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BufferedSessionChange { - validators, - queued, - session_index, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validators"), - validators as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("queued"), - queued as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("session_index"), - session_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BufferedSessionChange { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "BufferedSessionChange", - "validators", - &self.validators, - "queued", - &self.queued, - "session_index", - &&self.session_index, - ) - } - } - } - pub mod origin { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Origin { - #[codec(index = 0)] - Parachain(runtime_types::polkadot_parachain::primitives::Id), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Origin { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Origin`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Origin::Parachain({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Origin::Parachain.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Origin`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Origin { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Origin::Parachain(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Origin::Parachain(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Origin {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Origin { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Origin; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Parachain" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Origin::Parachain({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Parachain"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Origin { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Parachain(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Parachain", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Origin { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Origin::Parachain(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Parachain", - &__self_0, - ) - } - } - } - } - } - } - pub mod paras { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - force_set_current_code { - para: runtime_types::polkadot_parachain::primitives::Id, - new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - }, - #[codec(index = 1)] - force_set_current_head { - para: runtime_types::polkadot_parachain::primitives::Id, - new_head: runtime_types::polkadot_parachain::primitives::HeadData, - }, - #[codec(index = 2)] - 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)] - force_note_new_head { - para: runtime_types::polkadot_parachain::primitives::Id, - new_head: runtime_types::polkadot_parachain::primitives::HeadData, - }, - #[codec(index = 4)] - force_queue_action { - para: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 5)] - add_trusted_validation_code { - validation_code: runtime_types::polkadot_parachain::primitives::ValidationCode, - }, - #[codec(index = 6)] - poke_unused_validation_code { - validation_code_hash: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - }, - #[codec(index = 7)] - include_pvf_check_statement { - stmt: runtime_types::polkadot_primitives::v4::PvfCheckStatement, - signature: runtime_types::polkadot_primitives::v4::validator_app::Signature, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_set_current_code { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_set_current_code::para`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_code: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_set_current_code::new_code`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_set_current_head { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_set_current_head::para`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_head: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_set_current_head::new_head`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_schedule_code_upgrade { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_schedule_code_upgrade::para`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_code: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_schedule_code_upgrade::new_code`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - relay_parent_number: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_schedule_code_upgrade::relay_parent_number`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_note_new_head { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Call::force_note_new_head::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - new_head: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::force_note_new_head::new_head`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::force_queue_action { - para: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::force_queue_action::para`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::add_trusted_validation_code { - validation_code: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::add_trusted_validation_code::validation_code`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::poke_unused_validation_code { - validation_code_hash: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::poke_unused_validation_code::validation_code_hash`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::include_pvf_check_statement { - stmt: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::include_pvf_check_statement::stmt`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - signature: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Call::include_pvf_check_statement::signature`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::force_set_current_code { ref para, ref new_code } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(new_code), - ) - } - Call::force_set_current_head { ref para, ref new_head } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(new_head), - ) - } - Call::force_schedule_code_upgrade { - ref para, - ref new_code, - ref relay_parent_number, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(new_code), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(relay_parent_number), - ) - } - Call::force_note_new_head { ref para, ref new_head } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(new_head), - ) - } - Call::force_queue_action { ref para } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(para), - ) - } - Call::add_trusted_validation_code { - ref validation_code, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(validation_code), - ) - } - Call::poke_unused_validation_code { - ref validation_code_hash, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(validation_code_hash), - ) - } - Call::include_pvf_check_statement { - ref stmt, - ref signature, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(stmt), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(signature), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::force_set_current_code { ref para, ref new_code } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - new_code, - __codec_dest_edqy, - ); - } - Call::force_set_current_head { ref para, ref new_head } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - new_head, - __codec_dest_edqy, - ); - } - Call::force_schedule_code_upgrade { - ref para, - ref new_code, - ref relay_parent_number, - } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - new_code, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - relay_parent_number, - __codec_dest_edqy, - ); - } - Call::force_note_new_head { ref para, ref new_head } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - new_head, - __codec_dest_edqy, - ); - } - Call::force_queue_action { ref para } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - para, - __codec_dest_edqy, - ); - } - Call::add_trusted_validation_code { - ref validation_code, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - validation_code, - __codec_dest_edqy, - ); - } - Call::poke_unused_validation_code { - ref validation_code_hash, - } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - validation_code_hash, - __codec_dest_edqy, - ); - } - Call::include_pvf_check_statement { - ref stmt, - ref signature, - } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - stmt, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - signature, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "force_set_current_code" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::force_set_current_code { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_code"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_set_current_code { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_code: { - let val = *vals - .get(&Some("new_code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_code".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_code"))? - }, - }) - }; - } - if value.name() == "force_set_current_head" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::force_set_current_head { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_head: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_head"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_set_current_head { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_head: { - let val = *vals - .get(&Some("new_head")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_head".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_head"))? - }, - }) - }; - } - if value.name() == "force_schedule_code_upgrade" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Call::force_schedule_code_upgrade { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_code"))? - }, - relay_parent_number: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("relay_parent_number"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_schedule_code_upgrade { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_code: { - let val = *vals - .get(&Some("new_code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_code".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_code"))? - }, - relay_parent_number: { - let val = *vals - .get(&Some("relay_parent_number")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "relay_parent_number".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("relay_parent_number"))? - }, - }) - }; - } - if value.name() == "force_note_new_head" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::force_note_new_head { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_head: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("new_head"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_note_new_head { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - new_head: { - let val = *vals - .get(&Some("new_head")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "new_head".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("new_head"))? - }, - }) - }; - } - if value.name() == "force_queue_action" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::force_queue_action { - para: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::force_queue_action { - para: { - let val = *vals - .get(&Some("para")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para"))? - }, - }) - }; - } - if value.name() == "add_trusted_validation_code" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::add_trusted_validation_code { - validation_code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::add_trusted_validation_code { - validation_code: { - let val = *vals - .get(&Some("validation_code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validation_code".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code"))? - }, - }) - }; - } - if value.name() == "poke_unused_validation_code" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::poke_unused_validation_code { - validation_code_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::poke_unused_validation_code { - validation_code_hash: { - let val = *vals - .get(&Some("validation_code_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validation_code_hash".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code_hash"))? - }, - }) - }; - } - if value.name() == "include_pvf_check_statement" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Call::include_pvf_check_statement { - stmt: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("stmt"))? - }, - signature: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::include_pvf_check_statement { - stmt: { - let val = *vals - .get(&Some("stmt")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "stmt".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("stmt"))? - }, - signature: { - let val = *vals - .get(&Some("signature")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "signature".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("signature"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "force_set_current_code", - "force_set_current_head", - "force_schedule_code_upgrade", - "force_note_new_head", - "force_queue_action", - "add_trusted_validation_code", - "poke_unused_validation_code", - "include_pvf_check_statement", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::force_set_current_code { para, new_code } => { - ::subxt::ext::scale_encode::Variant { - name: "force_set_current_code", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_code"), - new_code as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_set_current_head { para, new_head } => { - ::subxt::ext::scale_encode::Variant { - name: "force_set_current_head", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_head"), - new_head as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_schedule_code_upgrade { - para, - new_code, - relay_parent_number, - } => { - ::subxt::ext::scale_encode::Variant { - name: "force_schedule_code_upgrade", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_code"), - new_code as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("relay_parent_number"), - relay_parent_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_note_new_head { para, new_head } => { - ::subxt::ext::scale_encode::Variant { - name: "force_note_new_head", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("new_head"), - new_head as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::force_queue_action { para } => { - ::subxt::ext::scale_encode::Variant { - name: "force_queue_action", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("para"), - para as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::add_trusted_validation_code { validation_code } => { - ::subxt::ext::scale_encode::Variant { - name: "add_trusted_validation_code", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validation_code"), - validation_code - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::poke_unused_validation_code { - validation_code_hash, - } => { - ::subxt::ext::scale_encode::Variant { - name: "poke_unused_validation_code", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("validation_code_hash"), - validation_code_hash - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::include_pvf_check_statement { stmt, signature } => { - ::subxt::ext::scale_encode::Variant { - name: "include_pvf_check_statement", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("stmt"), - stmt as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("signature"), - signature as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::force_set_current_code { - para: __self_0, - new_code: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "force_set_current_code", - "para", - __self_0, - "new_code", - &__self_1, - ) - } - Call::force_set_current_head { - para: __self_0, - new_head: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "force_set_current_head", - "para", - __self_0, - "new_head", - &__self_1, - ) - } - Call::force_schedule_code_upgrade { - para: __self_0, - new_code: __self_1, - relay_parent_number: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "force_schedule_code_upgrade", - "para", - __self_0, - "new_code", - __self_1, - "relay_parent_number", - &__self_2, - ) - } - Call::force_note_new_head { - para: __self_0, - new_head: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "force_note_new_head", - "para", - __self_0, - "new_head", - &__self_1, - ) - } - Call::force_queue_action { para: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "force_queue_action", - "para", - &__self_0, - ) - } - Call::add_trusted_validation_code { - validation_code: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "add_trusted_validation_code", - "validation_code", - &__self_0, - ) - } - Call::poke_unused_validation_code { - validation_code_hash: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "poke_unused_validation_code", - "validation_code_hash", - &__self_0, - ) - } - Call::include_pvf_check_statement { - stmt: __self_0, - signature: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "include_pvf_check_statement", - "stmt", - __self_0, - "signature", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - NotRegistered, - #[codec(index = 1)] - CannotOnboard, - #[codec(index = 2)] - CannotOffboard, - #[codec(index = 3)] - CannotUpgrade, - #[codec(index = 4)] - CannotDowngrade, - #[codec(index = 5)] - PvfCheckStatementStale, - #[codec(index = 6)] - PvfCheckStatementFuture, - #[codec(index = 7)] - PvfCheckValidatorIndexOutOfBounds, - #[codec(index = 8)] - PvfCheckInvalidSignature, - #[codec(index = 9)] - PvfCheckDoubleVote, - #[codec(index = 10)] - PvfCheckSubjectInvalid, - #[codec(index = 11)] - CannotUpgradeCode, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotRegistered) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CannotOnboard) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CannotOffboard) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CannotUpgrade) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CannotDowngrade) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::PvfCheckStatementStale) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::PvfCheckStatementFuture) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::PvfCheckValidatorIndexOutOfBounds, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::PvfCheckInvalidSignature) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::PvfCheckDoubleVote) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::PvfCheckSubjectInvalid) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CannotUpgradeCode) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::NotRegistered => 0_usize, - Error::CannotOnboard => 0_usize, - Error::CannotOffboard => 0_usize, - Error::CannotUpgrade => 0_usize, - Error::CannotDowngrade => 0_usize, - Error::PvfCheckStatementStale => 0_usize, - Error::PvfCheckStatementFuture => 0_usize, - Error::PvfCheckValidatorIndexOutOfBounds => 0_usize, - Error::PvfCheckInvalidSignature => 0_usize, - Error::PvfCheckDoubleVote => 0_usize, - Error::PvfCheckSubjectInvalid => 0_usize, - Error::CannotUpgradeCode => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::NotRegistered => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::CannotOnboard => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::CannotOffboard => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::CannotUpgrade => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::CannotDowngrade => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::PvfCheckStatementStale => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::PvfCheckStatementFuture => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::PvfCheckValidatorIndexOutOfBounds => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::PvfCheckInvalidSignature => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::PvfCheckDoubleVote => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::PvfCheckSubjectInvalid => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Error::CannotUpgradeCode => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "NotRegistered" { - return Ok(Error::NotRegistered); - } - if value.name() == "CannotOnboard" { - return Ok(Error::CannotOnboard); - } - if value.name() == "CannotOffboard" { - return Ok(Error::CannotOffboard); - } - if value.name() == "CannotUpgrade" { - return Ok(Error::CannotUpgrade); - } - if value.name() == "CannotDowngrade" { - return Ok(Error::CannotDowngrade); - } - if value.name() == "PvfCheckStatementStale" { - return Ok(Error::PvfCheckStatementStale); - } - if value.name() == "PvfCheckStatementFuture" { - return Ok(Error::PvfCheckStatementFuture); - } - if value.name() == "PvfCheckValidatorIndexOutOfBounds" { - return Ok(Error::PvfCheckValidatorIndexOutOfBounds); - } - if value.name() == "PvfCheckInvalidSignature" { - return Ok(Error::PvfCheckInvalidSignature); - } - if value.name() == "PvfCheckDoubleVote" { - return Ok(Error::PvfCheckDoubleVote); - } - if value.name() == "PvfCheckSubjectInvalid" { - return Ok(Error::PvfCheckSubjectInvalid); - } - if value.name() == "CannotUpgradeCode" { - return Ok(Error::CannotUpgradeCode); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "NotRegistered", - "CannotOnboard", - "CannotOffboard", - "CannotUpgrade", - "CannotDowngrade", - "PvfCheckStatementStale", - "PvfCheckStatementFuture", - "PvfCheckValidatorIndexOutOfBounds", - "PvfCheckInvalidSignature", - "PvfCheckDoubleVote", - "PvfCheckSubjectInvalid", - "CannotUpgradeCode", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::NotRegistered => { - ::subxt::ext::scale_encode::Variant { - name: "NotRegistered", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CannotOnboard => { - ::subxt::ext::scale_encode::Variant { - name: "CannotOnboard", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CannotOffboard => { - ::subxt::ext::scale_encode::Variant { - name: "CannotOffboard", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CannotUpgrade => { - ::subxt::ext::scale_encode::Variant { - name: "CannotUpgrade", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CannotDowngrade => { - ::subxt::ext::scale_encode::Variant { - name: "CannotDowngrade", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PvfCheckStatementStale => { - ::subxt::ext::scale_encode::Variant { - name: "PvfCheckStatementStale", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PvfCheckStatementFuture => { - ::subxt::ext::scale_encode::Variant { - name: "PvfCheckStatementFuture", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PvfCheckValidatorIndexOutOfBounds => { - ::subxt::ext::scale_encode::Variant { - name: "PvfCheckValidatorIndexOutOfBounds", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PvfCheckInvalidSignature => { - ::subxt::ext::scale_encode::Variant { - name: "PvfCheckInvalidSignature", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PvfCheckDoubleVote => { - ::subxt::ext::scale_encode::Variant { - name: "PvfCheckDoubleVote", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PvfCheckSubjectInvalid => { - ::subxt::ext::scale_encode::Variant { - name: "PvfCheckSubjectInvalid", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CannotUpgradeCode => { - ::subxt::ext::scale_encode::Variant { - name: "CannotUpgradeCode", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::NotRegistered => "NotRegistered", - Error::CannotOnboard => "CannotOnboard", - Error::CannotOffboard => "CannotOffboard", - Error::CannotUpgrade => "CannotUpgrade", - Error::CannotDowngrade => "CannotDowngrade", - Error::PvfCheckStatementStale => "PvfCheckStatementStale", - Error::PvfCheckStatementFuture => "PvfCheckStatementFuture", - Error::PvfCheckValidatorIndexOutOfBounds => { - "PvfCheckValidatorIndexOutOfBounds" - } - Error::PvfCheckInvalidSignature => { - "PvfCheckInvalidSignature" - } - Error::PvfCheckDoubleVote => "PvfCheckDoubleVote", - Error::PvfCheckSubjectInvalid => "PvfCheckSubjectInvalid", - Error::CannotUpgradeCode => "CannotUpgradeCode", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - CurrentCodeUpdated( - runtime_types::polkadot_parachain::primitives::Id, - ), - #[codec(index = 1)] - CurrentHeadUpdated( - runtime_types::polkadot_parachain::primitives::Id, - ), - #[codec(index = 2)] - CodeUpgradeScheduled( - runtime_types::polkadot_parachain::primitives::Id, - ), - #[codec(index = 3)] - NewHeadNoted( - runtime_types::polkadot_parachain::primitives::Id, - ), - #[codec(index = 4)] - ActionQueued( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - ), - #[codec(index = 5)] - PvfCheckStarted( - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - runtime_types::polkadot_parachain::primitives::Id, - ), - #[codec(index = 6)] - PvfCheckAccepted( - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - runtime_types::polkadot_parachain::primitives::Id, - ), - #[codec(index = 7)] - PvfCheckRejected( - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - runtime_types::polkadot_parachain::primitives::Id, - ), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Event { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Event`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::CurrentCodeUpdated({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::CurrentCodeUpdated.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::CurrentHeadUpdated({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::CurrentHeadUpdated.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::CodeUpgradeScheduled({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::CodeUpgradeScheduled.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::NewHeadNoted({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::NewHeadNoted.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::ActionQueued( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ActionQueued.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::ActionQueued.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::PvfCheckStarted( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PvfCheckStarted.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PvfCheckStarted.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::PvfCheckAccepted( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PvfCheckAccepted.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PvfCheckAccepted.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Event::PvfCheckRejected( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PvfCheckRejected.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Event::PvfCheckRejected.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Event`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Event { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Event::CurrentCodeUpdated(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Event::CurrentHeadUpdated(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Event::CodeUpgradeScheduled(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Event::NewHeadNoted(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Event::ActionQueued(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::PvfCheckStarted(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::PvfCheckAccepted(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Event::PvfCheckRejected(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Event::CurrentCodeUpdated(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Event::CurrentHeadUpdated(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Event::CodeUpgradeScheduled(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Event::NewHeadNoted(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Event::ActionQueued(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::PvfCheckStarted(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::PvfCheckAccepted(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Event::PvfCheckRejected(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Event {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Event { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Event; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "CurrentCodeUpdated" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Event::CurrentCodeUpdated({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "CurrentHeadUpdated" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Event::CurrentHeadUpdated({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "CodeUpgradeScheduled" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Event::CodeUpgradeScheduled({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "NewHeadNoted" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Event::NewHeadNoted({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ActionQueued" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::ActionQueued( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "PvfCheckStarted" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::PvfCheckStarted( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "PvfCheckAccepted" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::PvfCheckAccepted( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "PvfCheckRejected" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Event::PvfCheckRejected( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "CurrentCodeUpdated", - "CurrentHeadUpdated", - "CodeUpgradeScheduled", - "NewHeadNoted", - "ActionQueued", - "PvfCheckStarted", - "PvfCheckAccepted", - "PvfCheckRejected", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Event { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::CurrentCodeUpdated(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "CurrentCodeUpdated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CurrentHeadUpdated(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "CurrentHeadUpdated", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CodeUpgradeScheduled(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "CodeUpgradeScheduled", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NewHeadNoted(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "NewHeadNoted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ActionQueued(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "ActionQueued", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PvfCheckStarted(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "PvfCheckStarted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PvfCheckAccepted(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "PvfCheckAccepted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PvfCheckRejected(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "PvfCheckRejected", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Event { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Event::CurrentCodeUpdated(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "CurrentCodeUpdated", - &__self_0, - ) - } - Event::CurrentHeadUpdated(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "CurrentHeadUpdated", - &__self_0, - ) - } - Event::CodeUpgradeScheduled(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "CodeUpgradeScheduled", - &__self_0, - ) - } - Event::NewHeadNoted(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "NewHeadNoted", - &__self_0, - ) - } - Event::ActionQueued(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "ActionQueued", - __self_0, - &__self_1, - ) - } - Event::PvfCheckStarted(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "PvfCheckStarted", - __self_0, - &__self_1, - ) - } - Event::PvfCheckAccepted(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "PvfCheckAccepted", - __self_0, - &__self_1, - ) - } - Event::PvfCheckRejected(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "PvfCheckRejected", - __self_0, - &__self_1, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct 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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ParaGenesisArgs { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ParaGenesisArgs { - genesis_head: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ParaGenesisArgs::genesis_head`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validation_code: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ParaGenesisArgs::validation_code`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - para_kind: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ParaGenesisArgs::para_kind`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ParaGenesisArgs { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.genesis_head), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.validation_code, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para_kind), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.genesis_head, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validation_code, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.para_kind, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ParaGenesisArgs {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ParaGenesisArgs { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ParaGenesisArgs; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ParaGenesisArgs { - genesis_head: { - let val = *vals - .get(&Some("genesis_head")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "genesis_head".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("genesis_head"))? - }, - validation_code: { - let val = *vals - .get(&Some("validation_code")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validation_code".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code"))? - }, - para_kind: { - let val = *vals - .get(&Some("para_kind")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_kind".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_kind"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(ParaGenesisArgs { - genesis_head: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("genesis_head"))? - }, - validation_code: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validation_code"))? - }, - para_kind: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_kind"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ParaGenesisArgs { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ParaGenesisArgs { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ParaGenesisArgs { - genesis_head, - validation_code, - para_kind, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("genesis_head"), - genesis_head - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validation_code"), - validation_code - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("para_kind"), - para_kind as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ParaGenesisArgs { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ParaGenesisArgs { - genesis_head, - validation_code, - para_kind, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("genesis_head"), - genesis_head - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validation_code"), - validation_code - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("para_kind"), - para_kind as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ParaGenesisArgs { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ParaGenesisArgs", - "genesis_head", - &self.genesis_head, - "validation_code", - &self.validation_code, - "para_kind", - &&self.para_kind, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ParaLifecycle { - #[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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ParaLifecycle { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `ParaLifecycle`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ParaLifecycle::Onboarding) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ParaLifecycle::Parathread) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ParaLifecycle::Parachain) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ParaLifecycle::UpgradingParathread, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ParaLifecycle::DowngradingParachain, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ParaLifecycle::OffboardingParathread, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - ParaLifecycle::OffboardingParachain, - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `ParaLifecycle`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ParaLifecycle { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - ParaLifecycle::Onboarding => 0_usize, - ParaLifecycle::Parathread => 0_usize, - ParaLifecycle::Parachain => 0_usize, - ParaLifecycle::UpgradingParathread => 0_usize, - ParaLifecycle::DowngradingParachain => 0_usize, - ParaLifecycle::OffboardingParathread => 0_usize, - ParaLifecycle::OffboardingParachain => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - ParaLifecycle::Onboarding => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - ParaLifecycle::Parathread => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - ParaLifecycle::Parachain => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - ParaLifecycle::UpgradingParathread => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - ParaLifecycle::DowngradingParachain => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - ParaLifecycle::OffboardingParathread => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - ParaLifecycle::OffboardingParachain => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ParaLifecycle {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ParaLifecycle { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ParaLifecycle; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Onboarding" { - return Ok(ParaLifecycle::Onboarding); - } - if value.name() == "Parathread" { - return Ok(ParaLifecycle::Parathread); - } - if value.name() == "Parachain" { - return Ok(ParaLifecycle::Parachain); - } - if value.name() == "UpgradingParathread" { - return Ok(ParaLifecycle::UpgradingParathread); - } - if value.name() == "DowngradingParachain" { - return Ok(ParaLifecycle::DowngradingParachain); - } - if value.name() == "OffboardingParathread" { - return Ok(ParaLifecycle::OffboardingParathread); - } - if value.name() == "OffboardingParachain" { - return Ok(ParaLifecycle::OffboardingParachain); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Onboarding", - "Parathread", - "Parachain", - "UpgradingParathread", - "DowngradingParachain", - "OffboardingParathread", - "OffboardingParachain", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ParaLifecycle { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Onboarding => { - ::subxt::ext::scale_encode::Variant { - name: "Onboarding", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Parathread => { - ::subxt::ext::scale_encode::Variant { - name: "Parathread", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Parachain => { - ::subxt::ext::scale_encode::Variant { - name: "Parachain", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UpgradingParathread => { - ::subxt::ext::scale_encode::Variant { - name: "UpgradingParathread", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DowngradingParachain => { - ::subxt::ext::scale_encode::Variant { - name: "DowngradingParachain", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OffboardingParathread => { - ::subxt::ext::scale_encode::Variant { - name: "OffboardingParathread", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OffboardingParachain => { - ::subxt::ext::scale_encode::Variant { - name: "OffboardingParachain", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ParaLifecycle { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - ParaLifecycle::Onboarding => "Onboarding", - ParaLifecycle::Parathread => "Parathread", - ParaLifecycle::Parachain => "Parachain", - ParaLifecycle::UpgradingParathread => "UpgradingParathread", - ParaLifecycle::DowngradingParachain => { - "DowngradingParachain" - } - ParaLifecycle::OffboardingParathread => { - "OffboardingParathread" - } - ParaLifecycle::OffboardingParachain => { - "OffboardingParachain" - } - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ParaPastCodeMeta<_0> { - pub upgrade_times: ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::ReplacementTimes< - _0, - >, - >, - pub last_pruned: ::core::option::Option<_0>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for ParaPastCodeMeta<_0> - where - ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::ReplacementTimes< - _0, - >, - >: ::subxt::ext::codec::Decode, - ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::ReplacementTimes< - _0, - >, - >: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - ::core::option::Option<_0>: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ParaPastCodeMeta::<_0> { - upgrade_times: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::ReplacementTimes< - _0, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `ParaPastCodeMeta::upgrade_times`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - last_pruned: { - let __codec_res_edqy = <::core::option::Option< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ParaPastCodeMeta::last_pruned`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for ParaPastCodeMeta<_0> - where - ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::ReplacementTimes< - _0, - >, - >: ::subxt::ext::codec::Encode, - ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::ReplacementTimes< - _0, - >, - >: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.upgrade_times), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.last_pruned), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.upgrade_times, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.last_pruned, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for ParaPastCodeMeta<_0> - where - ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::ReplacementTimes< - _0, - >, - >: ::subxt::ext::codec::Encode, - ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::ReplacementTimes< - _0, - >, - >: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - ::core::option::Option<_0>: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for ParaPastCodeMeta<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ParaPastCodeMeta<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ParaPastCodeMeta { - upgrade_times: { - let val = *vals - .get(&Some("upgrade_times")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "upgrade_times".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("upgrade_times"))? - }, - last_pruned: { - let val = *vals - .get(&Some("last_pruned")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "last_pruned".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("last_pruned"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ParaPastCodeMeta { - upgrade_times: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("upgrade_times"))? - }, - last_pruned: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("last_pruned"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for ParaPastCodeMeta<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for ParaPastCodeMeta<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ParaPastCodeMeta { upgrade_times, last_pruned } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("upgrade_times"), - upgrade_times - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_pruned"), - last_pruned as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for ParaPastCodeMeta<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ParaPastCodeMeta { upgrade_times, last_pruned } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("upgrade_times"), - upgrade_times - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("last_pruned"), - last_pruned as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for ParaPastCodeMeta<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ParaPastCodeMeta", - "upgrade_times", - &self.upgrade_times, - "last_pruned", - &&self.last_pruned, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PvfCheckActiveVoteState<_0> { - 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: ::core::primitive::u32, - pub created_at: _0, - pub causes: ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::PvfCheckCause< - _0, - >, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode - for PvfCheckActiveVoteState<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::PvfCheckCause< - _0, - >, - >: ::subxt::ext::codec::Decode, - ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::PvfCheckCause< - _0, - >, - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(PvfCheckActiveVoteState::<_0> { - votes_accept: { - let __codec_res_edqy = <::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `PvfCheckActiveVoteState::votes_accept`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - votes_reject: { - let __codec_res_edqy = <::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `PvfCheckActiveVoteState::votes_reject`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - age: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PvfCheckActiveVoteState::age`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - created_at: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `PvfCheckActiveVoteState::created_at`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - causes: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::PvfCheckCause< - _0, - >, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `PvfCheckActiveVoteState::causes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode - for PvfCheckActiveVoteState<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::PvfCheckCause< - _0, - >, - >: ::subxt::ext::codec::Encode, - ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::PvfCheckCause< - _0, - >, - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes_accept), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.votes_reject), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.age), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.created_at), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.causes), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.votes_accept, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.votes_reject, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.age, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.created_at, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.causes, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike - for PvfCheckActiveVoteState<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::PvfCheckCause< - _0, - >, - >: ::subxt::ext::codec::Encode, - ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::PvfCheckCause< - _0, - >, - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for PvfCheckActiveVoteState<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PvfCheckActiveVoteState<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PvfCheckActiveVoteState { - votes_accept: { - let val = *vals - .get(&Some("votes_accept")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes_accept".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("votes_accept"))? - }, - votes_reject: { - let val = *vals - .get(&Some("votes_reject")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "votes_reject".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("votes_reject"))? - }, - age: { - let val = *vals - .get(&Some("age")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "age".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("age"))? - }, - created_at: { - let val = *vals - .get(&Some("created_at")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "created_at".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("created_at"))? - }, - causes: { - let val = *vals - .get(&Some("causes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "causes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("causes"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(PvfCheckActiveVoteState { - votes_accept: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("votes_accept"))? - }, - votes_reject: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("votes_reject"))? - }, - age: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("age"))? - }, - created_at: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("created_at"))? - }, - causes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("causes"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for PvfCheckActiveVoteState<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for PvfCheckActiveVoteState<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PvfCheckActiveVoteState { - votes_accept, - votes_reject, - age, - created_at, - causes, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("votes_accept"), - votes_accept - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes_reject"), - votes_reject - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("age"), - age as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("created_at"), - created_at as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("causes"), - causes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for PvfCheckActiveVoteState<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PvfCheckActiveVoteState { - votes_accept, - votes_reject, - age, - created_at, - causes, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("votes_accept"), - votes_accept - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("votes_reject"), - votes_reject - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("age"), - age as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("created_at"), - created_at as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("causes"), - causes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for PvfCheckActiveVoteState<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "PvfCheckActiveVoteState", - "votes_accept", - &self.votes_accept, - "votes_reject", - &self.votes_reject, - "age", - &self.age, - "created_at", - &self.created_at, - "causes", - &&self.causes, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum PvfCheckCause<_0> { - #[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, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for PvfCheckCause<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `PvfCheckCause`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - PvfCheckCause::< - _0, - >::Onboarding({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PvfCheckCause::Onboarding.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(PvfCheckCause::<_0>::Upgrade { - id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PvfCheckCause::Upgrade::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - relay_parent_number: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `PvfCheckCause::Upgrade::relay_parent_number`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `PvfCheckCause`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for PvfCheckCause<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - PvfCheckCause::Onboarding(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - PvfCheckCause::Upgrade { - ref id, - ref relay_parent_number, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(relay_parent_number), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - PvfCheckCause::Onboarding(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - PvfCheckCause::Upgrade { - ref id, - ref relay_parent_number, - } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - relay_parent_number, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for PvfCheckCause<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for PvfCheckCause<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PvfCheckCause<_0>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Onboarding" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - PvfCheckCause::Onboarding({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Upgrade" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(PvfCheckCause::Upgrade { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - relay_parent_number: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("relay_parent_number"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PvfCheckCause::Upgrade { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - relay_parent_number: { - let val = *vals - .get(&Some("relay_parent_number")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "relay_parent_number".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("relay_parent_number"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Onboarding", "Upgrade"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for PvfCheckCause<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Onboarding(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Onboarding", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Upgrade { id, relay_parent_number } => { - ::subxt::ext::scale_encode::Variant { - name: "Upgrade", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("relay_parent_number"), - relay_parent_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for PvfCheckCause<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - PvfCheckCause::Onboarding(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Onboarding", - &__self_0, - ) - } - PvfCheckCause::Upgrade { - id: __self_0, - relay_parent_number: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Upgrade", - "id", - __self_0, - "relay_parent_number", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReplacementTimes<_0> { - pub expected_at: _0, - pub activated_at: _0, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for ReplacementTimes<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ReplacementTimes::<_0> { - expected_at: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReplacementTimes::expected_at`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - activated_at: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ReplacementTimes::activated_at`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for ReplacementTimes<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.expected_at), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.activated_at), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.expected_at, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.activated_at, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for ReplacementTimes<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for ReplacementTimes<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ReplacementTimes<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ReplacementTimes { - expected_at: { - let val = *vals - .get(&Some("expected_at")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "expected_at".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("expected_at"))? - }, - activated_at: { - let val = *vals - .get(&Some("activated_at")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "activated_at".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("activated_at"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ReplacementTimes { - expected_at: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("expected_at"))? - }, - activated_at: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("activated_at"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for ReplacementTimes<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for ReplacementTimes<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReplacementTimes { expected_at, activated_at } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("expected_at"), - expected_at as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("activated_at"), - activated_at - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for ReplacementTimes<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ReplacementTimes { expected_at, activated_at } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("expected_at"), - expected_at as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("activated_at"), - activated_at - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for ReplacementTimes<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ReplacementTimes", - "expected_at", - &self.expected_at, - "activated_at", - &&self.activated_at, - ) - } - } - } - pub mod paras_inherent { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call { - #[codec(index = 0)] - enter { - data: runtime_types::polkadot_primitives::v4::InherentData< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Call::enter { - data: { - let __codec_res_edqy = , - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Call::enter::data`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Call::enter { ref data } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(data), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Call::enter { ref data } => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - data, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "enter" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Call::enter { - data: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Call::enter { - data: { - let val = *vals - .get(&Some("data")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "data".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["enter"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::enter { data } => { - ::subxt::ext::scale_encode::Variant { - name: "enter", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("data"), - data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Call::enter { data: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "enter", - "data", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - TooManyInclusionInherents, - #[codec(index = 1)] - InvalidParentHeader, - #[codec(index = 2)] - CandidateConcludedInvalid, - #[codec(index = 3)] - InherentOverweight, - #[codec(index = 4)] - DisputeStatementsUnsortedOrDuplicates, - #[codec(index = 5)] - DisputeInvalid, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooManyInclusionInherents) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidParentHeader) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::CandidateConcludedInvalid) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InherentOverweight) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::DisputeStatementsUnsortedOrDuplicates, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::DisputeInvalid) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::TooManyInclusionInherents => 0_usize, - Error::InvalidParentHeader => 0_usize, - Error::CandidateConcludedInvalid => 0_usize, - Error::InherentOverweight => 0_usize, - Error::DisputeStatementsUnsortedOrDuplicates => 0_usize, - Error::DisputeInvalid => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::TooManyInclusionInherents => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::InvalidParentHeader => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::CandidateConcludedInvalid => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::InherentOverweight => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::DisputeStatementsUnsortedOrDuplicates => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::DisputeInvalid => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "TooManyInclusionInherents" { - return Ok(Error::TooManyInclusionInherents); - } - if value.name() == "InvalidParentHeader" { - return Ok(Error::InvalidParentHeader); - } - if value.name() == "CandidateConcludedInvalid" { - return Ok(Error::CandidateConcludedInvalid); - } - if value.name() == "InherentOverweight" { - return Ok(Error::InherentOverweight); - } - if value.name() == "DisputeStatementsUnsortedOrDuplicates" { - return Ok(Error::DisputeStatementsUnsortedOrDuplicates); - } - if value.name() == "DisputeInvalid" { - return Ok(Error::DisputeInvalid); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "TooManyInclusionInherents", - "InvalidParentHeader", - "CandidateConcludedInvalid", - "InherentOverweight", - "DisputeStatementsUnsortedOrDuplicates", - "DisputeInvalid", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::TooManyInclusionInherents => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyInclusionInherents", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidParentHeader => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidParentHeader", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CandidateConcludedInvalid => { - ::subxt::ext::scale_encode::Variant { - name: "CandidateConcludedInvalid", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InherentOverweight => { - ::subxt::ext::scale_encode::Variant { - name: "InherentOverweight", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DisputeStatementsUnsortedOrDuplicates => { - ::subxt::ext::scale_encode::Variant { - name: "DisputeStatementsUnsortedOrDuplicates", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DisputeInvalid => { - ::subxt::ext::scale_encode::Variant { - name: "DisputeInvalid", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - Error::TooManyInclusionInherents => { - "TooManyInclusionInherents" - } - Error::InvalidParentHeader => "InvalidParentHeader", - Error::CandidateConcludedInvalid => { - "CandidateConcludedInvalid" - } - Error::InherentOverweight => "InherentOverweight", - Error::DisputeStatementsUnsortedOrDuplicates => { - "DisputeStatementsUnsortedOrDuplicates" - } - Error::DisputeInvalid => "DisputeInvalid", - }, - ) - } - } - } - } - pub mod scheduler { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum AssignmentKind { - #[codec(index = 0)] - Parachain, - #[codec(index = 1)] - Parathread( - runtime_types::polkadot_primitives::v4::collator_app::Public, - ::core::primitive::u32, - ), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AssignmentKind { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `AssignmentKind`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(AssignmentKind::Parachain) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AssignmentKind::Parathread( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssignmentKind::Parathread.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssignmentKind::Parathread.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `AssignmentKind`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AssignmentKind { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - AssignmentKind::Parachain => 0_usize, - AssignmentKind::Parathread(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - AssignmentKind::Parachain => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - AssignmentKind::Parathread(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AssignmentKind {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AssignmentKind { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AssignmentKind; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Parachain" { - return Ok(AssignmentKind::Parachain); - } - if value.name() == "Parathread" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - AssignmentKind::Parathread( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Parachain", "Parathread"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AssignmentKind { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Parachain => { - ::subxt::ext::scale_encode::Variant { - name: "Parachain", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Parathread(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "Parathread", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AssignmentKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - AssignmentKind::Parachain => { - ::core::fmt::Formatter::write_str(f, "Parachain") - } - AssignmentKind::Parathread(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "Parathread", - __self_0, - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CoreAssignment { - pub core: runtime_types::polkadot_primitives::v4::CoreIndex, - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub kind: runtime_types::polkadot_runtime_parachains::scheduler::AssignmentKind, - pub group_idx: runtime_types::polkadot_primitives::v4::GroupIndex, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for CoreAssignment { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(CoreAssignment { - core: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CoreAssignment::core`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - para_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CoreAssignment::para_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - kind: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CoreAssignment::kind`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - group_idx: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `CoreAssignment::group_idx`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for CoreAssignment { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.core), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.para_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.kind), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.group_idx), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.core, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.para_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.kind, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.group_idx, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for CoreAssignment {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for CoreAssignment { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = CoreAssignment; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(CoreAssignment { - core: { - let val = *vals - .get(&Some("core")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "core".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("core"))? - }, - para_id: { - let val = *vals - .get(&Some("para_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "para_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - kind: { - let val = *vals - .get(&Some("kind")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "kind".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("kind"))? - }, - group_idx: { - let val = *vals - .get(&Some("group_idx")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "group_idx".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("group_idx"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(CoreAssignment { - core: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("core"))? - }, - para_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("para_id"))? - }, - kind: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("kind"))? - }, - group_idx: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("group_idx"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for CoreAssignment { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for CoreAssignment { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CoreAssignment { core, para_id, kind, group_idx } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("core"), - core as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("kind"), - kind as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("group_idx"), - group_idx as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for CoreAssignment { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let CoreAssignment { core, para_id, kind, group_idx } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("core"), - core as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("para_id"), - para_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("kind"), - kind as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("group_idx"), - group_idx as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for CoreAssignment { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "CoreAssignment", - "core", - &self.core, - "para_id", - &self.para_id, - "kind", - &self.kind, - "group_idx", - &&self.group_idx, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ParathreadClaimQueue { - pub queue: ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::scheduler::QueuedParathread, - >, - pub next_core_offset: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ParathreadClaimQueue { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(ParathreadClaimQueue { - queue: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::scheduler::QueuedParathread, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ParathreadClaimQueue::queue`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - next_core_offset: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ParathreadClaimQueue::next_core_offset`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ParathreadClaimQueue { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.queue), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.next_core_offset, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.queue, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.next_core_offset, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ParathreadClaimQueue {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for ParathreadClaimQueue { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ParathreadClaimQueue; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ParathreadClaimQueue { - queue: { - let val = *vals - .get(&Some("queue")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "queue".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("queue"))? - }, - next_core_offset: { - let val = *vals - .get(&Some("next_core_offset")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "next_core_offset".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("next_core_offset"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ParathreadClaimQueue { - queue: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("queue"))? - }, - next_core_offset: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("next_core_offset"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for ParathreadClaimQueue { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for ParathreadClaimQueue { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ParathreadClaimQueue { queue, next_core_offset } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("queue"), - queue as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("next_core_offset"), - next_core_offset - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for ParathreadClaimQueue { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ParathreadClaimQueue { queue, next_core_offset } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("queue"), - queue as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("next_core_offset"), - next_core_offset - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ParathreadClaimQueue { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ParathreadClaimQueue", - "queue", - &self.queue, - "next_core_offset", - &&self.next_core_offset, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct QueuedParathread { - pub claim: runtime_types::polkadot_primitives::v4::ParathreadEntry, - pub core_offset: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for QueuedParathread { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(QueuedParathread { - claim: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `QueuedParathread::claim`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - core_offset: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `QueuedParathread::core_offset`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for QueuedParathread { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.claim), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.core_offset), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.claim, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.core_offset, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for QueuedParathread {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for QueuedParathread { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = QueuedParathread; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(QueuedParathread { - claim: { - let val = *vals - .get(&Some("claim")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "claim".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("claim"))? - }, - core_offset: { - let val = *vals - .get(&Some("core_offset")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "core_offset".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("core_offset"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(QueuedParathread { - claim: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("claim"))? - }, - core_offset: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("core_offset"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for QueuedParathread { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for QueuedParathread { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let QueuedParathread { claim, core_offset } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("claim"), - claim as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("core_offset"), - core_offset as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for QueuedParathread { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let QueuedParathread { claim, core_offset } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("claim"), - claim as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("core_offset"), - core_offset as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for QueuedParathread { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "QueuedParathread", - "claim", - &self.claim, - "core_offset", - &&self.core_offset, - ) - } - } - } - pub mod shared { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Call {} - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Call { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Call`, failed to read variant byte", - ) - })? - { - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Call`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Call {} - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Call {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Call { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Call; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: ::alloc::vec::Vec::new(), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Call { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Call { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - unsafe { ::core::intrinsics::unreachable() } - } - } - } - } - } - pub mod sp_arithmetic { - use super::runtime_types; - pub mod fixed_point { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct FixedI64(pub ::core::primitive::i64); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for FixedI64 { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - FixedI64({ - let __codec_res_edqy = <::core::primitive::i64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `FixedI64.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for FixedI64 { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for FixedI64 {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for FixedI64 { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = FixedI64; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - FixedI64({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for FixedI64 { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for FixedI64 { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let FixedI64(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for FixedI64 { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let FixedI64(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for FixedI64 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "FixedI64", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct FixedU128(pub ::core::primitive::u128); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for FixedU128 { - type As = ::core::primitive::u128; - fn encode_as(&self) -> &::core::primitive::u128 { - &self.0 - } - fn decode_from( - x: ::core::primitive::u128, - ) -> ::core::result::Result< - FixedU128, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(FixedU128(x)) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> - for FixedU128 { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> FixedU128 { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for FixedU128 { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - FixedU128({ - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `FixedU128.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for FixedU128 { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for FixedU128 {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for FixedU128 { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = FixedU128; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - FixedU128({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for FixedU128 { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for FixedU128 { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let FixedU128(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for FixedU128 { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let FixedU128(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for FixedU128 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "FixedU128", - &&self.0, - ) - } - } - } - pub mod per_things { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PerU16(pub ::core::primitive::u16); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for PerU16 { - type As = ::core::primitive::u16; - fn encode_as(&self) -> &::core::primitive::u16 { - &self.0 - } - fn decode_from( - x: ::core::primitive::u16, - ) -> ::core::result::Result< - PerU16, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(PerU16(x)) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for PerU16 { - fn from(x: ::subxt::ext::codec::Compact) -> PerU16 { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PerU16 { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - PerU16({ - let __codec_res_edqy = <::core::primitive::u16 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PerU16.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PerU16 { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PerU16 {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PerU16 { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PerU16; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - PerU16({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for PerU16 { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PerU16 { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PerU16(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PerU16 { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PerU16(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PerU16 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "PerU16", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Perbill(pub ::core::primitive::u32); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Perbill { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.0 - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - Perbill, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Perbill(x)) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Perbill { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> Perbill { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Perbill { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Perbill({ - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Perbill.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Perbill { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Perbill {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Perbill { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Perbill; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Perbill({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Perbill { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Perbill { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Perbill(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Perbill { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Perbill(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Perbill { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Perbill", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Percent(pub ::core::primitive::u8); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Percent { - type As = ::core::primitive::u8; - fn encode_as(&self) -> &::core::primitive::u8 { - &self.0 - } - fn decode_from( - x: ::core::primitive::u8, - ) -> ::core::result::Result< - Percent, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Percent(x)) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Percent { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> Percent { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Percent { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Percent({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Percent.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Percent { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Percent {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Percent { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Percent; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Percent({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Percent { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Percent { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Percent(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Percent { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Percent(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Percent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Percent", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Permill(pub ::core::primitive::u32); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Permill { - type As = ::core::primitive::u32; - fn encode_as(&self) -> &::core::primitive::u32 { - &self.0 - } - fn decode_from( - x: ::core::primitive::u32, - ) -> ::core::result::Result< - Permill, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Permill(x)) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Permill { - fn from( - x: ::subxt::ext::codec::Compact, - ) -> Permill { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Permill { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Permill({ - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Permill.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Permill { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Permill {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Permill { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Permill; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Permill({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Permill { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Permill { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Permill(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Permill { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Permill(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Permill { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Permill", - &&self.0, - ) - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ArithmeticError { - #[codec(index = 0)] - Underflow, - #[codec(index = 1)] - Overflow, - #[codec(index = 2)] - DivisionByZero, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ArithmeticError { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `ArithmeticError`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ArithmeticError::Underflow) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ArithmeticError::Overflow) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(ArithmeticError::DivisionByZero) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `ArithmeticError`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ArithmeticError { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - ArithmeticError::Underflow => 0_usize, - ArithmeticError::Overflow => 0_usize, - ArithmeticError::DivisionByZero => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - ArithmeticError::Underflow => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - ArithmeticError::Overflow => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - ArithmeticError::DivisionByZero => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ArithmeticError {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ArithmeticError { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ArithmeticError; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Underflow" { - return Ok(ArithmeticError::Underflow); - } - if value.name() == "Overflow" { - return Ok(ArithmeticError::Overflow); - } - if value.name() == "DivisionByZero" { - return Ok(ArithmeticError::DivisionByZero); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Underflow", - "Overflow", - "DivisionByZero", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ArithmeticError { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Underflow => { - ::subxt::ext::scale_encode::Variant { - name: "Underflow", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Overflow => { - ::subxt::ext::scale_encode::Variant { - name: "Overflow", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DivisionByZero => { - ::subxt::ext::scale_encode::Variant { - name: "DivisionByZero", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ArithmeticError { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - ArithmeticError::Underflow => "Underflow", - ArithmeticError::Overflow => "Overflow", - ArithmeticError::DivisionByZero => "DivisionByZero", - }, - ) - } - } - } - pub mod sp_authority_discovery { - use super::runtime_types; - pub mod app { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub runtime_types::sp_core::sr25519::Public); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Public { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Public({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Public.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Public { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Public {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Public { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Public; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Public({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Public { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Public { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Public { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Public { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Public", - &&self.0, - ) - } - } - } - } - pub mod sp_consensus_babe { - use super::runtime_types; - pub mod app { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub runtime_types::sp_core::sr25519::Public); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Public { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Public({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Public.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Public { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Public {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Public { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Public; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Public({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Public { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Public { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Public { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Public { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Public", - &&self.0, - ) - } - } - } - pub mod digests { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum NextConfigDescriptor { - #[codec(index = 1)] - V1 { - c: (::core::primitive::u64, ::core::primitive::u64), - allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NextConfigDescriptor { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `NextConfigDescriptor`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(NextConfigDescriptor::V1 { - c: { - let __codec_res_edqy = <( - ::core::primitive::u64, - ::core::primitive::u64, - ) as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NextConfigDescriptor::V1::c`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - allowed_slots: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `NextConfigDescriptor::V1::allowed_slots`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `NextConfigDescriptor`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NextConfigDescriptor { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - NextConfigDescriptor::V1 { ref c, ref allowed_slots } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(c)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(allowed_slots), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - NextConfigDescriptor::V1 { ref c, ref allowed_slots } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - c, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - allowed_slots, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NextConfigDescriptor {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for NextConfigDescriptor { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NextConfigDescriptor; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "V1" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(NextConfigDescriptor::V1 { - c: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("c"))? - }, - allowed_slots: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("allowed_slots"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(NextConfigDescriptor::V1 { - c: { - let val = *vals - .get(&Some("c")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "c".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("c"))? - }, - allowed_slots: { - let val = *vals - .get(&Some("allowed_slots")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "allowed_slots".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("allowed_slots"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["V1"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for NextConfigDescriptor { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::V1 { c, allowed_slots } => { - ::subxt::ext::scale_encode::Variant { - name: "V1", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("c"), - c as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("allowed_slots"), - allowed_slots - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NextConfigDescriptor { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - NextConfigDescriptor::V1 { - c: __self_0, - allowed_slots: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "V1", - "c", - __self_0, - "allowed_slots", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub 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, - ), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PreDigest { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `PreDigest`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - PreDigest::Primary({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PreDigest::Primary.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - PreDigest::SecondaryPlain({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PreDigest::SecondaryPlain.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - PreDigest::SecondaryVRF({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PreDigest::SecondaryVRF.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `PreDigest`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PreDigest { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - PreDigest::Primary(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - PreDigest::SecondaryPlain(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - PreDigest::SecondaryVRF(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - PreDigest::Primary(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - PreDigest::SecondaryPlain(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - PreDigest::SecondaryVRF(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PreDigest {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PreDigest { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PreDigest; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Primary" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - PreDigest::Primary({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "SecondaryPlain" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - PreDigest::SecondaryPlain({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "SecondaryVRF" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - PreDigest::SecondaryVRF({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Primary", - "SecondaryPlain", - "SecondaryVRF", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PreDigest { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Primary(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Primary", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SecondaryPlain(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "SecondaryPlain", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SecondaryVRF(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "SecondaryVRF", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PreDigest { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - PreDigest::Primary(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Primary", - &__self_0, - ) - } - PreDigest::SecondaryPlain(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "SecondaryPlain", - &__self_0, - ) - } - PreDigest::SecondaryVRF(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "SecondaryVRF", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PrimaryPreDigest { - pub authority_index: ::core::primitive::u32, - pub slot: runtime_types::sp_consensus_slots::Slot, - pub vrf_signature: runtime_types::sp_core::sr25519::vrf::VrfSignature, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PrimaryPreDigest { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(PrimaryPreDigest { - authority_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `PrimaryPreDigest::authority_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - slot: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PrimaryPreDigest::slot`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - vrf_signature: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `PrimaryPreDigest::vrf_signature`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PrimaryPreDigest { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.authority_index, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.slot), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.vrf_signature), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.authority_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.slot, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.vrf_signature, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PrimaryPreDigest {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for PrimaryPreDigest { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PrimaryPreDigest; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PrimaryPreDigest { - authority_index: { - let val = *vals - .get(&Some("authority_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "authority_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_index"))? - }, - slot: { - let val = *vals - .get(&Some("slot")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "slot".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("slot"))? - }, - vrf_signature: { - let val = *vals - .get(&Some("vrf_signature")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "vrf_signature".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("vrf_signature"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(PrimaryPreDigest { - authority_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_index"))? - }, - slot: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("slot"))? - }, - vrf_signature: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("vrf_signature"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for PrimaryPreDigest { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PrimaryPreDigest { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PrimaryPreDigest { - authority_index, - slot, - vrf_signature, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("authority_index"), - authority_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slot"), - slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("vrf_signature"), - vrf_signature - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for PrimaryPreDigest { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PrimaryPreDigest { - authority_index, - slot, - vrf_signature, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("authority_index"), - authority_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slot"), - slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("vrf_signature"), - vrf_signature - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PrimaryPreDigest { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "PrimaryPreDigest", - "authority_index", - &self.authority_index, - "slot", - &self.slot, - "vrf_signature", - &&self.vrf_signature, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SecondaryPlainPreDigest { - pub authority_index: ::core::primitive::u32, - pub slot: runtime_types::sp_consensus_slots::Slot, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SecondaryPlainPreDigest { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SecondaryPlainPreDigest { - authority_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SecondaryPlainPreDigest::authority_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - slot: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SecondaryPlainPreDigest::slot`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SecondaryPlainPreDigest { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.authority_index, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.slot), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.authority_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.slot, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike - for SecondaryPlainPreDigest {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SecondaryPlainPreDigest { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SecondaryPlainPreDigest; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SecondaryPlainPreDigest { - authority_index: { - let val = *vals - .get(&Some("authority_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "authority_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_index"))? - }, - slot: { - let val = *vals - .get(&Some("slot")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "slot".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("slot"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(SecondaryPlainPreDigest { - authority_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_index"))? - }, - slot: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("slot"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SecondaryPlainPreDigest { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SecondaryPlainPreDigest { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SecondaryPlainPreDigest { authority_index, slot } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("authority_index"), - authority_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slot"), - slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SecondaryPlainPreDigest { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SecondaryPlainPreDigest { authority_index, slot } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("authority_index"), - authority_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slot"), - slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SecondaryPlainPreDigest { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SecondaryPlainPreDigest", - "authority_index", - &self.authority_index, - "slot", - &&self.slot, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SecondaryVRFPreDigest { - pub authority_index: ::core::primitive::u32, - pub slot: runtime_types::sp_consensus_slots::Slot, - pub vrf_signature: runtime_types::sp_core::sr25519::vrf::VrfSignature, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for SecondaryVRFPreDigest { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(SecondaryVRFPreDigest { - authority_index: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SecondaryVRFPreDigest::authority_index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - slot: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `SecondaryVRFPreDigest::slot`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - vrf_signature: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `SecondaryVRFPreDigest::vrf_signature`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for SecondaryVRFPreDigest { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.authority_index, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.slot), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.vrf_signature), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.authority_index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.slot, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.vrf_signature, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for SecondaryVRFPreDigest {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for SecondaryVRFPreDigest { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = SecondaryVRFPreDigest; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(SecondaryVRFPreDigest { - authority_index: { - let val = *vals - .get(&Some("authority_index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "authority_index".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_index"))? - }, - slot: { - let val = *vals - .get(&Some("slot")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "slot".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("slot"))? - }, - vrf_signature: { - let val = *vals - .get(&Some("vrf_signature")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "vrf_signature".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("vrf_signature"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(SecondaryVRFPreDigest { - authority_index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("authority_index"))? - }, - slot: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("slot"))? - }, - vrf_signature: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("vrf_signature"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for SecondaryVRFPreDigest { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for SecondaryVRFPreDigest { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SecondaryVRFPreDigest { - authority_index, - slot, - vrf_signature, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("authority_index"), - authority_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slot"), - slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("vrf_signature"), - vrf_signature - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for SecondaryVRFPreDigest { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let SecondaryVRFPreDigest { - authority_index, - slot, - vrf_signature, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("authority_index"), - authority_index - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slot"), - slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("vrf_signature"), - vrf_signature - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for SecondaryVRFPreDigest { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "SecondaryVRFPreDigest", - "authority_index", - &self.authority_index, - "slot", - &self.slot, - "vrf_signature", - &&self.vrf_signature, - ) - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum AllowedSlots { - #[codec(index = 0)] - PrimarySlots, - #[codec(index = 1)] - PrimaryAndSecondaryPlainSlots, - #[codec(index = 2)] - PrimaryAndSecondaryVRFSlots, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AllowedSlots { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `AllowedSlots`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(AllowedSlots::PrimarySlots) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AllowedSlots::PrimaryAndSecondaryPlainSlots, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AllowedSlots::PrimaryAndSecondaryVRFSlots, - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `AllowedSlots`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AllowedSlots { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - AllowedSlots::PrimarySlots => 0_usize, - AllowedSlots::PrimaryAndSecondaryPlainSlots => 0_usize, - AllowedSlots::PrimaryAndSecondaryVRFSlots => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - AllowedSlots::PrimarySlots => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - AllowedSlots::PrimaryAndSecondaryPlainSlots => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - AllowedSlots::PrimaryAndSecondaryVRFSlots => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AllowedSlots {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AllowedSlots { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AllowedSlots; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "PrimarySlots" { - return Ok(AllowedSlots::PrimarySlots); - } - if value.name() == "PrimaryAndSecondaryPlainSlots" { - return Ok(AllowedSlots::PrimaryAndSecondaryPlainSlots); - } - if value.name() == "PrimaryAndSecondaryVRFSlots" { - return Ok(AllowedSlots::PrimaryAndSecondaryVRFSlots); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "PrimarySlots", - "PrimaryAndSecondaryPlainSlots", - "PrimaryAndSecondaryVRFSlots", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AllowedSlots { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::PrimarySlots => { - ::subxt::ext::scale_encode::Variant { - name: "PrimarySlots", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PrimaryAndSecondaryPlainSlots => { - ::subxt::ext::scale_encode::Variant { - name: "PrimaryAndSecondaryPlainSlots", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PrimaryAndSecondaryVRFSlots => { - ::subxt::ext::scale_encode::Variant { - name: "PrimaryAndSecondaryVRFSlots", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AllowedSlots { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - AllowedSlots::PrimarySlots => "PrimarySlots", - AllowedSlots::PrimaryAndSecondaryPlainSlots => { - "PrimaryAndSecondaryPlainSlots" - } - AllowedSlots::PrimaryAndSecondaryVRFSlots => { - "PrimaryAndSecondaryVRFSlots" - } - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BabeEpochConfiguration { - pub c: (::core::primitive::u64, ::core::primitive::u64), - pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BabeEpochConfiguration { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(BabeEpochConfiguration { - c: { - let __codec_res_edqy = <( - ::core::primitive::u64, - ::core::primitive::u64, - ) as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BabeEpochConfiguration::c`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - allowed_slots: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BabeEpochConfiguration::allowed_slots`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BabeEpochConfiguration { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.c), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.allowed_slots), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.c, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.allowed_slots, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BabeEpochConfiguration {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for BabeEpochConfiguration { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BabeEpochConfiguration; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BabeEpochConfiguration { - c: { - let val = *vals - .get(&Some("c")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "c".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("c"))? - }, - allowed_slots: { - let val = *vals - .get(&Some("allowed_slots")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "allowed_slots".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("allowed_slots"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(BabeEpochConfiguration { - c: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("c"))? - }, - allowed_slots: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("allowed_slots"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for BabeEpochConfiguration { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for BabeEpochConfiguration { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BabeEpochConfiguration { c, allowed_slots } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("c"), - c as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("allowed_slots"), - allowed_slots - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for BabeEpochConfiguration { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BabeEpochConfiguration { c, allowed_slots } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("c"), - c as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("allowed_slots"), - allowed_slots - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BabeEpochConfiguration { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "BabeEpochConfiguration", - "c", - &self.c, - "allowed_slots", - &&self.allowed_slots, - ) - } - } - } - pub mod sp_consensus_grandpa { - use super::runtime_types; - pub mod app { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub runtime_types::sp_core::ed25519::Public); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Public { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Public({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Public.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Public { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Public {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Public { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Public; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Public({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Public { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Public { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Public { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Public { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Public", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Signature(pub runtime_types::sp_core::ed25519::Signature); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Signature { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Signature({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Signature.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Signature { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Signature {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Signature { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Signature; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Signature({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Signature { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Signature { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Signature(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Signature { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Signature(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Signature { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Signature", - &&self.0, - ) - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Equivocation<_0, _1> { - #[codec(index = 0)] - Prevote( - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_consensus_grandpa::app::Public, - runtime_types::finality_grandpa::Prevote<_0, _1>, - runtime_types::sp_consensus_grandpa::app::Signature, - >, - ), - #[codec(index = 1)] - Precommit( - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_consensus_grandpa::app::Public, - runtime_types::finality_grandpa::Precommit<_0, _1>, - runtime_types::sp_consensus_grandpa::app::Signature, - >, - ), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for Equivocation<_0, _1> - where - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_consensus_grandpa::app::Public, - runtime_types::finality_grandpa::Prevote<_0, _1>, - runtime_types::sp_consensus_grandpa::app::Signature, - >: ::subxt::ext::codec::Decode, - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_consensus_grandpa::app::Public, - runtime_types::finality_grandpa::Prevote<_0, _1>, - runtime_types::sp_consensus_grandpa::app::Signature, - >: ::subxt::ext::codec::Decode, - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_consensus_grandpa::app::Public, - runtime_types::finality_grandpa::Precommit<_0, _1>, - runtime_types::sp_consensus_grandpa::app::Signature, - >: ::subxt::ext::codec::Decode, - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_consensus_grandpa::app::Public, - runtime_types::finality_grandpa::Precommit<_0, _1>, - runtime_types::sp_consensus_grandpa::app::Signature, - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Equivocation`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Equivocation::< - _0, - _1, - >::Prevote({ - let __codec_res_edqy = , - runtime_types::sp_consensus_grandpa::app::Signature, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Equivocation::Prevote.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Equivocation::< - _0, - _1, - >::Precommit({ - let __codec_res_edqy = , - runtime_types::sp_consensus_grandpa::app::Signature, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Equivocation::Precommit.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Equivocation`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for Equivocation<_0, _1> - where - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_consensus_grandpa::app::Public, - runtime_types::finality_grandpa::Prevote<_0, _1>, - runtime_types::sp_consensus_grandpa::app::Signature, - >: ::subxt::ext::codec::Encode, - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_consensus_grandpa::app::Public, - runtime_types::finality_grandpa::Prevote<_0, _1>, - runtime_types::sp_consensus_grandpa::app::Signature, - >: ::subxt::ext::codec::Encode, - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_consensus_grandpa::app::Public, - runtime_types::finality_grandpa::Precommit<_0, _1>, - runtime_types::sp_consensus_grandpa::app::Signature, - >: ::subxt::ext::codec::Encode, - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_consensus_grandpa::app::Public, - runtime_types::finality_grandpa::Precommit<_0, _1>, - runtime_types::sp_consensus_grandpa::app::Signature, - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Equivocation::Prevote(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Equivocation::Precommit(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Equivocation::Prevote(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Equivocation::Precommit(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike for Equivocation<_0, _1> - where - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_consensus_grandpa::app::Public, - runtime_types::finality_grandpa::Prevote<_0, _1>, - runtime_types::sp_consensus_grandpa::app::Signature, - >: ::subxt::ext::codec::Encode, - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_consensus_grandpa::app::Public, - runtime_types::finality_grandpa::Prevote<_0, _1>, - runtime_types::sp_consensus_grandpa::app::Signature, - >: ::subxt::ext::codec::Encode, - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_consensus_grandpa::app::Public, - runtime_types::finality_grandpa::Precommit<_0, _1>, - runtime_types::sp_consensus_grandpa::app::Signature, - >: ::subxt::ext::codec::Encode, - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_consensus_grandpa::app::Public, - runtime_types::finality_grandpa::Precommit<_0, _1>, - runtime_types::sp_consensus_grandpa::app::Signature, - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for Equivocation<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Equivocation<_0, _1>; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Prevote" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Equivocation::Prevote({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Precommit" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Equivocation::Precommit({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Prevote", "Precommit"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for Equivocation<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Prevote(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Prevote", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Precommit(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Precommit", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for Equivocation<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Equivocation::Prevote(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Prevote", - &__self_0, - ) - } - Equivocation::Precommit(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Precommit", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct EquivocationProof<_0, _1> { - pub set_id: ::core::primitive::u64, - pub equivocation: runtime_types::sp_consensus_grandpa::Equivocation< - _0, - _1, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode - for EquivocationProof<_0, _1> - where - runtime_types::sp_consensus_grandpa::Equivocation< - _0, - _1, - >: ::subxt::ext::codec::Decode, - runtime_types::sp_consensus_grandpa::Equivocation< - _0, - _1, - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(EquivocationProof::<_0, _1> { - set_id: { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `EquivocationProof::set_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - equivocation: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `EquivocationProof::equivocation`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode - for EquivocationProof<_0, _1> - where - runtime_types::sp_consensus_grandpa::Equivocation< - _0, - _1, - >: ::subxt::ext::codec::Encode, - runtime_types::sp_consensus_grandpa::Equivocation< - _0, - _1, - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.set_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.equivocation), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.set_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.equivocation, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for EquivocationProof<_0, _1> - where - runtime_types::sp_consensus_grandpa::Equivocation< - _0, - _1, - >: ::subxt::ext::codec::Encode, - runtime_types::sp_consensus_grandpa::Equivocation< - _0, - _1, - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for EquivocationProof<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = EquivocationProof<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(EquivocationProof { - set_id: { - let val = *vals - .get(&Some("set_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "set_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("set_id"))? - }, - equivocation: { - let val = *vals - .get(&Some("equivocation")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "equivocation".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(EquivocationProof { - set_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("set_id"))? - }, - equivocation: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("equivocation"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for EquivocationProof<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for EquivocationProof<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EquivocationProof { set_id, equivocation } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("set_id"), - set_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("equivocation"), - equivocation - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for EquivocationProof<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EquivocationProof { set_id, equivocation } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("set_id"), - set_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("equivocation"), - equivocation - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for EquivocationProof<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "EquivocationProof", - "set_id", - &self.set_id, - "equivocation", - &&self.equivocation, - ) - } - } - } - pub mod sp_consensus_slots { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct EquivocationProof<_0, _1> { - pub offender: _1, - pub slot: runtime_types::sp_consensus_slots::Slot, - pub first_header: _0, - pub second_header: _0, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode - for EquivocationProof<_0, _1> - where - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(EquivocationProof::<_0, _1> { - offender: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `EquivocationProof::offender`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - slot: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `EquivocationProof::slot`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - first_header: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `EquivocationProof::first_header`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - second_header: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `EquivocationProof::second_header`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode - for EquivocationProof<_0, _1> - where - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.offender), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.slot), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.first_header), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.second_header), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.offender, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.slot, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.first_header, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.second_header, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for EquivocationProof<_0, _1> - where - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>(::core::marker::PhantomData<(_0, _1)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for EquivocationProof<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = EquivocationProof<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(EquivocationProof { - offender: { - let val = *vals - .get(&Some("offender")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "offender".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("offender"))? - }, - slot: { - let val = *vals - .get(&Some("slot")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "slot".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("slot"))? - }, - first_header: { - let val = *vals - .get(&Some("first_header")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "first_header".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("first_header"))? - }, - second_header: { - let val = *vals - .get(&Some("second_header")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "second_header".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("second_header"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = value; - Ok(EquivocationProof { - offender: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("offender"))? - }, - slot: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("slot"))? - }, - first_header: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("first_header"))? - }, - second_header: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("second_header"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for EquivocationProof<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for EquivocationProof<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EquivocationProof { - offender, - slot, - first_header, - second_header, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("offender"), - offender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slot"), - slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_header"), - first_header - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("second_header"), - second_header - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for EquivocationProof<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let EquivocationProof { - offender, - slot, - first_header, - second_header, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("offender"), - offender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("slot"), - slot as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("first_header"), - first_header - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("second_header"), - second_header - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug, _1: ::core::fmt::Debug> ::core::fmt::Debug - for EquivocationProof<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "EquivocationProof", - "offender", - &self.offender, - "slot", - &self.slot, - "first_header", - &self.first_header, - "second_header", - &&self.second_header, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Slot(pub ::core::primitive::u64); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::CompactAs for Slot { - type As = ::core::primitive::u64; - fn encode_as(&self) -> &::core::primitive::u64 { - &self.0 - } - fn decode_from( - x: ::core::primitive::u64, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Slot(x)) - } - } - #[automatically_derived] - impl From<::subxt::ext::codec::Compact> for Slot { - fn from(x: ::subxt::ext::codec::Compact) -> Slot { - x.0 - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Slot { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - Slot({ - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Slot.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Slot { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Slot {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Slot { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Slot; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Slot({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Slot { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Slot { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Slot(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Slot { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Slot(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Slot { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Slot", - &&self.0, - ) - } - } - } - pub mod sp_core { - use super::runtime_types; - pub mod crypto { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct KeyTypeId(pub [::core::primitive::u8; 4usize]); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for KeyTypeId { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - KeyTypeId({ - let __codec_res_edqy = <[::core::primitive::u8; 4usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `KeyTypeId.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for KeyTypeId { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for KeyTypeId {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for KeyTypeId { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = KeyTypeId; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - KeyTypeId({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for KeyTypeId { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for KeyTypeId { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let KeyTypeId(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for KeyTypeId { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let KeyTypeId(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for KeyTypeId { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "KeyTypeId", - &&self.0, - ) - } - } - } - pub mod ecdsa { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub [::core::primitive::u8; 33usize]); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Public { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Public({ - let __codec_res_edqy = <[::core::primitive::u8; 33usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Public.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Public { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Public {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Public { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Public; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Public({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Public { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Public { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Public { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Public { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Public", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Signature(pub [::core::primitive::u8; 65usize]); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Signature { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Signature({ - let __codec_res_edqy = <[::core::primitive::u8; 65usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Signature.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Signature { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Signature {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Signature { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Signature; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Signature({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Signature { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Signature { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Signature(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Signature { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Signature(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Signature { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Signature", - &&self.0, - ) - } - } - } - pub mod ed25519 { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub [::core::primitive::u8; 32usize]); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Public { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Public({ - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Public.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Public { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Public {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Public { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Public; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Public({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Public { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Public { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Public { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Public { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Public", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Signature(pub [::core::primitive::u8; 64usize]); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Signature { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Signature({ - let __codec_res_edqy = <[::core::primitive::u8; 64usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Signature.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Signature { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Signature {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Signature { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Signature; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Signature({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Signature { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Signature { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Signature(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Signature { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Signature(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Signature { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Signature", - &&self.0, - ) - } - } - } - pub mod offchain { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OpaqueMultiaddr( - pub ::std::vec::Vec<::core::primitive::u8>, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for OpaqueMultiaddr { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - OpaqueMultiaddr({ - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpaqueMultiaddr.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for OpaqueMultiaddr { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for OpaqueMultiaddr {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for OpaqueMultiaddr { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = OpaqueMultiaddr; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - OpaqueMultiaddr({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for OpaqueMultiaddr { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for OpaqueMultiaddr { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OpaqueMultiaddr(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for OpaqueMultiaddr { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OpaqueMultiaddr(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for OpaqueMultiaddr { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "OpaqueMultiaddr", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OpaqueNetworkState { - pub peer_id: runtime_types::sp_core::OpaquePeerId, - pub external_addresses: ::std::vec::Vec< - runtime_types::sp_core::offchain::OpaqueMultiaddr, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for OpaqueNetworkState { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(OpaqueNetworkState { - peer_id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpaqueNetworkState::peer_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - external_addresses: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::sp_core::offchain::OpaqueMultiaddr, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `OpaqueNetworkState::external_addresses`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for OpaqueNetworkState { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.peer_id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.external_addresses, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.peer_id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.external_addresses, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for OpaqueNetworkState {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for OpaqueNetworkState { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = OpaqueNetworkState; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(OpaqueNetworkState { - peer_id: { - let val = *vals - .get(&Some("peer_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "peer_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("peer_id"))? - }, - external_addresses: { - let val = *vals - .get(&Some("external_addresses")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "external_addresses".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("external_addresses"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(OpaqueNetworkState { - peer_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("peer_id"))? - }, - external_addresses: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("external_addresses"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for OpaqueNetworkState { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for OpaqueNetworkState { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OpaqueNetworkState { peer_id, external_addresses } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("peer_id"), - peer_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("external_addresses"), - external_addresses - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for OpaqueNetworkState { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OpaqueNetworkState { peer_id, external_addresses } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("peer_id"), - peer_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("external_addresses"), - external_addresses - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for OpaqueNetworkState { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "OpaqueNetworkState", - "peer_id", - &self.peer_id, - "external_addresses", - &&self.external_addresses, - ) - } - } - } - pub mod sr25519 { - use super::runtime_types; - pub mod vrf { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VrfSignature { - pub output: [::core::primitive::u8; 32usize], - pub proof: [::core::primitive::u8; 64usize], - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VrfSignature { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(VrfSignature { - output: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VrfSignature::output`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - proof: { - let __codec_res_edqy = <[::core::primitive::u8; 64usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VrfSignature::proof`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VrfSignature { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.output), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.proof), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.output, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.proof, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VrfSignature {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for VrfSignature { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VrfSignature; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(VrfSignature { - output: { - let val = *vals - .get(&Some("output")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "output".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("output"))? - }, - proof: { - let val = *vals - .get(&Some("proof")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proof".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proof"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(VrfSignature { - output: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("output"))? - }, - proof: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proof"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for VrfSignature { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for VrfSignature { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VrfSignature { output, proof } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("output"), - output as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proof"), - proof as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for VrfSignature { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let VrfSignature { output, proof } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("output"), - output as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proof"), - proof as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VrfSignature { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "VrfSignature", - "output", - &self.output, - "proof", - &&self.proof, - ) - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub [::core::primitive::u8; 32usize]); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Public { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Public({ - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Public.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Public { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Public {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Public { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Public; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Public({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Public { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Public { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Public { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Public(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Public { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Public", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Signature(pub [::core::primitive::u8; 64usize]); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Signature { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Signature({ - let __codec_res_edqy = <[::core::primitive::u8; 64usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Signature.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Signature { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Signature {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Signature { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Signature; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Signature({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Signature { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Signature { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Signature(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Signature { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Signature(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Signature { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Signature", - &&self.0, - ) - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OpaquePeerId(pub ::std::vec::Vec<::core::primitive::u8>); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for OpaquePeerId { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok( - OpaquePeerId({ - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OpaquePeerId.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for OpaquePeerId { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for OpaquePeerId {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for OpaquePeerId { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = OpaquePeerId; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - OpaquePeerId({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for OpaquePeerId { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for OpaquePeerId { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OpaquePeerId(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for OpaquePeerId { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OpaquePeerId(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for OpaquePeerId { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "OpaquePeerId", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Void {} - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Void { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Void`, failed to read variant byte", - ) - })? - { - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Void`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Void {} - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Void {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Void { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Void; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: ::alloc::vec::Vec::new(), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Void { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Void { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - unsafe { ::core::intrinsics::unreachable() } - } - } - } - pub mod sp_npos_elections { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ElectionScore { - pub minimal_stake: ::core::primitive::u128, - pub sum_stake: ::core::primitive::u128, - pub sum_stake_squared: ::core::primitive::u128, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ElectionScore { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ElectionScore { - minimal_stake: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ElectionScore::minimal_stake`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - sum_stake: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ElectionScore::sum_stake`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - sum_stake_squared: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `ElectionScore::sum_stake_squared`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ElectionScore { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.minimal_stake), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.sum_stake), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.sum_stake_squared, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.minimal_stake, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.sum_stake, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.sum_stake_squared, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ElectionScore {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ElectionScore { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ElectionScore; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ElectionScore { - minimal_stake: { - let val = *vals - .get(&Some("minimal_stake")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "minimal_stake".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("minimal_stake"))? - }, - sum_stake: { - let val = *vals - .get(&Some("sum_stake")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sum_stake".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sum_stake"))? - }, - sum_stake_squared: { - let val = *vals - .get(&Some("sum_stake_squared")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sum_stake_squared".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("sum_stake_squared"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(ElectionScore { - minimal_stake: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("minimal_stake"))? - }, - sum_stake: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sum_stake"))? - }, - sum_stake_squared: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("sum_stake_squared"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ElectionScore { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ElectionScore { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ElectionScore { - minimal_stake, - sum_stake, - sum_stake_squared, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("minimal_stake"), - minimal_stake - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("sum_stake"), - sum_stake as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("sum_stake_squared"), - sum_stake_squared - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ElectionScore { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ElectionScore { - minimal_stake, - sum_stake, - sum_stake_squared, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("minimal_stake"), - minimal_stake - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("sum_stake"), - sum_stake as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("sum_stake_squared"), - sum_stake_squared - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ElectionScore { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ElectionScore", - "minimal_stake", - &self.minimal_stake, - "sum_stake", - &self.sum_stake, - "sum_stake_squared", - &&self.sum_stake_squared, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Support<_0> { - pub total: ::core::primitive::u128, - pub voters: ::std::vec::Vec<(_0, ::core::primitive::u128)>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode for Support<_0> - where - ::std::vec::Vec< - (_0, ::core::primitive::u128), - >: ::subxt::ext::codec::Decode, - ::std::vec::Vec< - (_0, ::core::primitive::u128), - >: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(Support::<_0> { - total: { - let __codec_res_edqy = <::core::primitive::u128 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Support::total`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - voters: { - let __codec_res_edqy = <::std::vec::Vec< - (_0, ::core::primitive::u128), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Support::voters`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode for Support<_0> - where - ::std::vec::Vec< - (_0, ::core::primitive::u128), - >: ::subxt::ext::codec::Encode, - ::std::vec::Vec< - (_0, ::core::primitive::u128), - >: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.total), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.voters), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.total, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.voters, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike for Support<_0> - where - ::std::vec::Vec< - (_0, ::core::primitive::u128), - >: ::subxt::ext::codec::Encode, - ::std::vec::Vec< - (_0, ::core::primitive::u128), - >: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor for Support<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Support<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Support { - total: { - let val = *vals - .get(&Some("total")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "total".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("total"))? - }, - voters: { - let val = *vals - .get(&Some("voters")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "voters".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("voters"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Support { - total: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("total"))? - }, - voters: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("voters"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields for Support<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType for Support<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Support { total, voters } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("total"), - total as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("voters"), - voters as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields for Support<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Support { total, voters } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("total"), - total as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("voters"), - voters as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug for Support<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Support", - "total", - &self.total, - "voters", - &&self.voters, - ) - } - } - } - pub mod sp_runtime { - use super::runtime_types; - pub mod generic { - use super::runtime_types; - pub mod digest { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Digest { - pub logs: ::std::vec::Vec< - runtime_types::sp_runtime::generic::digest::DigestItem, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Digest { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Digest { - logs: { - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::sp_runtime::generic::digest::DigestItem, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Digest::logs`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Digest { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.logs) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.logs, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.logs) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.logs, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Digest {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Digest { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Digest; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Digest { - logs: { - let val = *vals - .get(&Some("logs")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "logs".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("logs"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(Digest { - logs: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("logs"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Digest { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Digest { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Digest { logs } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("logs"), - logs as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Digest { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Digest { logs } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("logs"), - logs as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Digest { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Digest", - "logs", - &&self.logs, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum DigestItem { - #[codec(index = 6)] - PreRuntime( - [::core::primitive::u8; 4usize], - ::std::vec::Vec<::core::primitive::u8>, - ), - #[codec(index = 4)] - Consensus( - [::core::primitive::u8; 4usize], - ::std::vec::Vec<::core::primitive::u8>, - ), - #[codec(index = 5)] - Seal( - [::core::primitive::u8; 4usize], - ::std::vec::Vec<::core::primitive::u8>, - ), - #[codec(index = 0)] - Other(::std::vec::Vec<::core::primitive::u8>), - #[codec(index = 8)] - RuntimeEnvironmentUpdated, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DigestItem { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `DigestItem`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - DigestItem::PreRuntime( - { - let __codec_res_edqy = <[::core::primitive::u8; 4usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DigestItem::PreRuntime.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DigestItem::PreRuntime.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - DigestItem::Consensus( - { - let __codec_res_edqy = <[::core::primitive::u8; 4usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DigestItem::Consensus.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DigestItem::Consensus.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - DigestItem::Seal( - { - let __codec_res_edqy = <[::core::primitive::u8; 4usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DigestItem::Seal.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DigestItem::Seal.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - DigestItem::Other({ - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DigestItem::Other.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - DigestItem::RuntimeEnvironmentUpdated, - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `DigestItem`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DigestItem { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - DigestItem::PreRuntime(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - DigestItem::Consensus(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - DigestItem::Seal(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - DigestItem::Other(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - DigestItem::RuntimeEnvironmentUpdated => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - DigestItem::PreRuntime(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - DigestItem::Consensus(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - DigestItem::Seal(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - DigestItem::Other(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - DigestItem::RuntimeEnvironmentUpdated => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DigestItem {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for DigestItem { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DigestItem; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "PreRuntime" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - DigestItem::PreRuntime( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "Consensus" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - DigestItem::Consensus( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "Seal" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - DigestItem::Seal( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "Other" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - DigestItem::Other({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "RuntimeEnvironmentUpdated" { - return Ok(DigestItem::RuntimeEnvironmentUpdated); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "PreRuntime", - "Consensus", - "Seal", - "Other", - "RuntimeEnvironmentUpdated", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DigestItem { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::PreRuntime(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "PreRuntime", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Consensus(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "Consensus", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Seal(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "Seal", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Other(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Other", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::RuntimeEnvironmentUpdated => { - ::subxt::ext::scale_encode::Variant { - name: "RuntimeEnvironmentUpdated", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DigestItem { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - DigestItem::PreRuntime(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "PreRuntime", - __self_0, - &__self_1, - ) - } - DigestItem::Consensus(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "Consensus", - __self_0, - &__self_1, - ) - } - DigestItem::Seal(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "Seal", - __self_0, - &__self_1, - ) - } - DigestItem::Other(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Other", - &__self_0, - ) - } - DigestItem::RuntimeEnvironmentUpdated => { - ::core::fmt::Formatter::write_str( - f, - "RuntimeEnvironmentUpdated", - ) - } - } - } - } - } - pub mod era { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Era { - #[codec(index = 0)] - Immortal, - #[codec(index = 1)] - Mortal1(::core::primitive::u8), - #[codec(index = 2)] - Mortal2(::core::primitive::u8), - #[codec(index = 3)] - Mortal3(::core::primitive::u8), - #[codec(index = 4)] - Mortal4(::core::primitive::u8), - #[codec(index = 5)] - Mortal5(::core::primitive::u8), - #[codec(index = 6)] - Mortal6(::core::primitive::u8), - #[codec(index = 7)] - Mortal7(::core::primitive::u8), - #[codec(index = 8)] - Mortal8(::core::primitive::u8), - #[codec(index = 9)] - Mortal9(::core::primitive::u8), - #[codec(index = 10)] - Mortal10(::core::primitive::u8), - #[codec(index = 11)] - Mortal11(::core::primitive::u8), - #[codec(index = 12)] - Mortal12(::core::primitive::u8), - #[codec(index = 13)] - Mortal13(::core::primitive::u8), - #[codec(index = 14)] - Mortal14(::core::primitive::u8), - #[codec(index = 15)] - Mortal15(::core::primitive::u8), - #[codec(index = 16)] - Mortal16(::core::primitive::u8), - #[codec(index = 17)] - Mortal17(::core::primitive::u8), - #[codec(index = 18)] - Mortal18(::core::primitive::u8), - #[codec(index = 19)] - Mortal19(::core::primitive::u8), - #[codec(index = 20)] - Mortal20(::core::primitive::u8), - #[codec(index = 21)] - Mortal21(::core::primitive::u8), - #[codec(index = 22)] - Mortal22(::core::primitive::u8), - #[codec(index = 23)] - Mortal23(::core::primitive::u8), - #[codec(index = 24)] - Mortal24(::core::primitive::u8), - #[codec(index = 25)] - Mortal25(::core::primitive::u8), - #[codec(index = 26)] - Mortal26(::core::primitive::u8), - #[codec(index = 27)] - Mortal27(::core::primitive::u8), - #[codec(index = 28)] - Mortal28(::core::primitive::u8), - #[codec(index = 29)] - Mortal29(::core::primitive::u8), - #[codec(index = 30)] - Mortal30(::core::primitive::u8), - #[codec(index = 31)] - Mortal31(::core::primitive::u8), - #[codec(index = 32)] - Mortal32(::core::primitive::u8), - #[codec(index = 33)] - Mortal33(::core::primitive::u8), - #[codec(index = 34)] - Mortal34(::core::primitive::u8), - #[codec(index = 35)] - Mortal35(::core::primitive::u8), - #[codec(index = 36)] - Mortal36(::core::primitive::u8), - #[codec(index = 37)] - Mortal37(::core::primitive::u8), - #[codec(index = 38)] - Mortal38(::core::primitive::u8), - #[codec(index = 39)] - Mortal39(::core::primitive::u8), - #[codec(index = 40)] - Mortal40(::core::primitive::u8), - #[codec(index = 41)] - Mortal41(::core::primitive::u8), - #[codec(index = 42)] - Mortal42(::core::primitive::u8), - #[codec(index = 43)] - Mortal43(::core::primitive::u8), - #[codec(index = 44)] - Mortal44(::core::primitive::u8), - #[codec(index = 45)] - Mortal45(::core::primitive::u8), - #[codec(index = 46)] - Mortal46(::core::primitive::u8), - #[codec(index = 47)] - Mortal47(::core::primitive::u8), - #[codec(index = 48)] - Mortal48(::core::primitive::u8), - #[codec(index = 49)] - Mortal49(::core::primitive::u8), - #[codec(index = 50)] - Mortal50(::core::primitive::u8), - #[codec(index = 51)] - Mortal51(::core::primitive::u8), - #[codec(index = 52)] - Mortal52(::core::primitive::u8), - #[codec(index = 53)] - Mortal53(::core::primitive::u8), - #[codec(index = 54)] - Mortal54(::core::primitive::u8), - #[codec(index = 55)] - Mortal55(::core::primitive::u8), - #[codec(index = 56)] - Mortal56(::core::primitive::u8), - #[codec(index = 57)] - Mortal57(::core::primitive::u8), - #[codec(index = 58)] - Mortal58(::core::primitive::u8), - #[codec(index = 59)] - Mortal59(::core::primitive::u8), - #[codec(index = 60)] - Mortal60(::core::primitive::u8), - #[codec(index = 61)] - Mortal61(::core::primitive::u8), - #[codec(index = 62)] - Mortal62(::core::primitive::u8), - #[codec(index = 63)] - Mortal63(::core::primitive::u8), - #[codec(index = 64)] - Mortal64(::core::primitive::u8), - #[codec(index = 65)] - Mortal65(::core::primitive::u8), - #[codec(index = 66)] - Mortal66(::core::primitive::u8), - #[codec(index = 67)] - Mortal67(::core::primitive::u8), - #[codec(index = 68)] - Mortal68(::core::primitive::u8), - #[codec(index = 69)] - Mortal69(::core::primitive::u8), - #[codec(index = 70)] - Mortal70(::core::primitive::u8), - #[codec(index = 71)] - Mortal71(::core::primitive::u8), - #[codec(index = 72)] - Mortal72(::core::primitive::u8), - #[codec(index = 73)] - Mortal73(::core::primitive::u8), - #[codec(index = 74)] - Mortal74(::core::primitive::u8), - #[codec(index = 75)] - Mortal75(::core::primitive::u8), - #[codec(index = 76)] - Mortal76(::core::primitive::u8), - #[codec(index = 77)] - Mortal77(::core::primitive::u8), - #[codec(index = 78)] - Mortal78(::core::primitive::u8), - #[codec(index = 79)] - Mortal79(::core::primitive::u8), - #[codec(index = 80)] - Mortal80(::core::primitive::u8), - #[codec(index = 81)] - Mortal81(::core::primitive::u8), - #[codec(index = 82)] - Mortal82(::core::primitive::u8), - #[codec(index = 83)] - Mortal83(::core::primitive::u8), - #[codec(index = 84)] - Mortal84(::core::primitive::u8), - #[codec(index = 85)] - Mortal85(::core::primitive::u8), - #[codec(index = 86)] - Mortal86(::core::primitive::u8), - #[codec(index = 87)] - Mortal87(::core::primitive::u8), - #[codec(index = 88)] - Mortal88(::core::primitive::u8), - #[codec(index = 89)] - Mortal89(::core::primitive::u8), - #[codec(index = 90)] - Mortal90(::core::primitive::u8), - #[codec(index = 91)] - Mortal91(::core::primitive::u8), - #[codec(index = 92)] - Mortal92(::core::primitive::u8), - #[codec(index = 93)] - Mortal93(::core::primitive::u8), - #[codec(index = 94)] - Mortal94(::core::primitive::u8), - #[codec(index = 95)] - Mortal95(::core::primitive::u8), - #[codec(index = 96)] - Mortal96(::core::primitive::u8), - #[codec(index = 97)] - Mortal97(::core::primitive::u8), - #[codec(index = 98)] - Mortal98(::core::primitive::u8), - #[codec(index = 99)] - Mortal99(::core::primitive::u8), - #[codec(index = 100)] - Mortal100(::core::primitive::u8), - #[codec(index = 101)] - Mortal101(::core::primitive::u8), - #[codec(index = 102)] - Mortal102(::core::primitive::u8), - #[codec(index = 103)] - Mortal103(::core::primitive::u8), - #[codec(index = 104)] - Mortal104(::core::primitive::u8), - #[codec(index = 105)] - Mortal105(::core::primitive::u8), - #[codec(index = 106)] - Mortal106(::core::primitive::u8), - #[codec(index = 107)] - Mortal107(::core::primitive::u8), - #[codec(index = 108)] - Mortal108(::core::primitive::u8), - #[codec(index = 109)] - Mortal109(::core::primitive::u8), - #[codec(index = 110)] - Mortal110(::core::primitive::u8), - #[codec(index = 111)] - Mortal111(::core::primitive::u8), - #[codec(index = 112)] - Mortal112(::core::primitive::u8), - #[codec(index = 113)] - Mortal113(::core::primitive::u8), - #[codec(index = 114)] - Mortal114(::core::primitive::u8), - #[codec(index = 115)] - Mortal115(::core::primitive::u8), - #[codec(index = 116)] - Mortal116(::core::primitive::u8), - #[codec(index = 117)] - Mortal117(::core::primitive::u8), - #[codec(index = 118)] - Mortal118(::core::primitive::u8), - #[codec(index = 119)] - Mortal119(::core::primitive::u8), - #[codec(index = 120)] - Mortal120(::core::primitive::u8), - #[codec(index = 121)] - Mortal121(::core::primitive::u8), - #[codec(index = 122)] - Mortal122(::core::primitive::u8), - #[codec(index = 123)] - Mortal123(::core::primitive::u8), - #[codec(index = 124)] - Mortal124(::core::primitive::u8), - #[codec(index = 125)] - Mortal125(::core::primitive::u8), - #[codec(index = 126)] - Mortal126(::core::primitive::u8), - #[codec(index = 127)] - Mortal127(::core::primitive::u8), - #[codec(index = 128)] - Mortal128(::core::primitive::u8), - #[codec(index = 129)] - Mortal129(::core::primitive::u8), - #[codec(index = 130)] - Mortal130(::core::primitive::u8), - #[codec(index = 131)] - Mortal131(::core::primitive::u8), - #[codec(index = 132)] - Mortal132(::core::primitive::u8), - #[codec(index = 133)] - Mortal133(::core::primitive::u8), - #[codec(index = 134)] - Mortal134(::core::primitive::u8), - #[codec(index = 135)] - Mortal135(::core::primitive::u8), - #[codec(index = 136)] - Mortal136(::core::primitive::u8), - #[codec(index = 137)] - Mortal137(::core::primitive::u8), - #[codec(index = 138)] - Mortal138(::core::primitive::u8), - #[codec(index = 139)] - Mortal139(::core::primitive::u8), - #[codec(index = 140)] - Mortal140(::core::primitive::u8), - #[codec(index = 141)] - Mortal141(::core::primitive::u8), - #[codec(index = 142)] - Mortal142(::core::primitive::u8), - #[codec(index = 143)] - Mortal143(::core::primitive::u8), - #[codec(index = 144)] - Mortal144(::core::primitive::u8), - #[codec(index = 145)] - Mortal145(::core::primitive::u8), - #[codec(index = 146)] - Mortal146(::core::primitive::u8), - #[codec(index = 147)] - Mortal147(::core::primitive::u8), - #[codec(index = 148)] - Mortal148(::core::primitive::u8), - #[codec(index = 149)] - Mortal149(::core::primitive::u8), - #[codec(index = 150)] - Mortal150(::core::primitive::u8), - #[codec(index = 151)] - Mortal151(::core::primitive::u8), - #[codec(index = 152)] - Mortal152(::core::primitive::u8), - #[codec(index = 153)] - Mortal153(::core::primitive::u8), - #[codec(index = 154)] - Mortal154(::core::primitive::u8), - #[codec(index = 155)] - Mortal155(::core::primitive::u8), - #[codec(index = 156)] - Mortal156(::core::primitive::u8), - #[codec(index = 157)] - Mortal157(::core::primitive::u8), - #[codec(index = 158)] - Mortal158(::core::primitive::u8), - #[codec(index = 159)] - Mortal159(::core::primitive::u8), - #[codec(index = 160)] - Mortal160(::core::primitive::u8), - #[codec(index = 161)] - Mortal161(::core::primitive::u8), - #[codec(index = 162)] - Mortal162(::core::primitive::u8), - #[codec(index = 163)] - Mortal163(::core::primitive::u8), - #[codec(index = 164)] - Mortal164(::core::primitive::u8), - #[codec(index = 165)] - Mortal165(::core::primitive::u8), - #[codec(index = 166)] - Mortal166(::core::primitive::u8), - #[codec(index = 167)] - Mortal167(::core::primitive::u8), - #[codec(index = 168)] - Mortal168(::core::primitive::u8), - #[codec(index = 169)] - Mortal169(::core::primitive::u8), - #[codec(index = 170)] - Mortal170(::core::primitive::u8), - #[codec(index = 171)] - Mortal171(::core::primitive::u8), - #[codec(index = 172)] - Mortal172(::core::primitive::u8), - #[codec(index = 173)] - Mortal173(::core::primitive::u8), - #[codec(index = 174)] - Mortal174(::core::primitive::u8), - #[codec(index = 175)] - Mortal175(::core::primitive::u8), - #[codec(index = 176)] - Mortal176(::core::primitive::u8), - #[codec(index = 177)] - Mortal177(::core::primitive::u8), - #[codec(index = 178)] - Mortal178(::core::primitive::u8), - #[codec(index = 179)] - Mortal179(::core::primitive::u8), - #[codec(index = 180)] - Mortal180(::core::primitive::u8), - #[codec(index = 181)] - Mortal181(::core::primitive::u8), - #[codec(index = 182)] - Mortal182(::core::primitive::u8), - #[codec(index = 183)] - Mortal183(::core::primitive::u8), - #[codec(index = 184)] - Mortal184(::core::primitive::u8), - #[codec(index = 185)] - Mortal185(::core::primitive::u8), - #[codec(index = 186)] - Mortal186(::core::primitive::u8), - #[codec(index = 187)] - Mortal187(::core::primitive::u8), - #[codec(index = 188)] - Mortal188(::core::primitive::u8), - #[codec(index = 189)] - Mortal189(::core::primitive::u8), - #[codec(index = 190)] - Mortal190(::core::primitive::u8), - #[codec(index = 191)] - Mortal191(::core::primitive::u8), - #[codec(index = 192)] - Mortal192(::core::primitive::u8), - #[codec(index = 193)] - Mortal193(::core::primitive::u8), - #[codec(index = 194)] - Mortal194(::core::primitive::u8), - #[codec(index = 195)] - Mortal195(::core::primitive::u8), - #[codec(index = 196)] - Mortal196(::core::primitive::u8), - #[codec(index = 197)] - Mortal197(::core::primitive::u8), - #[codec(index = 198)] - Mortal198(::core::primitive::u8), - #[codec(index = 199)] - Mortal199(::core::primitive::u8), - #[codec(index = 200)] - Mortal200(::core::primitive::u8), - #[codec(index = 201)] - Mortal201(::core::primitive::u8), - #[codec(index = 202)] - Mortal202(::core::primitive::u8), - #[codec(index = 203)] - Mortal203(::core::primitive::u8), - #[codec(index = 204)] - Mortal204(::core::primitive::u8), - #[codec(index = 205)] - Mortal205(::core::primitive::u8), - #[codec(index = 206)] - Mortal206(::core::primitive::u8), - #[codec(index = 207)] - Mortal207(::core::primitive::u8), - #[codec(index = 208)] - Mortal208(::core::primitive::u8), - #[codec(index = 209)] - Mortal209(::core::primitive::u8), - #[codec(index = 210)] - Mortal210(::core::primitive::u8), - #[codec(index = 211)] - Mortal211(::core::primitive::u8), - #[codec(index = 212)] - Mortal212(::core::primitive::u8), - #[codec(index = 213)] - Mortal213(::core::primitive::u8), - #[codec(index = 214)] - Mortal214(::core::primitive::u8), - #[codec(index = 215)] - Mortal215(::core::primitive::u8), - #[codec(index = 216)] - Mortal216(::core::primitive::u8), - #[codec(index = 217)] - Mortal217(::core::primitive::u8), - #[codec(index = 218)] - Mortal218(::core::primitive::u8), - #[codec(index = 219)] - Mortal219(::core::primitive::u8), - #[codec(index = 220)] - Mortal220(::core::primitive::u8), - #[codec(index = 221)] - Mortal221(::core::primitive::u8), - #[codec(index = 222)] - Mortal222(::core::primitive::u8), - #[codec(index = 223)] - Mortal223(::core::primitive::u8), - #[codec(index = 224)] - Mortal224(::core::primitive::u8), - #[codec(index = 225)] - Mortal225(::core::primitive::u8), - #[codec(index = 226)] - Mortal226(::core::primitive::u8), - #[codec(index = 227)] - Mortal227(::core::primitive::u8), - #[codec(index = 228)] - Mortal228(::core::primitive::u8), - #[codec(index = 229)] - Mortal229(::core::primitive::u8), - #[codec(index = 230)] - Mortal230(::core::primitive::u8), - #[codec(index = 231)] - Mortal231(::core::primitive::u8), - #[codec(index = 232)] - Mortal232(::core::primitive::u8), - #[codec(index = 233)] - Mortal233(::core::primitive::u8), - #[codec(index = 234)] - Mortal234(::core::primitive::u8), - #[codec(index = 235)] - Mortal235(::core::primitive::u8), - #[codec(index = 236)] - Mortal236(::core::primitive::u8), - #[codec(index = 237)] - Mortal237(::core::primitive::u8), - #[codec(index = 238)] - Mortal238(::core::primitive::u8), - #[codec(index = 239)] - Mortal239(::core::primitive::u8), - #[codec(index = 240)] - Mortal240(::core::primitive::u8), - #[codec(index = 241)] - Mortal241(::core::primitive::u8), - #[codec(index = 242)] - Mortal242(::core::primitive::u8), - #[codec(index = 243)] - Mortal243(::core::primitive::u8), - #[codec(index = 244)] - Mortal244(::core::primitive::u8), - #[codec(index = 245)] - Mortal245(::core::primitive::u8), - #[codec(index = 246)] - Mortal246(::core::primitive::u8), - #[codec(index = 247)] - Mortal247(::core::primitive::u8), - #[codec(index = 248)] - Mortal248(::core::primitive::u8), - #[codec(index = 249)] - Mortal249(::core::primitive::u8), - #[codec(index = 250)] - Mortal250(::core::primitive::u8), - #[codec(index = 251)] - Mortal251(::core::primitive::u8), - #[codec(index = 252)] - Mortal252(::core::primitive::u8), - #[codec(index = 253)] - Mortal253(::core::primitive::u8), - #[codec(index = 254)] - Mortal254(::core::primitive::u8), - #[codec(index = 255)] - Mortal255(::core::primitive::u8), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Era { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Era`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Era::Immortal) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal1({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal1.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal2({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal2.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal3({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal3.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal4({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal4.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal5({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal5.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal6({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal6.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal7({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal7.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal8({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal8.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal9({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal9.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal10({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal10.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal11({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal11.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal12({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal12.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal13({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal13.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal14({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal14.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal15({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal15.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal16({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal16.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal17({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal17.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal18({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal18.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal19({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal19.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal20({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal20.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal21({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal21.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 22u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal22({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal22.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 23u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal23({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal23.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 24u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal24({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal24.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 25u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal25({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal25.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 26u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal26({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal26.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 27u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal27({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal27.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 28u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal28({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal28.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 29u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal29({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal29.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 30u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal30({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal30.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 31u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal31({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal31.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 32u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal32({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal32.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 33u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal33({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal33.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 34u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal34({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal34.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 35u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal35({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal35.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 36u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal36({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal36.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 37u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal37({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal37.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 38u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal38({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal38.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 39u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal39({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal39.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 40u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal40({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal40.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 41u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal41({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal41.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 42u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal42({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal42.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 43u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal43({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal43.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 44u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal44({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal44.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 45u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal45({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal45.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 46u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal46({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal46.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 47u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal47({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal47.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 48u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal48({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal48.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 49u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal49({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal49.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 50u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal50({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal50.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 51u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal51({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal51.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 52u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal52({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal52.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 53u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal53({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal53.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 54u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal54({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal54.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 55u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal55({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal55.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 56u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal56({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal56.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 57u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal57({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal57.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 58u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal58({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal58.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 59u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal59({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal59.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 60u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal60({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal60.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 61u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal61({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal61.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 62u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal62({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal62.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 63u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal63({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal63.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 64u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal64({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal64.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 65u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal65({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal65.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 66u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal66({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal66.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 67u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal67({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal67.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 68u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal68({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal68.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 69u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal69({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal69.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 70u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal70({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal70.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 71u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal71({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal71.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 72u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal72({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal72.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 73u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal73({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal73.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 74u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal74({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal74.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 75u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal75({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal75.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 76u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal76({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal76.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 77u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal77({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal77.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 78u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal78({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal78.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 79u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal79({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal79.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 80u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal80({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal80.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 81u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal81({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal81.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 82u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal82({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal82.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 83u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal83({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal83.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 84u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal84({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal84.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 85u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal85({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal85.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 86u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal86({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal86.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 87u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal87({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal87.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 88u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal88({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal88.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 89u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal89({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal89.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 90u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal90({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal90.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 91u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal91({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal91.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 92u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal92({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal92.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 93u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal93({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal93.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 94u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal94({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal94.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 95u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal95({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal95.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 96u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal96({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal96.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 97u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal97({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal97.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 98u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal98({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal98.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 99u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal99({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal99.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 100u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal100({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal100.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 101u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal101({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal101.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 102u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal102({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal102.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 103u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal103({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal103.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 104u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal104({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal104.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 105u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal105({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal105.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 106u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal106({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal106.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 107u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal107({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal107.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 108u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal108({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal108.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 109u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal109({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal109.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 110u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal110({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal110.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 111u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal111({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal111.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 112u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal112({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal112.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 113u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal113({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal113.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 114u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal114({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal114.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 115u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal115({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal115.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 116u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal116({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal116.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 117u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal117({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal117.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 118u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal118({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal118.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 119u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal119({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal119.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 120u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal120({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal120.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 121u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal121({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal121.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 122u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal122({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal122.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 123u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal123({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal123.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 124u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal124({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal124.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 125u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal125({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal125.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 126u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal126({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal126.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 127u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal127({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal127.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 128u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal128({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal128.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 129u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal129({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal129.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 130u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal130({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal130.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 131u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal131({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal131.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 132u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal132({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal132.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 133u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal133({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal133.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 134u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal134({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal134.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 135u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal135({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal135.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 136u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal136({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal136.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 137u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal137({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal137.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 138u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal138({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal138.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 139u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal139({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal139.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 140u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal140({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal140.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 141u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal141({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal141.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 142u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal142({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal142.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 143u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal143({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal143.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 144u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal144({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal144.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 145u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal145({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal145.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 146u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal146({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal146.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 147u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal147({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal147.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 148u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal148({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal148.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 149u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal149({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal149.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 150u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal150({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal150.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 151u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal151({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal151.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 152u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal152({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal152.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 153u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal153({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal153.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 154u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal154({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal154.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 155u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal155({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal155.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 156u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal156({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal156.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 157u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal157({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal157.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 158u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal158({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal158.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 159u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal159({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal159.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 160u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal160({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal160.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 161u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal161({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal161.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 162u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal162({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal162.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 163u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal163({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal163.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 164u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal164({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal164.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 165u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal165({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal165.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 166u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal166({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal166.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 167u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal167({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal167.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 168u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal168({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal168.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 169u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal169({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal169.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 170u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal170({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal170.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 171u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal171({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal171.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 172u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal172({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal172.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 173u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal173({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal173.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 174u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal174({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal174.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 175u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal175({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal175.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 176u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal176({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal176.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 177u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal177({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal177.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 178u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal178({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal178.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 179u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal179({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal179.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 180u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal180({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal180.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 181u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal181({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal181.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 182u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal182({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal182.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 183u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal183({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal183.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 184u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal184({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal184.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 185u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal185({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal185.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 186u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal186({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal186.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 187u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal187({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal187.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 188u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal188({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal188.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 189u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal189({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal189.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 190u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal190({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal190.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 191u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal191({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal191.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 192u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal192({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal192.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 193u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal193({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal193.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 194u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal194({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal194.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 195u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal195({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal195.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 196u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal196({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal196.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 197u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal197({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal197.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 198u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal198({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal198.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 199u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal199({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal199.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 200u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal200({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal200.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 201u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal201({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal201.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 202u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal202({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal202.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 203u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal203({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal203.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 204u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal204({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal204.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 205u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal205({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal205.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 206u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal206({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal206.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 207u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal207({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal207.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 208u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal208({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal208.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 209u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal209({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal209.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 210u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal210({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal210.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 211u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal211({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal211.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 212u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal212({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal212.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 213u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal213({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal213.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 214u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal214({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal214.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 215u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal215({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal215.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 216u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal216({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal216.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 217u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal217({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal217.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 218u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal218({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal218.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 219u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal219({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal219.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 220u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal220({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal220.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 221u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal221({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal221.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 222u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal222({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal222.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 223u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal223({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal223.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 224u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal224({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal224.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 225u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal225({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal225.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 226u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal226({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal226.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 227u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal227({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal227.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 228u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal228({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal228.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 229u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal229({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal229.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 230u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal230({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal230.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 231u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal231({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal231.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 232u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal232({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal232.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 233u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal233({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal233.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 234u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal234({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal234.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 235u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal235({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal235.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 236u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal236({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal236.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 237u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal237({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal237.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 238u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal238({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal238.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 239u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal239({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal239.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 240u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal240({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal240.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 241u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal241({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal241.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 242u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal242({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal242.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 243u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal243({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal243.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 244u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal244({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal244.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 245u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal245({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal245.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 246u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal246({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal246.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 247u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal247({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal247.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 248u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal248({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal248.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 249u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal249({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal249.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 250u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal250({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal250.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 251u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal251({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal251.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 252u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal252({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal252.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 253u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal253({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal253.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 254u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal254({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal254.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 255u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Era::Mortal255({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Era::Mortal255.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Era`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Era { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Era::Immortal => 0_usize, - Era::Mortal1(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal2(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal3(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal4(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal5(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal6(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal7(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal8(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal9(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal10(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal11(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal12(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal13(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal14(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal15(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal16(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal17(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal18(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal19(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal20(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal21(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal22(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal23(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal24(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal25(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal26(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal27(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal28(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal29(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal30(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal31(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal32(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal33(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal34(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal35(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal36(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal37(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal38(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal39(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal40(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal41(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal42(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal43(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal44(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal45(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal46(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal47(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal48(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal49(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal50(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal51(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal52(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal53(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal54(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal55(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal56(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal57(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal58(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal59(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal60(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal61(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal62(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal63(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal64(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal65(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal66(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal67(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal68(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal69(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal70(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal71(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal72(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal73(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal74(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal75(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal76(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal77(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal78(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal79(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal80(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal81(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal82(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal83(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal84(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal85(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal86(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal87(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal88(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal89(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal90(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal91(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal92(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal93(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal94(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal95(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal96(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal97(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal98(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal99(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal100(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal101(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal102(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal103(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal104(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal105(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal106(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal107(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal108(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal109(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal110(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal111(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal112(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal113(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal114(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal115(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal116(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal117(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal118(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal119(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal120(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal121(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal122(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal123(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal124(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal125(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal126(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal127(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal128(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal129(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal130(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal131(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal132(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal133(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal134(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal135(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal136(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal137(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal138(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal139(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal140(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal141(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal142(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal143(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal144(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal145(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal146(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal147(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal148(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal149(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal150(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal151(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal152(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal153(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal154(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal155(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal156(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal157(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal158(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal159(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal160(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal161(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal162(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal163(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal164(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal165(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal166(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal167(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal168(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal169(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal170(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal171(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal172(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal173(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal174(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal175(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal176(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal177(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal178(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal179(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal180(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal181(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal182(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal183(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal184(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal185(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal186(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal187(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal188(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal189(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal190(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal191(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal192(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal193(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal194(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal195(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal196(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal197(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal198(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal199(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal200(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal201(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal202(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal203(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal204(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal205(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal206(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal207(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal208(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal209(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal210(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal211(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal212(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal213(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal214(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal215(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal216(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal217(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal218(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal219(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal220(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal221(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal222(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal223(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal224(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal225(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal226(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal227(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal228(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal229(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal230(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal231(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal232(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal233(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal234(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal235(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal236(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal237(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal238(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal239(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal240(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal241(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal242(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal243(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal244(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal245(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal246(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal247(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal248(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal249(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal250(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal251(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal252(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal253(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal254(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Era::Mortal255(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Era::Immortal => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Era::Mortal1(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal2(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal3(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal4(ref aa) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal5(ref aa) => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal6(ref aa) => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal7(ref aa) => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal8(ref aa) => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal9(ref aa) => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal10(ref aa) => { - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal11(ref aa) => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal12(ref aa) => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal13(ref aa) => { - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal14(ref aa) => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal15(ref aa) => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal16(ref aa) => { - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal17(ref aa) => { - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal18(ref aa) => { - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal19(ref aa) => { - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal20(ref aa) => { - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal21(ref aa) => { - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal22(ref aa) => { - __codec_dest_edqy.push_byte(22u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal23(ref aa) => { - __codec_dest_edqy.push_byte(23u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal24(ref aa) => { - __codec_dest_edqy.push_byte(24u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal25(ref aa) => { - __codec_dest_edqy.push_byte(25u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal26(ref aa) => { - __codec_dest_edqy.push_byte(26u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal27(ref aa) => { - __codec_dest_edqy.push_byte(27u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal28(ref aa) => { - __codec_dest_edqy.push_byte(28u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal29(ref aa) => { - __codec_dest_edqy.push_byte(29u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal30(ref aa) => { - __codec_dest_edqy.push_byte(30u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal31(ref aa) => { - __codec_dest_edqy.push_byte(31u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal32(ref aa) => { - __codec_dest_edqy.push_byte(32u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal33(ref aa) => { - __codec_dest_edqy.push_byte(33u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal34(ref aa) => { - __codec_dest_edqy.push_byte(34u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal35(ref aa) => { - __codec_dest_edqy.push_byte(35u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal36(ref aa) => { - __codec_dest_edqy.push_byte(36u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal37(ref aa) => { - __codec_dest_edqy.push_byte(37u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal38(ref aa) => { - __codec_dest_edqy.push_byte(38u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal39(ref aa) => { - __codec_dest_edqy.push_byte(39u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal40(ref aa) => { - __codec_dest_edqy.push_byte(40u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal41(ref aa) => { - __codec_dest_edqy.push_byte(41u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal42(ref aa) => { - __codec_dest_edqy.push_byte(42u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal43(ref aa) => { - __codec_dest_edqy.push_byte(43u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal44(ref aa) => { - __codec_dest_edqy.push_byte(44u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal45(ref aa) => { - __codec_dest_edqy.push_byte(45u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal46(ref aa) => { - __codec_dest_edqy.push_byte(46u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal47(ref aa) => { - __codec_dest_edqy.push_byte(47u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal48(ref aa) => { - __codec_dest_edqy.push_byte(48u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal49(ref aa) => { - __codec_dest_edqy.push_byte(49u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal50(ref aa) => { - __codec_dest_edqy.push_byte(50u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal51(ref aa) => { - __codec_dest_edqy.push_byte(51u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal52(ref aa) => { - __codec_dest_edqy.push_byte(52u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal53(ref aa) => { - __codec_dest_edqy.push_byte(53u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal54(ref aa) => { - __codec_dest_edqy.push_byte(54u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal55(ref aa) => { - __codec_dest_edqy.push_byte(55u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal56(ref aa) => { - __codec_dest_edqy.push_byte(56u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal57(ref aa) => { - __codec_dest_edqy.push_byte(57u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal58(ref aa) => { - __codec_dest_edqy.push_byte(58u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal59(ref aa) => { - __codec_dest_edqy.push_byte(59u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal60(ref aa) => { - __codec_dest_edqy.push_byte(60u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal61(ref aa) => { - __codec_dest_edqy.push_byte(61u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal62(ref aa) => { - __codec_dest_edqy.push_byte(62u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal63(ref aa) => { - __codec_dest_edqy.push_byte(63u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal64(ref aa) => { - __codec_dest_edqy.push_byte(64u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal65(ref aa) => { - __codec_dest_edqy.push_byte(65u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal66(ref aa) => { - __codec_dest_edqy.push_byte(66u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal67(ref aa) => { - __codec_dest_edqy.push_byte(67u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal68(ref aa) => { - __codec_dest_edqy.push_byte(68u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal69(ref aa) => { - __codec_dest_edqy.push_byte(69u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal70(ref aa) => { - __codec_dest_edqy.push_byte(70u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal71(ref aa) => { - __codec_dest_edqy.push_byte(71u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal72(ref aa) => { - __codec_dest_edqy.push_byte(72u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal73(ref aa) => { - __codec_dest_edqy.push_byte(73u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal74(ref aa) => { - __codec_dest_edqy.push_byte(74u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal75(ref aa) => { - __codec_dest_edqy.push_byte(75u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal76(ref aa) => { - __codec_dest_edqy.push_byte(76u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal77(ref aa) => { - __codec_dest_edqy.push_byte(77u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal78(ref aa) => { - __codec_dest_edqy.push_byte(78u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal79(ref aa) => { - __codec_dest_edqy.push_byte(79u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal80(ref aa) => { - __codec_dest_edqy.push_byte(80u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal81(ref aa) => { - __codec_dest_edqy.push_byte(81u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal82(ref aa) => { - __codec_dest_edqy.push_byte(82u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal83(ref aa) => { - __codec_dest_edqy.push_byte(83u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal84(ref aa) => { - __codec_dest_edqy.push_byte(84u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal85(ref aa) => { - __codec_dest_edqy.push_byte(85u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal86(ref aa) => { - __codec_dest_edqy.push_byte(86u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal87(ref aa) => { - __codec_dest_edqy.push_byte(87u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal88(ref aa) => { - __codec_dest_edqy.push_byte(88u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal89(ref aa) => { - __codec_dest_edqy.push_byte(89u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal90(ref aa) => { - __codec_dest_edqy.push_byte(90u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal91(ref aa) => { - __codec_dest_edqy.push_byte(91u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal92(ref aa) => { - __codec_dest_edqy.push_byte(92u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal93(ref aa) => { - __codec_dest_edqy.push_byte(93u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal94(ref aa) => { - __codec_dest_edqy.push_byte(94u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal95(ref aa) => { - __codec_dest_edqy.push_byte(95u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal96(ref aa) => { - __codec_dest_edqy.push_byte(96u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal97(ref aa) => { - __codec_dest_edqy.push_byte(97u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal98(ref aa) => { - __codec_dest_edqy.push_byte(98u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal99(ref aa) => { - __codec_dest_edqy.push_byte(99u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal100(ref aa) => { - __codec_dest_edqy.push_byte(100u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal101(ref aa) => { - __codec_dest_edqy.push_byte(101u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal102(ref aa) => { - __codec_dest_edqy.push_byte(102u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal103(ref aa) => { - __codec_dest_edqy.push_byte(103u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal104(ref aa) => { - __codec_dest_edqy.push_byte(104u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal105(ref aa) => { - __codec_dest_edqy.push_byte(105u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal106(ref aa) => { - __codec_dest_edqy.push_byte(106u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal107(ref aa) => { - __codec_dest_edqy.push_byte(107u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal108(ref aa) => { - __codec_dest_edqy.push_byte(108u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal109(ref aa) => { - __codec_dest_edqy.push_byte(109u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal110(ref aa) => { - __codec_dest_edqy.push_byte(110u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal111(ref aa) => { - __codec_dest_edqy.push_byte(111u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal112(ref aa) => { - __codec_dest_edqy.push_byte(112u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal113(ref aa) => { - __codec_dest_edqy.push_byte(113u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal114(ref aa) => { - __codec_dest_edqy.push_byte(114u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal115(ref aa) => { - __codec_dest_edqy.push_byte(115u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal116(ref aa) => { - __codec_dest_edqy.push_byte(116u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal117(ref aa) => { - __codec_dest_edqy.push_byte(117u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal118(ref aa) => { - __codec_dest_edqy.push_byte(118u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal119(ref aa) => { - __codec_dest_edqy.push_byte(119u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal120(ref aa) => { - __codec_dest_edqy.push_byte(120u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal121(ref aa) => { - __codec_dest_edqy.push_byte(121u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal122(ref aa) => { - __codec_dest_edqy.push_byte(122u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal123(ref aa) => { - __codec_dest_edqy.push_byte(123u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal124(ref aa) => { - __codec_dest_edqy.push_byte(124u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal125(ref aa) => { - __codec_dest_edqy.push_byte(125u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal126(ref aa) => { - __codec_dest_edqy.push_byte(126u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal127(ref aa) => { - __codec_dest_edqy.push_byte(127u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal128(ref aa) => { - __codec_dest_edqy.push_byte(128u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal129(ref aa) => { - __codec_dest_edqy.push_byte(129u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal130(ref aa) => { - __codec_dest_edqy.push_byte(130u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal131(ref aa) => { - __codec_dest_edqy.push_byte(131u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal132(ref aa) => { - __codec_dest_edqy.push_byte(132u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal133(ref aa) => { - __codec_dest_edqy.push_byte(133u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal134(ref aa) => { - __codec_dest_edqy.push_byte(134u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal135(ref aa) => { - __codec_dest_edqy.push_byte(135u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal136(ref aa) => { - __codec_dest_edqy.push_byte(136u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal137(ref aa) => { - __codec_dest_edqy.push_byte(137u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal138(ref aa) => { - __codec_dest_edqy.push_byte(138u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal139(ref aa) => { - __codec_dest_edqy.push_byte(139u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal140(ref aa) => { - __codec_dest_edqy.push_byte(140u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal141(ref aa) => { - __codec_dest_edqy.push_byte(141u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal142(ref aa) => { - __codec_dest_edqy.push_byte(142u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal143(ref aa) => { - __codec_dest_edqy.push_byte(143u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal144(ref aa) => { - __codec_dest_edqy.push_byte(144u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal145(ref aa) => { - __codec_dest_edqy.push_byte(145u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal146(ref aa) => { - __codec_dest_edqy.push_byte(146u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal147(ref aa) => { - __codec_dest_edqy.push_byte(147u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal148(ref aa) => { - __codec_dest_edqy.push_byte(148u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal149(ref aa) => { - __codec_dest_edqy.push_byte(149u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal150(ref aa) => { - __codec_dest_edqy.push_byte(150u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal151(ref aa) => { - __codec_dest_edqy.push_byte(151u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal152(ref aa) => { - __codec_dest_edqy.push_byte(152u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal153(ref aa) => { - __codec_dest_edqy.push_byte(153u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal154(ref aa) => { - __codec_dest_edqy.push_byte(154u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal155(ref aa) => { - __codec_dest_edqy.push_byte(155u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal156(ref aa) => { - __codec_dest_edqy.push_byte(156u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal157(ref aa) => { - __codec_dest_edqy.push_byte(157u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal158(ref aa) => { - __codec_dest_edqy.push_byte(158u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal159(ref aa) => { - __codec_dest_edqy.push_byte(159u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal160(ref aa) => { - __codec_dest_edqy.push_byte(160u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal161(ref aa) => { - __codec_dest_edqy.push_byte(161u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal162(ref aa) => { - __codec_dest_edqy.push_byte(162u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal163(ref aa) => { - __codec_dest_edqy.push_byte(163u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal164(ref aa) => { - __codec_dest_edqy.push_byte(164u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal165(ref aa) => { - __codec_dest_edqy.push_byte(165u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal166(ref aa) => { - __codec_dest_edqy.push_byte(166u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal167(ref aa) => { - __codec_dest_edqy.push_byte(167u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal168(ref aa) => { - __codec_dest_edqy.push_byte(168u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal169(ref aa) => { - __codec_dest_edqy.push_byte(169u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal170(ref aa) => { - __codec_dest_edqy.push_byte(170u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal171(ref aa) => { - __codec_dest_edqy.push_byte(171u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal172(ref aa) => { - __codec_dest_edqy.push_byte(172u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal173(ref aa) => { - __codec_dest_edqy.push_byte(173u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal174(ref aa) => { - __codec_dest_edqy.push_byte(174u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal175(ref aa) => { - __codec_dest_edqy.push_byte(175u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal176(ref aa) => { - __codec_dest_edqy.push_byte(176u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal177(ref aa) => { - __codec_dest_edqy.push_byte(177u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal178(ref aa) => { - __codec_dest_edqy.push_byte(178u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal179(ref aa) => { - __codec_dest_edqy.push_byte(179u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal180(ref aa) => { - __codec_dest_edqy.push_byte(180u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal181(ref aa) => { - __codec_dest_edqy.push_byte(181u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal182(ref aa) => { - __codec_dest_edqy.push_byte(182u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal183(ref aa) => { - __codec_dest_edqy.push_byte(183u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal184(ref aa) => { - __codec_dest_edqy.push_byte(184u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal185(ref aa) => { - __codec_dest_edqy.push_byte(185u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal186(ref aa) => { - __codec_dest_edqy.push_byte(186u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal187(ref aa) => { - __codec_dest_edqy.push_byte(187u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal188(ref aa) => { - __codec_dest_edqy.push_byte(188u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal189(ref aa) => { - __codec_dest_edqy.push_byte(189u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal190(ref aa) => { - __codec_dest_edqy.push_byte(190u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal191(ref aa) => { - __codec_dest_edqy.push_byte(191u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal192(ref aa) => { - __codec_dest_edqy.push_byte(192u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal193(ref aa) => { - __codec_dest_edqy.push_byte(193u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal194(ref aa) => { - __codec_dest_edqy.push_byte(194u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal195(ref aa) => { - __codec_dest_edqy.push_byte(195u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal196(ref aa) => { - __codec_dest_edqy.push_byte(196u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal197(ref aa) => { - __codec_dest_edqy.push_byte(197u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal198(ref aa) => { - __codec_dest_edqy.push_byte(198u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal199(ref aa) => { - __codec_dest_edqy.push_byte(199u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal200(ref aa) => { - __codec_dest_edqy.push_byte(200u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal201(ref aa) => { - __codec_dest_edqy.push_byte(201u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal202(ref aa) => { - __codec_dest_edqy.push_byte(202u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal203(ref aa) => { - __codec_dest_edqy.push_byte(203u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal204(ref aa) => { - __codec_dest_edqy.push_byte(204u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal205(ref aa) => { - __codec_dest_edqy.push_byte(205u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal206(ref aa) => { - __codec_dest_edqy.push_byte(206u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal207(ref aa) => { - __codec_dest_edqy.push_byte(207u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal208(ref aa) => { - __codec_dest_edqy.push_byte(208u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal209(ref aa) => { - __codec_dest_edqy.push_byte(209u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal210(ref aa) => { - __codec_dest_edqy.push_byte(210u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal211(ref aa) => { - __codec_dest_edqy.push_byte(211u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal212(ref aa) => { - __codec_dest_edqy.push_byte(212u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal213(ref aa) => { - __codec_dest_edqy.push_byte(213u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal214(ref aa) => { - __codec_dest_edqy.push_byte(214u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal215(ref aa) => { - __codec_dest_edqy.push_byte(215u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal216(ref aa) => { - __codec_dest_edqy.push_byte(216u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal217(ref aa) => { - __codec_dest_edqy.push_byte(217u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal218(ref aa) => { - __codec_dest_edqy.push_byte(218u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal219(ref aa) => { - __codec_dest_edqy.push_byte(219u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal220(ref aa) => { - __codec_dest_edqy.push_byte(220u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal221(ref aa) => { - __codec_dest_edqy.push_byte(221u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal222(ref aa) => { - __codec_dest_edqy.push_byte(222u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal223(ref aa) => { - __codec_dest_edqy.push_byte(223u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal224(ref aa) => { - __codec_dest_edqy.push_byte(224u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal225(ref aa) => { - __codec_dest_edqy.push_byte(225u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal226(ref aa) => { - __codec_dest_edqy.push_byte(226u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal227(ref aa) => { - __codec_dest_edqy.push_byte(227u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal228(ref aa) => { - __codec_dest_edqy.push_byte(228u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal229(ref aa) => { - __codec_dest_edqy.push_byte(229u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal230(ref aa) => { - __codec_dest_edqy.push_byte(230u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal231(ref aa) => { - __codec_dest_edqy.push_byte(231u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal232(ref aa) => { - __codec_dest_edqy.push_byte(232u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal233(ref aa) => { - __codec_dest_edqy.push_byte(233u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal234(ref aa) => { - __codec_dest_edqy.push_byte(234u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal235(ref aa) => { - __codec_dest_edqy.push_byte(235u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal236(ref aa) => { - __codec_dest_edqy.push_byte(236u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal237(ref aa) => { - __codec_dest_edqy.push_byte(237u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal238(ref aa) => { - __codec_dest_edqy.push_byte(238u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal239(ref aa) => { - __codec_dest_edqy.push_byte(239u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal240(ref aa) => { - __codec_dest_edqy.push_byte(240u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal241(ref aa) => { - __codec_dest_edqy.push_byte(241u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal242(ref aa) => { - __codec_dest_edqy.push_byte(242u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal243(ref aa) => { - __codec_dest_edqy.push_byte(243u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal244(ref aa) => { - __codec_dest_edqy.push_byte(244u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal245(ref aa) => { - __codec_dest_edqy.push_byte(245u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal246(ref aa) => { - __codec_dest_edqy.push_byte(246u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal247(ref aa) => { - __codec_dest_edqy.push_byte(247u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal248(ref aa) => { - __codec_dest_edqy.push_byte(248u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal249(ref aa) => { - __codec_dest_edqy.push_byte(249u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal250(ref aa) => { - __codec_dest_edqy.push_byte(250u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal251(ref aa) => { - __codec_dest_edqy.push_byte(251u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal252(ref aa) => { - __codec_dest_edqy.push_byte(252u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal253(ref aa) => { - __codec_dest_edqy.push_byte(253u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal254(ref aa) => { - __codec_dest_edqy.push_byte(254u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Era::Mortal255(ref aa) => { - __codec_dest_edqy.push_byte(255u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Era {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Era { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Era; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Immortal" { - return Ok(Era::Immortal); - } - if value.name() == "Mortal1" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal1({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal2" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal2({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal3" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal3({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal4" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal4({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal5" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal5({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal6" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal6({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal7" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal7({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal8" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal8({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal9" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal9({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal10" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal10({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal11" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal11({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal12" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal12({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal13" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal13({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal14" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal14({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal15" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal15({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal16" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal16({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal17" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal17({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal18" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal18({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal19" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal19({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal20" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal20({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal21" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal21({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal22" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal22({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal23" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal23({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal24" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal24({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal25" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal25({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal26" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal26({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal27" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal27({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal28" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal28({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal29" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal29({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal30" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal30({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal31" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal31({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal32" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal32({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal33" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal33({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal34" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal34({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal35" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal35({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal36" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal36({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal37" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal37({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal38" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal38({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal39" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal39({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal40" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal40({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal41" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal41({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal42" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal42({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal43" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal43({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal44" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal44({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal45" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal45({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal46" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal46({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal47" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal47({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal48" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal48({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal49" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal49({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal50" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal50({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal51" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal51({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal52" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal52({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal53" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal53({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal54" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal54({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal55" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal55({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal56" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal56({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal57" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal57({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal58" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal58({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal59" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal59({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal60" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal60({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal61" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal61({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal62" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal62({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal63" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal63({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal64" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal64({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal65" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal65({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal66" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal66({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal67" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal67({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal68" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal68({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal69" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal69({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal70" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal70({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal71" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal71({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal72" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal72({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal73" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal73({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal74" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal74({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal75" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal75({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal76" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal76({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal77" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal77({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal78" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal78({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal79" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal79({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal80" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal80({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal81" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal81({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal82" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal82({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal83" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal83({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal84" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal84({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal85" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal85({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal86" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal86({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal87" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal87({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal88" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal88({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal89" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal89({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal90" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal90({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal91" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal91({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal92" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal92({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal93" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal93({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal94" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal94({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal95" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal95({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal96" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal96({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal97" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal97({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal98" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal98({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal99" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal99({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal100" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal100({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal101" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal101({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal102" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal102({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal103" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal103({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal104" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal104({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal105" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal105({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal106" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal106({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal107" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal107({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal108" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal108({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal109" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal109({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal110" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal110({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal111" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal111({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal112" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal112({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal113" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal113({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal114" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal114({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal115" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal115({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal116" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal116({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal117" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal117({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal118" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal118({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal119" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal119({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal120" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal120({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal121" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal121({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal122" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal122({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal123" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal123({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal124" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal124({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal125" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal125({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal126" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal126({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal127" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal127({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal128" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal128({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal129" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal129({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal130" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal130({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal131" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal131({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal132" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal132({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal133" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal133({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal134" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal134({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal135" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal135({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal136" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal136({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal137" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal137({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal138" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal138({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal139" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal139({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal140" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal140({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal141" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal141({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal142" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal142({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal143" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal143({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal144" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal144({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal145" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal145({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal146" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal146({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal147" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal147({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal148" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal148({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal149" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal149({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal150" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal150({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal151" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal151({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal152" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal152({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal153" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal153({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal154" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal154({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal155" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal155({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal156" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal156({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal157" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal157({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal158" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal158({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal159" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal159({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal160" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal160({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal161" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal161({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal162" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal162({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal163" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal163({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal164" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal164({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal165" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal165({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal166" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal166({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal167" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal167({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal168" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal168({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal169" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal169({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal170" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal170({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal171" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal171({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal172" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal172({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal173" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal173({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal174" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal174({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal175" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal175({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal176" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal176({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal177" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal177({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal178" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal178({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal179" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal179({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal180" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal180({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal181" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal181({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal182" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal182({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal183" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal183({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal184" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal184({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal185" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal185({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal186" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal186({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal187" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal187({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal188" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal188({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal189" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal189({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal190" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal190({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal191" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal191({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal192" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal192({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal193" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal193({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal194" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal194({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal195" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal195({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal196" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal196({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal197" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal197({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal198" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal198({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal199" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal199({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal200" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal200({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal201" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal201({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal202" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal202({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal203" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal203({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal204" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal204({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal205" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal205({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal206" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal206({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal207" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal207({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal208" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal208({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal209" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal209({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal210" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal210({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal211" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal211({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal212" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal212({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal213" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal213({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal214" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal214({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal215" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal215({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal216" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal216({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal217" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal217({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal218" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal218({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal219" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal219({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal220" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal220({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal221" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal221({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal222" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal222({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal223" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal223({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal224" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal224({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal225" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal225({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal226" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal226({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal227" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal227({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal228" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal228({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal229" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal229({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal230" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal230({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal231" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal231({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal232" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal232({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal233" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal233({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal234" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal234({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal235" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal235({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal236" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal236({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal237" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal237({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal238" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal238({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal239" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal239({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal240" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal240({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal241" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal241({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal242" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal242({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal243" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal243({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal244" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal244({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal245" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal245({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal246" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal246({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal247" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal247({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal248" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal248({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal249" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal249({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal250" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal250({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal251" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal251({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal252" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal252({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal253" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal253({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal254" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal254({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Mortal255" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Era::Mortal255({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Immortal", - "Mortal1", - "Mortal2", - "Mortal3", - "Mortal4", - "Mortal5", - "Mortal6", - "Mortal7", - "Mortal8", - "Mortal9", - "Mortal10", - "Mortal11", - "Mortal12", - "Mortal13", - "Mortal14", - "Mortal15", - "Mortal16", - "Mortal17", - "Mortal18", - "Mortal19", - "Mortal20", - "Mortal21", - "Mortal22", - "Mortal23", - "Mortal24", - "Mortal25", - "Mortal26", - "Mortal27", - "Mortal28", - "Mortal29", - "Mortal30", - "Mortal31", - "Mortal32", - "Mortal33", - "Mortal34", - "Mortal35", - "Mortal36", - "Mortal37", - "Mortal38", - "Mortal39", - "Mortal40", - "Mortal41", - "Mortal42", - "Mortal43", - "Mortal44", - "Mortal45", - "Mortal46", - "Mortal47", - "Mortal48", - "Mortal49", - "Mortal50", - "Mortal51", - "Mortal52", - "Mortal53", - "Mortal54", - "Mortal55", - "Mortal56", - "Mortal57", - "Mortal58", - "Mortal59", - "Mortal60", - "Mortal61", - "Mortal62", - "Mortal63", - "Mortal64", - "Mortal65", - "Mortal66", - "Mortal67", - "Mortal68", - "Mortal69", - "Mortal70", - "Mortal71", - "Mortal72", - "Mortal73", - "Mortal74", - "Mortal75", - "Mortal76", - "Mortal77", - "Mortal78", - "Mortal79", - "Mortal80", - "Mortal81", - "Mortal82", - "Mortal83", - "Mortal84", - "Mortal85", - "Mortal86", - "Mortal87", - "Mortal88", - "Mortal89", - "Mortal90", - "Mortal91", - "Mortal92", - "Mortal93", - "Mortal94", - "Mortal95", - "Mortal96", - "Mortal97", - "Mortal98", - "Mortal99", - "Mortal100", - "Mortal101", - "Mortal102", - "Mortal103", - "Mortal104", - "Mortal105", - "Mortal106", - "Mortal107", - "Mortal108", - "Mortal109", - "Mortal110", - "Mortal111", - "Mortal112", - "Mortal113", - "Mortal114", - "Mortal115", - "Mortal116", - "Mortal117", - "Mortal118", - "Mortal119", - "Mortal120", - "Mortal121", - "Mortal122", - "Mortal123", - "Mortal124", - "Mortal125", - "Mortal126", - "Mortal127", - "Mortal128", - "Mortal129", - "Mortal130", - "Mortal131", - "Mortal132", - "Mortal133", - "Mortal134", - "Mortal135", - "Mortal136", - "Mortal137", - "Mortal138", - "Mortal139", - "Mortal140", - "Mortal141", - "Mortal142", - "Mortal143", - "Mortal144", - "Mortal145", - "Mortal146", - "Mortal147", - "Mortal148", - "Mortal149", - "Mortal150", - "Mortal151", - "Mortal152", - "Mortal153", - "Mortal154", - "Mortal155", - "Mortal156", - "Mortal157", - "Mortal158", - "Mortal159", - "Mortal160", - "Mortal161", - "Mortal162", - "Mortal163", - "Mortal164", - "Mortal165", - "Mortal166", - "Mortal167", - "Mortal168", - "Mortal169", - "Mortal170", - "Mortal171", - "Mortal172", - "Mortal173", - "Mortal174", - "Mortal175", - "Mortal176", - "Mortal177", - "Mortal178", - "Mortal179", - "Mortal180", - "Mortal181", - "Mortal182", - "Mortal183", - "Mortal184", - "Mortal185", - "Mortal186", - "Mortal187", - "Mortal188", - "Mortal189", - "Mortal190", - "Mortal191", - "Mortal192", - "Mortal193", - "Mortal194", - "Mortal195", - "Mortal196", - "Mortal197", - "Mortal198", - "Mortal199", - "Mortal200", - "Mortal201", - "Mortal202", - "Mortal203", - "Mortal204", - "Mortal205", - "Mortal206", - "Mortal207", - "Mortal208", - "Mortal209", - "Mortal210", - "Mortal211", - "Mortal212", - "Mortal213", - "Mortal214", - "Mortal215", - "Mortal216", - "Mortal217", - "Mortal218", - "Mortal219", - "Mortal220", - "Mortal221", - "Mortal222", - "Mortal223", - "Mortal224", - "Mortal225", - "Mortal226", - "Mortal227", - "Mortal228", - "Mortal229", - "Mortal230", - "Mortal231", - "Mortal232", - "Mortal233", - "Mortal234", - "Mortal235", - "Mortal236", - "Mortal237", - "Mortal238", - "Mortal239", - "Mortal240", - "Mortal241", - "Mortal242", - "Mortal243", - "Mortal244", - "Mortal245", - "Mortal246", - "Mortal247", - "Mortal248", - "Mortal249", - "Mortal250", - "Mortal251", - "Mortal252", - "Mortal253", - "Mortal254", - "Mortal255", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Era { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Immortal => { - ::subxt::ext::scale_encode::Variant { - name: "Immortal", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal1(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal1", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal2(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal2", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal3(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal3", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal4(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal4", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal5(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal5", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal6(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal6", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal7(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal7", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal8(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal8", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal9(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal9", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal10(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal10", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal11(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal11", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal12(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal12", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal13(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal13", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal14(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal14", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal15(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal15", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal16(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal16", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal17(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal17", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal18(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal18", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal19(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal19", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal20(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal20", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal21(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal21", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal22(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal22", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal23(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal23", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal24(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal24", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal25(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal25", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal26(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal26", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal27(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal27", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal28(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal28", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal29(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal29", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal30(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal30", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal31(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal31", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal32(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal32", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal33(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal33", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal34(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal34", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal35(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal35", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal36(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal36", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal37(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal37", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal38(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal38", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal39(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal39", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal40(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal40", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal41(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal41", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal42(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal42", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal43(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal43", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal44(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal44", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal45(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal45", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal46(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal46", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal47(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal47", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal48(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal48", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal49(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal49", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal50(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal50", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal51(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal51", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal52(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal52", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal53(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal53", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal54(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal54", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal55(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal55", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal56(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal56", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal57(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal57", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal58(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal58", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal59(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal59", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal60(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal60", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal61(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal61", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal62(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal62", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal63(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal63", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal64(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal64", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal65(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal65", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal66(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal66", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal67(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal67", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal68(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal68", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal69(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal69", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal70(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal70", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal71(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal71", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal72(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal72", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal73(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal73", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal74(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal74", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal75(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal75", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal76(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal76", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal77(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal77", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal78(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal78", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal79(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal79", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal80(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal80", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal81(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal81", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal82(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal82", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal83(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal83", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal84(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal84", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal85(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal85", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal86(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal86", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal87(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal87", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal88(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal88", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal89(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal89", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal90(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal90", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal91(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal91", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal92(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal92", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal93(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal93", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal94(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal94", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal95(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal95", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal96(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal96", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal97(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal97", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal98(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal98", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal99(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal99", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal100(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal100", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal101(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal101", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal102(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal102", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal103(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal103", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal104(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal104", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal105(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal105", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal106(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal106", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal107(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal107", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal108(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal108", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal109(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal109", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal110(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal110", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal111(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal111", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal112(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal112", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal113(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal113", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal114(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal114", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal115(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal115", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal116(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal116", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal117(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal117", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal118(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal118", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal119(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal119", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal120(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal120", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal121(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal121", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal122(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal122", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal123(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal123", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal124(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal124", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal125(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal125", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal126(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal126", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal127(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal127", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal128(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal128", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal129(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal129", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal130(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal130", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal131(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal131", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal132(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal132", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal133(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal133", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal134(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal134", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal135(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal135", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal136(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal136", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal137(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal137", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal138(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal138", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal139(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal139", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal140(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal140", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal141(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal141", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal142(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal142", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal143(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal143", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal144(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal144", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal145(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal145", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal146(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal146", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal147(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal147", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal148(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal148", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal149(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal149", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal150(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal150", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal151(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal151", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal152(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal152", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal153(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal153", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal154(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal154", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal155(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal155", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal156(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal156", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal157(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal157", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal158(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal158", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal159(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal159", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal160(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal160", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal161(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal161", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal162(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal162", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal163(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal163", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal164(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal164", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal165(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal165", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal166(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal166", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal167(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal167", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal168(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal168", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal169(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal169", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal170(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal170", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal171(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal171", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal172(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal172", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal173(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal173", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal174(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal174", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal175(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal175", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal176(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal176", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal177(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal177", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal178(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal178", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal179(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal179", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal180(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal180", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal181(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal181", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal182(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal182", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal183(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal183", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal184(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal184", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal185(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal185", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal186(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal186", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal187(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal187", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal188(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal188", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal189(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal189", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal190(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal190", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal191(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal191", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal192(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal192", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal193(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal193", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal194(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal194", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal195(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal195", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal196(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal196", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal197(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal197", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal198(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal198", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal199(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal199", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal200(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal200", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal201(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal201", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal202(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal202", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal203(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal203", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal204(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal204", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal205(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal205", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal206(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal206", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal207(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal207", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal208(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal208", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal209(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal209", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal210(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal210", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal211(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal211", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal212(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal212", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal213(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal213", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal214(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal214", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal215(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal215", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal216(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal216", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal217(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal217", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal218(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal218", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal219(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal219", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal220(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal220", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal221(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal221", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal222(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal222", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal223(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal223", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal224(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal224", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal225(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal225", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal226(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal226", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal227(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal227", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal228(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal228", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal229(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal229", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal230(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal230", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal231(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal231", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal232(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal232", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal233(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal233", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal234(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal234", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal235(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal235", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal236(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal236", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal237(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal237", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal238(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal238", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal239(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal239", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal240(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal240", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal241(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal241", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal242(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal242", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal243(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal243", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal244(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal244", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal245(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal245", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal246(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal246", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal247(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal247", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal248(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal248", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal249(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal249", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal250(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal250", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal251(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal251", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal252(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal252", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal253(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal253", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal254(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal254", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Mortal255(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Mortal255", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Era { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Era::Immortal => { - ::core::fmt::Formatter::write_str(f, "Immortal") - } - Era::Mortal1(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal1", - &__self_0, - ) - } - Era::Mortal2(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal2", - &__self_0, - ) - } - Era::Mortal3(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal3", - &__self_0, - ) - } - Era::Mortal4(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal4", - &__self_0, - ) - } - Era::Mortal5(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal5", - &__self_0, - ) - } - Era::Mortal6(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal6", - &__self_0, - ) - } - Era::Mortal7(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal7", - &__self_0, - ) - } - Era::Mortal8(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal8", - &__self_0, - ) - } - Era::Mortal9(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal9", - &__self_0, - ) - } - Era::Mortal10(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal10", - &__self_0, - ) - } - Era::Mortal11(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal11", - &__self_0, - ) - } - Era::Mortal12(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal12", - &__self_0, - ) - } - Era::Mortal13(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal13", - &__self_0, - ) - } - Era::Mortal14(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal14", - &__self_0, - ) - } - Era::Mortal15(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal15", - &__self_0, - ) - } - Era::Mortal16(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal16", - &__self_0, - ) - } - Era::Mortal17(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal17", - &__self_0, - ) - } - Era::Mortal18(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal18", - &__self_0, - ) - } - Era::Mortal19(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal19", - &__self_0, - ) - } - Era::Mortal20(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal20", - &__self_0, - ) - } - Era::Mortal21(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal21", - &__self_0, - ) - } - Era::Mortal22(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal22", - &__self_0, - ) - } - Era::Mortal23(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal23", - &__self_0, - ) - } - Era::Mortal24(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal24", - &__self_0, - ) - } - Era::Mortal25(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal25", - &__self_0, - ) - } - Era::Mortal26(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal26", - &__self_0, - ) - } - Era::Mortal27(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal27", - &__self_0, - ) - } - Era::Mortal28(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal28", - &__self_0, - ) - } - Era::Mortal29(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal29", - &__self_0, - ) - } - Era::Mortal30(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal30", - &__self_0, - ) - } - Era::Mortal31(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal31", - &__self_0, - ) - } - Era::Mortal32(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal32", - &__self_0, - ) - } - Era::Mortal33(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal33", - &__self_0, - ) - } - Era::Mortal34(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal34", - &__self_0, - ) - } - Era::Mortal35(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal35", - &__self_0, - ) - } - Era::Mortal36(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal36", - &__self_0, - ) - } - Era::Mortal37(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal37", - &__self_0, - ) - } - Era::Mortal38(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal38", - &__self_0, - ) - } - Era::Mortal39(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal39", - &__self_0, - ) - } - Era::Mortal40(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal40", - &__self_0, - ) - } - Era::Mortal41(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal41", - &__self_0, - ) - } - Era::Mortal42(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal42", - &__self_0, - ) - } - Era::Mortal43(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal43", - &__self_0, - ) - } - Era::Mortal44(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal44", - &__self_0, - ) - } - Era::Mortal45(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal45", - &__self_0, - ) - } - Era::Mortal46(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal46", - &__self_0, - ) - } - Era::Mortal47(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal47", - &__self_0, - ) - } - Era::Mortal48(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal48", - &__self_0, - ) - } - Era::Mortal49(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal49", - &__self_0, - ) - } - Era::Mortal50(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal50", - &__self_0, - ) - } - Era::Mortal51(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal51", - &__self_0, - ) - } - Era::Mortal52(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal52", - &__self_0, - ) - } - Era::Mortal53(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal53", - &__self_0, - ) - } - Era::Mortal54(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal54", - &__self_0, - ) - } - Era::Mortal55(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal55", - &__self_0, - ) - } - Era::Mortal56(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal56", - &__self_0, - ) - } - Era::Mortal57(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal57", - &__self_0, - ) - } - Era::Mortal58(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal58", - &__self_0, - ) - } - Era::Mortal59(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal59", - &__self_0, - ) - } - Era::Mortal60(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal60", - &__self_0, - ) - } - Era::Mortal61(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal61", - &__self_0, - ) - } - Era::Mortal62(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal62", - &__self_0, - ) - } - Era::Mortal63(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal63", - &__self_0, - ) - } - Era::Mortal64(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal64", - &__self_0, - ) - } - Era::Mortal65(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal65", - &__self_0, - ) - } - Era::Mortal66(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal66", - &__self_0, - ) - } - Era::Mortal67(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal67", - &__self_0, - ) - } - Era::Mortal68(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal68", - &__self_0, - ) - } - Era::Mortal69(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal69", - &__self_0, - ) - } - Era::Mortal70(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal70", - &__self_0, - ) - } - Era::Mortal71(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal71", - &__self_0, - ) - } - Era::Mortal72(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal72", - &__self_0, - ) - } - Era::Mortal73(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal73", - &__self_0, - ) - } - Era::Mortal74(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal74", - &__self_0, - ) - } - Era::Mortal75(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal75", - &__self_0, - ) - } - Era::Mortal76(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal76", - &__self_0, - ) - } - Era::Mortal77(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal77", - &__self_0, - ) - } - Era::Mortal78(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal78", - &__self_0, - ) - } - Era::Mortal79(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal79", - &__self_0, - ) - } - Era::Mortal80(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal80", - &__self_0, - ) - } - Era::Mortal81(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal81", - &__self_0, - ) - } - Era::Mortal82(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal82", - &__self_0, - ) - } - Era::Mortal83(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal83", - &__self_0, - ) - } - Era::Mortal84(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal84", - &__self_0, - ) - } - Era::Mortal85(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal85", - &__self_0, - ) - } - Era::Mortal86(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal86", - &__self_0, - ) - } - Era::Mortal87(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal87", - &__self_0, - ) - } - Era::Mortal88(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal88", - &__self_0, - ) - } - Era::Mortal89(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal89", - &__self_0, - ) - } - Era::Mortal90(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal90", - &__self_0, - ) - } - Era::Mortal91(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal91", - &__self_0, - ) - } - Era::Mortal92(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal92", - &__self_0, - ) - } - Era::Mortal93(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal93", - &__self_0, - ) - } - Era::Mortal94(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal94", - &__self_0, - ) - } - Era::Mortal95(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal95", - &__self_0, - ) - } - Era::Mortal96(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal96", - &__self_0, - ) - } - Era::Mortal97(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal97", - &__self_0, - ) - } - Era::Mortal98(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal98", - &__self_0, - ) - } - Era::Mortal99(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal99", - &__self_0, - ) - } - Era::Mortal100(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal100", - &__self_0, - ) - } - Era::Mortal101(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal101", - &__self_0, - ) - } - Era::Mortal102(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal102", - &__self_0, - ) - } - Era::Mortal103(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal103", - &__self_0, - ) - } - Era::Mortal104(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal104", - &__self_0, - ) - } - Era::Mortal105(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal105", - &__self_0, - ) - } - Era::Mortal106(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal106", - &__self_0, - ) - } - Era::Mortal107(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal107", - &__self_0, - ) - } - Era::Mortal108(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal108", - &__self_0, - ) - } - Era::Mortal109(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal109", - &__self_0, - ) - } - Era::Mortal110(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal110", - &__self_0, - ) - } - Era::Mortal111(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal111", - &__self_0, - ) - } - Era::Mortal112(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal112", - &__self_0, - ) - } - Era::Mortal113(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal113", - &__self_0, - ) - } - Era::Mortal114(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal114", - &__self_0, - ) - } - Era::Mortal115(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal115", - &__self_0, - ) - } - Era::Mortal116(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal116", - &__self_0, - ) - } - Era::Mortal117(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal117", - &__self_0, - ) - } - Era::Mortal118(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal118", - &__self_0, - ) - } - Era::Mortal119(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal119", - &__self_0, - ) - } - Era::Mortal120(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal120", - &__self_0, - ) - } - Era::Mortal121(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal121", - &__self_0, - ) - } - Era::Mortal122(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal122", - &__self_0, - ) - } - Era::Mortal123(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal123", - &__self_0, - ) - } - Era::Mortal124(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal124", - &__self_0, - ) - } - Era::Mortal125(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal125", - &__self_0, - ) - } - Era::Mortal126(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal126", - &__self_0, - ) - } - Era::Mortal127(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal127", - &__self_0, - ) - } - Era::Mortal128(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal128", - &__self_0, - ) - } - Era::Mortal129(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal129", - &__self_0, - ) - } - Era::Mortal130(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal130", - &__self_0, - ) - } - Era::Mortal131(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal131", - &__self_0, - ) - } - Era::Mortal132(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal132", - &__self_0, - ) - } - Era::Mortal133(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal133", - &__self_0, - ) - } - Era::Mortal134(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal134", - &__self_0, - ) - } - Era::Mortal135(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal135", - &__self_0, - ) - } - Era::Mortal136(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal136", - &__self_0, - ) - } - Era::Mortal137(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal137", - &__self_0, - ) - } - Era::Mortal138(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal138", - &__self_0, - ) - } - Era::Mortal139(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal139", - &__self_0, - ) - } - Era::Mortal140(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal140", - &__self_0, - ) - } - Era::Mortal141(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal141", - &__self_0, - ) - } - Era::Mortal142(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal142", - &__self_0, - ) - } - Era::Mortal143(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal143", - &__self_0, - ) - } - Era::Mortal144(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal144", - &__self_0, - ) - } - Era::Mortal145(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal145", - &__self_0, - ) - } - Era::Mortal146(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal146", - &__self_0, - ) - } - Era::Mortal147(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal147", - &__self_0, - ) - } - Era::Mortal148(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal148", - &__self_0, - ) - } - Era::Mortal149(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal149", - &__self_0, - ) - } - Era::Mortal150(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal150", - &__self_0, - ) - } - Era::Mortal151(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal151", - &__self_0, - ) - } - Era::Mortal152(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal152", - &__self_0, - ) - } - Era::Mortal153(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal153", - &__self_0, - ) - } - Era::Mortal154(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal154", - &__self_0, - ) - } - Era::Mortal155(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal155", - &__self_0, - ) - } - Era::Mortal156(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal156", - &__self_0, - ) - } - Era::Mortal157(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal157", - &__self_0, - ) - } - Era::Mortal158(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal158", - &__self_0, - ) - } - Era::Mortal159(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal159", - &__self_0, - ) - } - Era::Mortal160(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal160", - &__self_0, - ) - } - Era::Mortal161(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal161", - &__self_0, - ) - } - Era::Mortal162(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal162", - &__self_0, - ) - } - Era::Mortal163(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal163", - &__self_0, - ) - } - Era::Mortal164(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal164", - &__self_0, - ) - } - Era::Mortal165(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal165", - &__self_0, - ) - } - Era::Mortal166(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal166", - &__self_0, - ) - } - Era::Mortal167(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal167", - &__self_0, - ) - } - Era::Mortal168(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal168", - &__self_0, - ) - } - Era::Mortal169(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal169", - &__self_0, - ) - } - Era::Mortal170(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal170", - &__self_0, - ) - } - Era::Mortal171(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal171", - &__self_0, - ) - } - Era::Mortal172(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal172", - &__self_0, - ) - } - Era::Mortal173(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal173", - &__self_0, - ) - } - Era::Mortal174(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal174", - &__self_0, - ) - } - Era::Mortal175(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal175", - &__self_0, - ) - } - Era::Mortal176(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal176", - &__self_0, - ) - } - Era::Mortal177(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal177", - &__self_0, - ) - } - Era::Mortal178(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal178", - &__self_0, - ) - } - Era::Mortal179(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal179", - &__self_0, - ) - } - Era::Mortal180(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal180", - &__self_0, - ) - } - Era::Mortal181(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal181", - &__self_0, - ) - } - Era::Mortal182(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal182", - &__self_0, - ) - } - Era::Mortal183(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal183", - &__self_0, - ) - } - Era::Mortal184(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal184", - &__self_0, - ) - } - Era::Mortal185(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal185", - &__self_0, - ) - } - Era::Mortal186(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal186", - &__self_0, - ) - } - Era::Mortal187(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal187", - &__self_0, - ) - } - Era::Mortal188(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal188", - &__self_0, - ) - } - Era::Mortal189(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal189", - &__self_0, - ) - } - Era::Mortal190(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal190", - &__self_0, - ) - } - Era::Mortal191(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal191", - &__self_0, - ) - } - Era::Mortal192(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal192", - &__self_0, - ) - } - Era::Mortal193(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal193", - &__self_0, - ) - } - Era::Mortal194(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal194", - &__self_0, - ) - } - Era::Mortal195(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal195", - &__self_0, - ) - } - Era::Mortal196(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal196", - &__self_0, - ) - } - Era::Mortal197(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal197", - &__self_0, - ) - } - Era::Mortal198(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal198", - &__self_0, - ) - } - Era::Mortal199(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal199", - &__self_0, - ) - } - Era::Mortal200(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal200", - &__self_0, - ) - } - Era::Mortal201(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal201", - &__self_0, - ) - } - Era::Mortal202(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal202", - &__self_0, - ) - } - Era::Mortal203(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal203", - &__self_0, - ) - } - Era::Mortal204(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal204", - &__self_0, - ) - } - Era::Mortal205(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal205", - &__self_0, - ) - } - Era::Mortal206(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal206", - &__self_0, - ) - } - Era::Mortal207(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal207", - &__self_0, - ) - } - Era::Mortal208(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal208", - &__self_0, - ) - } - Era::Mortal209(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal209", - &__self_0, - ) - } - Era::Mortal210(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal210", - &__self_0, - ) - } - Era::Mortal211(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal211", - &__self_0, - ) - } - Era::Mortal212(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal212", - &__self_0, - ) - } - Era::Mortal213(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal213", - &__self_0, - ) - } - Era::Mortal214(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal214", - &__self_0, - ) - } - Era::Mortal215(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal215", - &__self_0, - ) - } - Era::Mortal216(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal216", - &__self_0, - ) - } - Era::Mortal217(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal217", - &__self_0, - ) - } - Era::Mortal218(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal218", - &__self_0, - ) - } - Era::Mortal219(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal219", - &__self_0, - ) - } - Era::Mortal220(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal220", - &__self_0, - ) - } - Era::Mortal221(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal221", - &__self_0, - ) - } - Era::Mortal222(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal222", - &__self_0, - ) - } - Era::Mortal223(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal223", - &__self_0, - ) - } - Era::Mortal224(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal224", - &__self_0, - ) - } - Era::Mortal225(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal225", - &__self_0, - ) - } - Era::Mortal226(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal226", - &__self_0, - ) - } - Era::Mortal227(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal227", - &__self_0, - ) - } - Era::Mortal228(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal228", - &__self_0, - ) - } - Era::Mortal229(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal229", - &__self_0, - ) - } - Era::Mortal230(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal230", - &__self_0, - ) - } - Era::Mortal231(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal231", - &__self_0, - ) - } - Era::Mortal232(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal232", - &__self_0, - ) - } - Era::Mortal233(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal233", - &__self_0, - ) - } - Era::Mortal234(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal234", - &__self_0, - ) - } - Era::Mortal235(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal235", - &__self_0, - ) - } - Era::Mortal236(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal236", - &__self_0, - ) - } - Era::Mortal237(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal237", - &__self_0, - ) - } - Era::Mortal238(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal238", - &__self_0, - ) - } - Era::Mortal239(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal239", - &__self_0, - ) - } - Era::Mortal240(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal240", - &__self_0, - ) - } - Era::Mortal241(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal241", - &__self_0, - ) - } - Era::Mortal242(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal242", - &__self_0, - ) - } - Era::Mortal243(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal243", - &__self_0, - ) - } - Era::Mortal244(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal244", - &__self_0, - ) - } - Era::Mortal245(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal245", - &__self_0, - ) - } - Era::Mortal246(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal246", - &__self_0, - ) - } - Era::Mortal247(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal247", - &__self_0, - ) - } - Era::Mortal248(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal248", - &__self_0, - ) - } - Era::Mortal249(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal249", - &__self_0, - ) - } - Era::Mortal250(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal250", - &__self_0, - ) - } - Era::Mortal251(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal251", - &__self_0, - ) - } - Era::Mortal252(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal252", - &__self_0, - ) - } - Era::Mortal253(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal253", - &__self_0, - ) - } - Era::Mortal254(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal254", - &__self_0, - ) - } - Era::Mortal255(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Mortal255", - &__self_0, - ) - } - } - } - } - } - pub mod header { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Header<_0, _1> { - pub parent_hash: ::subxt::utils::H256, - #[codec(compact)] - pub number: _0, - pub state_root: ::subxt::utils::H256, - pub extrinsics_root: ::subxt::utils::H256, - pub digest: runtime_types::sp_runtime::generic::digest::Digest, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData< - _1, - >, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode for Header<_0, _1> - where - _0: ::subxt::ext::codec::HasCompact, - ::core::marker::PhantomData<_1>: Default, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Header::<_0, _1> { - parent_hash: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Header::parent_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - number: { - let __codec_res_edqy = <<_0 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Header::number`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - state_root: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Header::state_root`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - extrinsics_root: { - let __codec_res_edqy = <::subxt::utils::H256 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Header::extrinsics_root`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - digest: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Header::digest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - __subxt_unused_type_params: ::core::default::Default::default(), - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode for Header<_0, _1> - where - _0: ::subxt::ext::codec::HasCompact, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.parent_hash), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<_0 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - _0, - >>::RefType::from(&self.number), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.state_root), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.extrinsics_root, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.digest), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.parent_hash, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<_0 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - _0, - >>::RefType::from(&self.number), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.state_root, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.extrinsics_root, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.digest, - __codec_dest_edqy, - ); - let _ = &self.__subxt_unused_type_params; - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for Header<_0, _1> - where - _0: ::subxt::ext::codec::HasCompact, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>( - ::core::marker::PhantomData<(_0, _1)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for Header<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Header<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Header { - parent_hash: { - let val = *vals - .get(&Some("parent_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parent_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("parent_hash"))? - }, - number: { - let val = *vals - .get(&Some("number")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "number".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("number"))? - }, - state_root: { - let val = *vals - .get(&Some("state_root")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "state_root".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("state_root"))? - }, - extrinsics_root: { - let val = *vals - .get(&Some("extrinsics_root")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "extrinsics_root".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("extrinsics_root"))? - }, - digest: { - let val = *vals - .get(&Some("digest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "digest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("digest"))? - }, - __subxt_unused_type_params: ::core::default::Default::default(), - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = value; - Ok(Header { - parent_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("parent_hash"))? - }, - number: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("number"))? - }, - state_root: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("state_root"))? - }, - extrinsics_root: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("extrinsics_root"))? - }, - digest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("digest"))? - }, - __subxt_unused_type_params: ::core::default::Default::default(), - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for Header<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for Header<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Header { - parent_hash, - number, - state_root, - extrinsics_root, - digest, - __subxt_unused_type_params, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_hash"), - parent_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("number"), - number as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("state_root"), - state_root as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("extrinsics_root"), - extrinsics_root - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("digest"), - digest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for Header<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Header { - parent_hash, - number, - state_root, - extrinsics_root, - digest, - __subxt_unused_type_params, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parent_hash"), - parent_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("number"), - number as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("state_root"), - state_root as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("extrinsics_root"), - extrinsics_root - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("digest"), - digest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - > ::core::fmt::Debug for Header<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "parent_hash", - "number", - "state_root", - "extrinsics_root", - "digest", - "__subxt_unused_type_params", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.parent_hash, - &self.number, - &self.state_root, - &self.extrinsics_root, - &self.digest, - &&self.__subxt_unused_type_params, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "Header", - names, - values, - ) - } - } - } - } - pub mod traits { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BlakeTwo256; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BlakeTwo256 { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(BlakeTwo256) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BlakeTwo256 { - fn size_hint(&self) -> usize { - 0_usize - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) {} - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BlakeTwo256 {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BlakeTwo256 { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BlakeTwo256; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() > 0 { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 0, - }), - ); - } - Ok(BlakeTwo256) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for BlakeTwo256 { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BlakeTwo256 { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BlakeTwo256 = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for BlakeTwo256 { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let BlakeTwo256 = self; - ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BlakeTwo256 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "BlakeTwo256") - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub 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, - #[codec(index = 13)] - RootNotAllowed, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DispatchError { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `DispatchError`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DispatchError::Other) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DispatchError::CannotLookup) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DispatchError::BadOrigin) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - DispatchError::Module({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DispatchError::Module.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DispatchError::ConsumerRemaining) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DispatchError::NoProviders) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DispatchError::TooManyConsumers) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - DispatchError::Token({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DispatchError::Token.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - DispatchError::Arithmetic({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DispatchError::Arithmetic.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - DispatchError::Transactional({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DispatchError::Transactional.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DispatchError::Exhausted) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DispatchError::Corruption) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DispatchError::Unavailable) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(DispatchError::RootNotAllowed) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `DispatchError`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DispatchError { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - DispatchError::Other => 0_usize, - DispatchError::CannotLookup => 0_usize, - DispatchError::BadOrigin => 0_usize, - DispatchError::Module(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - DispatchError::ConsumerRemaining => 0_usize, - DispatchError::NoProviders => 0_usize, - DispatchError::TooManyConsumers => 0_usize, - DispatchError::Token(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - DispatchError::Arithmetic(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - DispatchError::Transactional(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - DispatchError::Exhausted => 0_usize, - DispatchError::Corruption => 0_usize, - DispatchError::Unavailable => 0_usize, - DispatchError::RootNotAllowed => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - DispatchError::Other => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - DispatchError::CannotLookup => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - DispatchError::BadOrigin => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - DispatchError::Module(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - DispatchError::ConsumerRemaining => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - DispatchError::NoProviders => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - DispatchError::TooManyConsumers => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - DispatchError::Token(ref aa) => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - DispatchError::Arithmetic(ref aa) => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - DispatchError::Transactional(ref aa) => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - DispatchError::Exhausted => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - DispatchError::Corruption => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - DispatchError::Unavailable => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - DispatchError::RootNotAllowed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DispatchError {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for DispatchError { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DispatchError; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Other" { - return Ok(DispatchError::Other); - } - if value.name() == "CannotLookup" { - return Ok(DispatchError::CannotLookup); - } - if value.name() == "BadOrigin" { - return Ok(DispatchError::BadOrigin); - } - if value.name() == "Module" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - DispatchError::Module({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ConsumerRemaining" { - return Ok(DispatchError::ConsumerRemaining); - } - if value.name() == "NoProviders" { - return Ok(DispatchError::NoProviders); - } - if value.name() == "TooManyConsumers" { - return Ok(DispatchError::TooManyConsumers); - } - if value.name() == "Token" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - DispatchError::Token({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Arithmetic" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - DispatchError::Arithmetic({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Transactional" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - DispatchError::Transactional({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Exhausted" { - return Ok(DispatchError::Exhausted); - } - if value.name() == "Corruption" { - return Ok(DispatchError::Corruption); - } - if value.name() == "Unavailable" { - return Ok(DispatchError::Unavailable); - } - if value.name() == "RootNotAllowed" { - return Ok(DispatchError::RootNotAllowed); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Other", - "CannotLookup", - "BadOrigin", - "Module", - "ConsumerRemaining", - "NoProviders", - "TooManyConsumers", - "Token", - "Arithmetic", - "Transactional", - "Exhausted", - "Corruption", - "Unavailable", - "RootNotAllowed", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DispatchError { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Other => { - ::subxt::ext::scale_encode::Variant { - name: "Other", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CannotLookup => { - ::subxt::ext::scale_encode::Variant { - name: "CannotLookup", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BadOrigin => { - ::subxt::ext::scale_encode::Variant { - name: "BadOrigin", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Module(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Module", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ConsumerRemaining => { - ::subxt::ext::scale_encode::Variant { - name: "ConsumerRemaining", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoProviders => { - ::subxt::ext::scale_encode::Variant { - name: "NoProviders", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooManyConsumers => { - ::subxt::ext::scale_encode::Variant { - name: "TooManyConsumers", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Token(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Token", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Arithmetic(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Arithmetic", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Transactional(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Transactional", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Exhausted => { - ::subxt::ext::scale_encode::Variant { - name: "Exhausted", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Corruption => { - ::subxt::ext::scale_encode::Variant { - name: "Corruption", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unavailable => { - ::subxt::ext::scale_encode::Variant { - name: "Unavailable", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::RootNotAllowed => { - ::subxt::ext::scale_encode::Variant { - name: "RootNotAllowed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DispatchError { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - DispatchError::Other => { - ::core::fmt::Formatter::write_str(f, "Other") - } - DispatchError::CannotLookup => { - ::core::fmt::Formatter::write_str(f, "CannotLookup") - } - DispatchError::BadOrigin => { - ::core::fmt::Formatter::write_str(f, "BadOrigin") - } - DispatchError::Module(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Module", - &__self_0, - ) - } - DispatchError::ConsumerRemaining => { - ::core::fmt::Formatter::write_str(f, "ConsumerRemaining") - } - DispatchError::NoProviders => { - ::core::fmt::Formatter::write_str(f, "NoProviders") - } - DispatchError::TooManyConsumers => { - ::core::fmt::Formatter::write_str(f, "TooManyConsumers") - } - DispatchError::Token(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Token", - &__self_0, - ) - } - DispatchError::Arithmetic(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Arithmetic", - &__self_0, - ) - } - DispatchError::Transactional(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Transactional", - &__self_0, - ) - } - DispatchError::Exhausted => { - ::core::fmt::Formatter::write_str(f, "Exhausted") - } - DispatchError::Corruption => { - ::core::fmt::Formatter::write_str(f, "Corruption") - } - DispatchError::Unavailable => { - ::core::fmt::Formatter::write_str(f, "Unavailable") - } - DispatchError::RootNotAllowed => { - ::core::fmt::Formatter::write_str(f, "RootNotAllowed") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DispatchErrorWithPostInfo<_0> { - pub post_info: _0, - pub error: runtime_types::sp_runtime::DispatchError, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Decode - for DispatchErrorWithPostInfo<_0> - where - _0: ::subxt::ext::codec::Decode, - _0: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(DispatchErrorWithPostInfo::<_0> { - post_info: { - let __codec_res_edqy = <_0 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `DispatchErrorWithPostInfo::post_info`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - error: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `DispatchErrorWithPostInfo::error`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0> ::subxt::ext::codec::Encode - for DispatchErrorWithPostInfo<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.post_info), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.error), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.post_info, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.error, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0> ::subxt::ext::codec::EncodeLike - for DispatchErrorWithPostInfo<_0> - where - _0: ::subxt::ext::codec::Encode, - _0: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0>(::core::marker::PhantomData<(_0,)>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0> ::subxt::ext::scale_decode::IntoVisitor - for DispatchErrorWithPostInfo<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0> ::subxt::ext::scale_decode::Visitor for Visitor<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DispatchErrorWithPostInfo<_0>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DispatchErrorWithPostInfo { - post_info: { - let val = *vals - .get(&Some("post_info")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "post_info".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("post_info"))? - }, - error: { - let val = *vals - .get(&Some("error")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "error".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("error"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(DispatchErrorWithPostInfo { - post_info: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("post_info"))? - }, - error: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("error"))? - }, - }) - } - } - impl<_0> ::subxt::ext::scale_decode::DecodeAsFields - for DispatchErrorWithPostInfo<_0> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0> ::subxt::ext::scale_encode::EncodeAsType - for DispatchErrorWithPostInfo<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DispatchErrorWithPostInfo { post_info, error } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("post_info"), - post_info as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("error"), - error as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0> ::subxt::ext::scale_encode::EncodeAsFields - for DispatchErrorWithPostInfo<_0> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DispatchErrorWithPostInfo { post_info, error } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("post_info"), - post_info as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("error"), - error as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl<_0: ::core::fmt::Debug> ::core::fmt::Debug - for DispatchErrorWithPostInfo<_0> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "DispatchErrorWithPostInfo", - "post_info", - &self.post_info, - "error", - &&self.error, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ModuleError { - pub index: ::core::primitive::u8, - pub error: [::core::primitive::u8; 4usize], - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for ModuleError { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(ModuleError { - index: { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ModuleError::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - error: { - let __codec_res_edqy = <[::core::primitive::u8; 4usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `ModuleError::error`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for ModuleError { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.index), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.error), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.index, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.error, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for ModuleError {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for ModuleError { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = ModuleError; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(ModuleError { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - error: { - let val = *vals - .get(&Some("error")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "error".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("error"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(ModuleError { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - error: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("error"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for ModuleError { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for ModuleError { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ModuleError { index, error } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("error"), - error as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for ModuleError { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let ModuleError { index, error } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("error"), - error as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for ModuleError { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ModuleError", - "index", - &self.index, - "error", - &&self.error, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum MultiSignature { - #[codec(index = 0)] - Ed25519(runtime_types::sp_core::ed25519::Signature), - #[codec(index = 1)] - Sr25519(runtime_types::sp_core::sr25519::Signature), - #[codec(index = 2)] - Ecdsa(runtime_types::sp_core::ecdsa::Signature), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MultiSignature { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `MultiSignature`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - MultiSignature::Ed25519({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiSignature::Ed25519.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - MultiSignature::Sr25519({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiSignature::Sr25519.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - MultiSignature::Ecdsa({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiSignature::Ecdsa.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `MultiSignature`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MultiSignature { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - MultiSignature::Ed25519(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - MultiSignature::Sr25519(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - MultiSignature::Ecdsa(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - MultiSignature::Ed25519(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - MultiSignature::Sr25519(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - MultiSignature::Ecdsa(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MultiSignature {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MultiSignature { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MultiSignature; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Ed25519" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - MultiSignature::Ed25519({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Sr25519" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - MultiSignature::Sr25519({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Ecdsa" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - MultiSignature::Ecdsa({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Ed25519", "Sr25519", "Ecdsa"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MultiSignature { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Ed25519(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Ed25519", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Sr25519(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Sr25519", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Ecdsa(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Ecdsa", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MultiSignature { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - MultiSignature::Ed25519(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Ed25519", - &__self_0, - ) - } - MultiSignature::Sr25519(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Sr25519", - &__self_0, - ) - } - MultiSignature::Ecdsa(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Ecdsa", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum MultiSigner { - #[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), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MultiSigner { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `MultiSigner`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - MultiSigner::Ed25519({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiSigner::Ed25519.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - MultiSigner::Sr25519({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiSigner::Sr25519.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - MultiSigner::Ecdsa({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiSigner::Ecdsa.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `MultiSigner`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MultiSigner { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - MultiSigner::Ed25519(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - MultiSigner::Sr25519(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - MultiSigner::Ecdsa(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - MultiSigner::Ed25519(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - MultiSigner::Sr25519(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - MultiSigner::Ecdsa(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MultiSigner {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MultiSigner { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MultiSigner; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Ed25519" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - MultiSigner::Ed25519({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Sr25519" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - MultiSigner::Sr25519({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Ecdsa" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - MultiSigner::Ecdsa({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Ed25519", "Sr25519", "Ecdsa"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MultiSigner { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Ed25519(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Ed25519", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Sr25519(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Sr25519", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Ecdsa(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Ecdsa", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MultiSigner { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - MultiSigner::Ed25519(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Ed25519", - &__self_0, - ) - } - MultiSigner::Sr25519(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Sr25519", - &__self_0, - ) - } - MultiSigner::Ecdsa(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Ecdsa", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum TokenError { - #[codec(index = 0)] - FundsUnavailable, - #[codec(index = 1)] - OnlyProvider, - #[codec(index = 2)] - BelowMinimum, - #[codec(index = 3)] - CannotCreate, - #[codec(index = 4)] - UnknownAsset, - #[codec(index = 5)] - Frozen, - #[codec(index = 6)] - Unsupported, - #[codec(index = 7)] - CannotCreateHold, - #[codec(index = 8)] - NotExpendable, - #[codec(index = 9)] - Blocked, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for TokenError { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `TokenError`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(TokenError::FundsUnavailable) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(TokenError::OnlyProvider) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(TokenError::BelowMinimum) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(TokenError::CannotCreate) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(TokenError::UnknownAsset) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(TokenError::Frozen) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(TokenError::Unsupported) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(TokenError::CannotCreateHold) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(TokenError::NotExpendable) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(TokenError::Blocked) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `TokenError`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for TokenError { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - TokenError::FundsUnavailable => 0_usize, - TokenError::OnlyProvider => 0_usize, - TokenError::BelowMinimum => 0_usize, - TokenError::CannotCreate => 0_usize, - TokenError::UnknownAsset => 0_usize, - TokenError::Frozen => 0_usize, - TokenError::Unsupported => 0_usize, - TokenError::CannotCreateHold => 0_usize, - TokenError::NotExpendable => 0_usize, - TokenError::Blocked => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - TokenError::FundsUnavailable => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - TokenError::OnlyProvider => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - TokenError::BelowMinimum => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - TokenError::CannotCreate => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - TokenError::UnknownAsset => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - TokenError::Frozen => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - TokenError::Unsupported => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - TokenError::CannotCreateHold => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - TokenError::NotExpendable => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - TokenError::Blocked => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for TokenError {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for TokenError { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = TokenError; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "FundsUnavailable" { - return Ok(TokenError::FundsUnavailable); - } - if value.name() == "OnlyProvider" { - return Ok(TokenError::OnlyProvider); - } - if value.name() == "BelowMinimum" { - return Ok(TokenError::BelowMinimum); - } - if value.name() == "CannotCreate" { - return Ok(TokenError::CannotCreate); - } - if value.name() == "UnknownAsset" { - return Ok(TokenError::UnknownAsset); - } - if value.name() == "Frozen" { - return Ok(TokenError::Frozen); - } - if value.name() == "Unsupported" { - return Ok(TokenError::Unsupported); - } - if value.name() == "CannotCreateHold" { - return Ok(TokenError::CannotCreateHold); - } - if value.name() == "NotExpendable" { - return Ok(TokenError::NotExpendable); - } - if value.name() == "Blocked" { - return Ok(TokenError::Blocked); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "FundsUnavailable", - "OnlyProvider", - "BelowMinimum", - "CannotCreate", - "UnknownAsset", - "Frozen", - "Unsupported", - "CannotCreateHold", - "NotExpendable", - "Blocked", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for TokenError { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::FundsUnavailable => { - ::subxt::ext::scale_encode::Variant { - name: "FundsUnavailable", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OnlyProvider => { - ::subxt::ext::scale_encode::Variant { - name: "OnlyProvider", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BelowMinimum => { - ::subxt::ext::scale_encode::Variant { - name: "BelowMinimum", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CannotCreate => { - ::subxt::ext::scale_encode::Variant { - name: "CannotCreate", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnknownAsset => { - ::subxt::ext::scale_encode::Variant { - name: "UnknownAsset", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Frozen => { - ::subxt::ext::scale_encode::Variant { - name: "Frozen", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unsupported => { - ::subxt::ext::scale_encode::Variant { - name: "Unsupported", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::CannotCreateHold => { - ::subxt::ext::scale_encode::Variant { - name: "CannotCreateHold", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotExpendable => { - ::subxt::ext::scale_encode::Variant { - name: "NotExpendable", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Blocked => { - ::subxt::ext::scale_encode::Variant { - name: "Blocked", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for TokenError { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - TokenError::FundsUnavailable => "FundsUnavailable", - TokenError::OnlyProvider => "OnlyProvider", - TokenError::BelowMinimum => "BelowMinimum", - TokenError::CannotCreate => "CannotCreate", - TokenError::UnknownAsset => "UnknownAsset", - TokenError::Frozen => "Frozen", - TokenError::Unsupported => "Unsupported", - TokenError::CannotCreateHold => "CannotCreateHold", - TokenError::NotExpendable => "NotExpendable", - TokenError::Blocked => "Blocked", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum TransactionalError { - #[codec(index = 0)] - LimitReached, - #[codec(index = 1)] - NoLayer, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for TransactionalError { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `TransactionalError`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(TransactionalError::LimitReached) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(TransactionalError::NoLayer) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `TransactionalError`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for TransactionalError { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - TransactionalError::LimitReached => 0_usize, - TransactionalError::NoLayer => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - TransactionalError::LimitReached => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - TransactionalError::NoLayer => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for TransactionalError {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for TransactionalError { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = TransactionalError; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "LimitReached" { - return Ok(TransactionalError::LimitReached); - } - if value.name() == "NoLayer" { - return Ok(TransactionalError::NoLayer); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["LimitReached", "NoLayer"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for TransactionalError { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::LimitReached => { - ::subxt::ext::scale_encode::Variant { - name: "LimitReached", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoLayer => { - ::subxt::ext::scale_encode::Variant { - name: "NoLayer", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for TransactionalError { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - TransactionalError::LimitReached => "LimitReached", - TransactionalError::NoLayer => "NoLayer", - }, - ) - } - } - } - pub mod sp_session { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MembershipProof { - pub session: ::core::primitive::u32, - pub trie_nodes: ::std::vec::Vec< - ::std::vec::Vec<::core::primitive::u8>, - >, - pub validator_count: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MembershipProof { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(MembershipProof { - session: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MembershipProof::session`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - trie_nodes: { - let __codec_res_edqy = <::std::vec::Vec< - ::std::vec::Vec<::core::primitive::u8>, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MembershipProof::trie_nodes`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - validator_count: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `MembershipProof::validator_count`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MembershipProof { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.session), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.trie_nodes), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.validator_count, - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.session, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.trie_nodes, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.validator_count, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MembershipProof {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MembershipProof { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MembershipProof; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MembershipProof { - session: { - let val = *vals - .get(&Some("session")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "session".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("session"))? - }, - trie_nodes: { - let val = *vals - .get(&Some("trie_nodes")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "trie_nodes".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("trie_nodes"))? - }, - validator_count: { - let val = *vals - .get(&Some("validator_count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "validator_count".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_count"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(MembershipProof { - session: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("session"))? - }, - trie_nodes: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("trie_nodes"))? - }, - validator_count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("validator_count"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for MembershipProof { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MembershipProof { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MembershipProof { session, trie_nodes, validator_count } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("session"), - session as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("trie_nodes"), - trie_nodes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_count"), - validator_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MembershipProof { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MembershipProof { session, trie_nodes, validator_count } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("session"), - session as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("trie_nodes"), - trie_nodes as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("validator_count"), - validator_count - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MembershipProof { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "MembershipProof", - "session", - &self.session, - "trie_nodes", - &self.trie_nodes, - "validator_count", - &&self.validator_count, - ) - } - } - } - pub mod sp_staking { - use super::runtime_types; - pub mod offence { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OffenceDetails<_0, _1> { - pub offender: _1, - pub reporters: ::std::vec::Vec<_0>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Decode - for OffenceDetails<_0, _1> - where - _1: ::subxt::ext::codec::Decode, - _1: ::subxt::ext::codec::Decode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Decode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Decode, - { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(OffenceDetails::<_0, _1> { - offender: { - let __codec_res_edqy = <_1 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OffenceDetails::offender`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - reporters: { - let __codec_res_edqy = <::std::vec::Vec< - _0, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `OffenceDetails::reporters`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::Encode - for OffenceDetails<_0, _1> - where - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.offender), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.reporters), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.offender, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.reporters, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl<_0, _1> ::subxt::ext::codec::EncodeLike - for OffenceDetails<_0, _1> - where - _1: ::subxt::ext::codec::Encode, - _1: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - ::std::vec::Vec<_0>: ::subxt::ext::codec::Encode, - {} - }; - const _: () = { - pub struct Visitor<_0, _1>( - ::core::marker::PhantomData<(_0, _1)>, - ); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl<_0, _1> ::subxt::ext::scale_decode::IntoVisitor - for OffenceDetails<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Visitor = Visitor<_0, _1>; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::Visitor - for Visitor<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = OffenceDetails<_0, _1>; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(OffenceDetails { - offender: { - let val = *vals - .get(&Some("offender")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "offender".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("offender"))? - }, - reporters: { - let val = *vals - .get(&Some("reporters")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reporters".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reporters"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(OffenceDetails { - offender: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("offender"))? - }, - reporters: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reporters"))? - }, - }) - } - } - impl<_0, _1> ::subxt::ext::scale_decode::DecodeAsFields - for OffenceDetails<_0, _1> - where - _0: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_0 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - _1: ::subxt::ext::scale_decode::IntoVisitor, - ::subxt::ext::scale_decode::Error: From< - <<_1 as ::subxt::ext::scale_decode::IntoVisitor>::Visitor as ::subxt::ext::scale_decode::Visitor>::Error, - >, - { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = >::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsType - for OffenceDetails<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OffenceDetails { offender, reporters } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("offender"), - offender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("reporters"), - reporters as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl<_0, _1> ::subxt::ext::scale_encode::EncodeAsFields - for OffenceDetails<_0, _1> - where - _0: ::subxt::ext::scale_encode::EncodeAsType, - _1: ::subxt::ext::scale_encode::EncodeAsType, - { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let OffenceDetails { offender, reporters } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("offender"), - offender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("reporters"), - reporters as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl< - _0: ::core::fmt::Debug, - _1: ::core::fmt::Debug, - > ::core::fmt::Debug for OffenceDetails<_0, _1> { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "OffenceDetails", - "offender", - &self.offender, - "reporters", - &&self.reporters, - ) - } - } - } - } - pub mod sp_version { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RuntimeVersion { - pub spec_name: ::std::string::String, - pub impl_name: ::std::string::String, - pub authoring_version: ::core::primitive::u32, - pub spec_version: ::core::primitive::u32, - pub impl_version: ::core::primitive::u32, - pub apis: ::std::vec::Vec< - ([::core::primitive::u8; 8usize], ::core::primitive::u32), - >, - pub transaction_version: ::core::primitive::u32, - pub state_version: ::core::primitive::u8, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RuntimeVersion { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(RuntimeVersion { - spec_name: { - let __codec_res_edqy = <::std::string::String as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeVersion::spec_name`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - impl_name: { - let __codec_res_edqy = <::std::string::String as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeVersion::impl_name`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - authoring_version: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RuntimeVersion::authoring_version`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - spec_version: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeVersion::spec_version`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - impl_version: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeVersion::impl_version`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - apis: { - let __codec_res_edqy = <::std::vec::Vec< - ([::core::primitive::u8; 8usize], ::core::primitive::u32), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeVersion::apis`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - transaction_version: { - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `RuntimeVersion::transaction_version`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - state_version: { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeVersion::state_version`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RuntimeVersion { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.spec_name), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.impl_name), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.authoring_version, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.spec_version), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.impl_version), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.apis), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &self.transaction_version, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.state_version), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.spec_name, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.impl_name, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.authoring_version, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.spec_version, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.impl_version, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.apis, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.transaction_version, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.state_version, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RuntimeVersion {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RuntimeVersion { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RuntimeVersion; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RuntimeVersion { - spec_name: { - let val = *vals - .get(&Some("spec_name")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "spec_name".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("spec_name"))? - }, - impl_name: { - let val = *vals - .get(&Some("impl_name")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "impl_name".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("impl_name"))? - }, - authoring_version: { - let val = *vals - .get(&Some("authoring_version")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "authoring_version".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("authoring_version"))? - }, - spec_version: { - let val = *vals - .get(&Some("spec_version")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "spec_version".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("spec_version"))? - }, - impl_version: { - let val = *vals - .get(&Some("impl_version")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "impl_version".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("impl_version"))? - }, - apis: { - let val = *vals - .get(&Some("apis")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "apis".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("apis"))? - }, - transaction_version: { - let val = *vals - .get(&Some("transaction_version")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "transaction_version".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("transaction_version"))? - }, - state_version: { - let val = *vals - .get(&Some("state_version")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "state_version".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("state_version"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 8usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 8usize, - }), - ); - } - let vals = value; - Ok(RuntimeVersion { - spec_name: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("spec_name"))? - }, - impl_name: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("impl_name"))? - }, - authoring_version: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("authoring_version"))? - }, - spec_version: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("spec_version"))? - }, - impl_version: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("impl_version"))? - }, - apis: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("apis"))? - }, - transaction_version: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("transaction_version"))? - }, - state_version: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("state_version"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for RuntimeVersion { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RuntimeVersion { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RuntimeVersion { - spec_name, - impl_name, - authoring_version, - spec_version, - impl_version, - apis, - transaction_version, - state_version, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("spec_name"), - spec_name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("impl_name"), - impl_name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("authoring_version"), - authoring_version - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("spec_version"), - spec_version - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("impl_version"), - impl_version - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("apis"), - apis as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("transaction_version"), - transaction_version - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("state_version"), - state_version - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RuntimeVersion { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RuntimeVersion { - spec_name, - impl_name, - authoring_version, - spec_version, - impl_version, - apis, - transaction_version, - state_version, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("spec_name"), - spec_name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("impl_name"), - impl_name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("authoring_version"), - authoring_version - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("spec_version"), - spec_version - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("impl_version"), - impl_version - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("apis"), - apis as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("transaction_version"), - transaction_version - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("state_version"), - state_version - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RuntimeVersion { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "spec_name", - "impl_name", - "authoring_version", - "spec_version", - "impl_version", - "apis", - "transaction_version", - "state_version", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.spec_name, - &self.impl_name, - &self.authoring_version, - &self.spec_version, - &self.impl_version, - &self.apis, - &self.transaction_version, - &&self.state_version, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "RuntimeVersion", - names, - values, - ) - } - } - } - pub mod sp_weights { - use super::runtime_types; - pub mod weight_v2 { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Weight { - #[codec(compact)] - pub ref_time: ::core::primitive::u64, - #[codec(compact)] - pub proof_size: ::core::primitive::u64, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Weight { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(Weight { - ref_time: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Weight::ref_time`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - proof_size: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Weight::proof_size`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Weight { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(&self.ref_time), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(&self.proof_size), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(&self.ref_time), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(&self.proof_size), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Weight {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Weight { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Weight; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Weight { - ref_time: { - let val = *vals - .get(&Some("ref_time")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ref_time".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ref_time"))? - }, - proof_size: { - let val = *vals - .get(&Some("proof_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "proof_size".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("proof_size"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(Weight { - ref_time: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ref_time"))? - }, - proof_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("proof_size"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Weight { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Weight { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Weight { ref_time, proof_size } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_time"), - ref_time as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proof_size"), - proof_size as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Weight { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Weight { ref_time, proof_size } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("ref_time"), - ref_time as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("proof_size"), - proof_size as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Weight { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Weight", - "ref_time", - &self.ref_time, - "proof_size", - &&self.proof_size, - ) - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RuntimeDbWeight { - pub read: ::core::primitive::u64, - pub write: ::core::primitive::u64, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for RuntimeDbWeight { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - ::core::result::Result::Ok(RuntimeDbWeight { - read: { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeDbWeight::read`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - write: { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `RuntimeDbWeight::write`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for RuntimeDbWeight { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.read), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.write), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.read, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.write, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for RuntimeDbWeight {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for RuntimeDbWeight { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = RuntimeDbWeight; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(RuntimeDbWeight { - read: { - let val = *vals - .get(&Some("read")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "read".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("read"))? - }, - write: { - let val = *vals - .get(&Some("write")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "write".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("write"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(RuntimeDbWeight { - read: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("read"))? - }, - write: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("write"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for RuntimeDbWeight { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for RuntimeDbWeight { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RuntimeDbWeight { read, write } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("read"), - read as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("write"), - write as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for RuntimeDbWeight { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let RuntimeDbWeight { read, write } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("read"), - read as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("write"), - write as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for RuntimeDbWeight { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "RuntimeDbWeight", - "read", - &self.read, - "write", - &&self.write, - ) - } - } - } - pub mod xcm { - use super::runtime_types; - pub mod double_encoded { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DoubleEncoded { - pub encoded: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DoubleEncoded { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(DoubleEncoded { - encoded: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DoubleEncoded::encoded`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DoubleEncoded { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.encoded) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.encoded, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.encoded) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.encoded, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DoubleEncoded {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for DoubleEncoded { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DoubleEncoded; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DoubleEncoded { - encoded: { - let val = *vals - .get(&Some("encoded")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "encoded".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("encoded"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(DoubleEncoded { - encoded: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("encoded"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for DoubleEncoded { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DoubleEncoded { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DoubleEncoded { encoded } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("encoded"), - encoded as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for DoubleEncoded { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DoubleEncoded { encoded } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("encoded"), - encoded as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DoubleEncoded { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "DoubleEncoded", - "encoded", - &&self.encoded, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DoubleEncoded2 { - pub encoded: ::std::vec::Vec<::core::primitive::u8>, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for DoubleEncoded2 { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(DoubleEncoded2 { - encoded: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `DoubleEncoded2::encoded`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for DoubleEncoded2 { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.encoded) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.encoded, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.encoded) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded( - &&self.encoded, - f, - ) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for DoubleEncoded2 {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for DoubleEncoded2 { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = DoubleEncoded2; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(DoubleEncoded2 { - encoded: { - let val = *vals - .get(&Some("encoded")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "encoded".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("encoded"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok(DoubleEncoded2 { - encoded: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("encoded"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for DoubleEncoded2 { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for DoubleEncoded2 { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DoubleEncoded2 { encoded } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("encoded"), - encoded as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for DoubleEncoded2 { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let DoubleEncoded2 { encoded } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("encoded"), - encoded as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for DoubleEncoded2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "DoubleEncoded2", - "encoded", - &&self.encoded, - ) - } - } - } - pub mod v2 { - use super::runtime_types; - pub mod junction { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Junction { - #[codec(index = 0)] - Parachain(#[codec(compact)] ::core::primitive::u32), - #[codec(index = 1)] - AccountId32 { - network: runtime_types::xcm::v2::NetworkId, - id: [::core::primitive::u8; 32usize], - }, - #[codec(index = 2)] - AccountIndex64 { - network: runtime_types::xcm::v2::NetworkId, - #[codec(compact)] - index: ::core::primitive::u64, - }, - #[codec(index = 3)] - AccountKey20 { - network: runtime_types::xcm::v2::NetworkId, - key: [::core::primitive::u8; 20usize], - }, - #[codec(index = 4)] - PalletInstance(::core::primitive::u8), - #[codec(index = 5)] - GeneralIndex(#[codec(compact)] ::core::primitive::u128), - #[codec(index = 6)] - GeneralKey( - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, - ), - #[codec(index = 7)] - OnlyChild, - #[codec(index = 8)] - Plurality { - id: runtime_types::xcm::v2::BodyId, - part: runtime_types::xcm::v2::BodyPart, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Junction { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Junction`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junction::Parachain({ - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::Parachain.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Junction::AccountId32 { - network: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::AccountId32::network`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - id: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::AccountId32::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Junction::AccountIndex64 { - network: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Junction::AccountIndex64::network`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Junction::AccountIndex64::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Junction::AccountKey20 { - network: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Junction::AccountKey20::network`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - key: { - let __codec_res_edqy = <[::core::primitive::u8; 20usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::AccountKey20::key`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junction::PalletInstance({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::PalletInstance.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junction::GeneralIndex({ - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::GeneralIndex.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junction::GeneralKey({ - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::GeneralKey.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Junction::OnlyChild) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Junction::Plurality { - id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::Plurality::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - part: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::Plurality::part`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Junction`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Junction { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Junction::Parachain(ref aa) => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(aa), - ), - ) - } - Junction::AccountId32 { ref network, ref id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(network), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - } - Junction::AccountIndex64 { ref network, ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(network), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(index), - ), - ) - } - Junction::AccountKey20 { ref network, ref key } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(network), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(key)) - } - Junction::PalletInstance(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Junction::GeneralIndex(ref aa) => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(aa), - ), - ) - } - Junction::GeneralKey(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Junction::OnlyChild => 0_usize, - Junction::Plurality { ref id, ref part } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(part), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Junction::Parachain(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(aa), - __codec_dest_edqy, - ); - } - } - Junction::AccountId32 { ref network, ref id } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - network, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - } - Junction::AccountIndex64 { ref network, ref index } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - network, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - } - Junction::AccountKey20 { ref network, ref key } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - network, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - key, - __codec_dest_edqy, - ); - } - Junction::PalletInstance(ref aa) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Junction::GeneralIndex(ref aa) => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(aa), - __codec_dest_edqy, - ); - } - } - Junction::GeneralKey(ref aa) => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Junction::OnlyChild => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Junction::Plurality { ref id, ref part } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - part, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Junction {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Junction { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Junction; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Parachain" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Junction::Parachain({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "AccountId32" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Junction::AccountId32 { - network: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("network"))? - }, - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Junction::AccountId32 { - network: { - let val = *vals - .get(&Some("network")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "network".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("network"))? - }, - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - }; - } - if value.name() == "AccountIndex64" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Junction::AccountIndex64 { - network: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("network"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Junction::AccountIndex64 { - network: { - let val = *vals - .get(&Some("network")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "network".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("network"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "AccountKey20" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Junction::AccountKey20 { - network: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("network"))? - }, - key: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("key"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Junction::AccountKey20 { - network: { - let val = *vals - .get(&Some("network")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "network".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("network"))? - }, - key: { - let val = *vals - .get(&Some("key")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "key".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("key"))? - }, - }) - }; - } - if value.name() == "PalletInstance" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Junction::PalletInstance({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "GeneralIndex" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Junction::GeneralIndex({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "GeneralKey" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Junction::GeneralKey({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "OnlyChild" { - return Ok(Junction::OnlyChild); - } - if value.name() == "Plurality" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Junction::Plurality { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - part: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("part"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Junction::Plurality { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - part: { - let val = *vals - .get(&Some("part")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "part".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("part"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Parachain", - "AccountId32", - "AccountIndex64", - "AccountKey20", - "PalletInstance", - "GeneralIndex", - "GeneralKey", - "OnlyChild", - "Plurality", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Junction { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Parachain(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Parachain", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AccountId32 { network, id } => { - ::subxt::ext::scale_encode::Variant { - name: "AccountId32", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("network"), - network as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AccountIndex64 { network, index } => { - ::subxt::ext::scale_encode::Variant { - name: "AccountIndex64", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("network"), - network as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AccountKey20 { network, key } => { - ::subxt::ext::scale_encode::Variant { - name: "AccountKey20", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("network"), - network as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("key"), - key as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PalletInstance(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "PalletInstance", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::GeneralIndex(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "GeneralIndex", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::GeneralKey(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "GeneralKey", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OnlyChild => { - ::subxt::ext::scale_encode::Variant { - name: "OnlyChild", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Plurality { id, part } => { - ::subxt::ext::scale_encode::Variant { - name: "Plurality", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("part"), - part as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Junction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Junction::Parachain(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Parachain", - &__self_0, - ) - } - Junction::AccountId32 { - network: __self_0, - id: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AccountId32", - "network", - __self_0, - "id", - &__self_1, - ) - } - Junction::AccountIndex64 { - network: __self_0, - index: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AccountIndex64", - "network", - __self_0, - "index", - &__self_1, - ) - } - Junction::AccountKey20 { - network: __self_0, - key: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AccountKey20", - "network", - __self_0, - "key", - &__self_1, - ) - } - Junction::PalletInstance(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "PalletInstance", - &__self_0, - ) - } - Junction::GeneralIndex(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "GeneralIndex", - &__self_0, - ) - } - Junction::GeneralKey(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "GeneralKey", - &__self_0, - ) - } - Junction::OnlyChild => { - ::core::fmt::Formatter::write_str(f, "OnlyChild") - } - Junction::Plurality { id: __self_0, part: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Plurality", - "id", - __self_0, - "part", - &__self_1, - ) - } - } - } - } - } - pub mod multiasset { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum AssetId { - #[codec(index = 0)] - Concrete( - runtime_types::xcm::v2::multilocation::MultiLocation, - ), - #[codec(index = 1)] - Abstract(::std::vec::Vec<::core::primitive::u8>), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AssetId { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `AssetId`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AssetId::Concrete({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetId::Concrete.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AssetId::Abstract({ - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetId::Abstract.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `AssetId`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AssetId { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - AssetId::Concrete(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - AssetId::Abstract(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - AssetId::Concrete(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - AssetId::Abstract(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AssetId {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AssetId { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AssetId; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Concrete" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - AssetId::Concrete({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Abstract" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - AssetId::Abstract({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Concrete", "Abstract"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AssetId { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Concrete(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Concrete", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Abstract(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Abstract", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AssetId { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - AssetId::Concrete(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Concrete", - &__self_0, - ) - } - AssetId::Abstract(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Abstract", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum AssetInstance { - #[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>), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AssetInstance { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `AssetInstance`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(AssetInstance::Undefined) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AssetInstance::Index({ - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetInstance::Index.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AssetInstance::Array4({ - let __codec_res_edqy = <[::core::primitive::u8; 4usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetInstance::Array4.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AssetInstance::Array8({ - let __codec_res_edqy = <[::core::primitive::u8; 8usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetInstance::Array8.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AssetInstance::Array16({ - let __codec_res_edqy = <[::core::primitive::u8; 16usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetInstance::Array16.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AssetInstance::Array32({ - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetInstance::Array32.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AssetInstance::Blob({ - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetInstance::Blob.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `AssetInstance`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AssetInstance { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - AssetInstance::Undefined => 0_usize, - AssetInstance::Index(ref aa) => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(aa), - ), - ) - } - AssetInstance::Array4(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - AssetInstance::Array8(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - AssetInstance::Array16(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - AssetInstance::Array32(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - AssetInstance::Blob(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - AssetInstance::Undefined => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - AssetInstance::Index(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(aa), - __codec_dest_edqy, - ); - } - } - AssetInstance::Array4(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - AssetInstance::Array8(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - AssetInstance::Array16(ref aa) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - AssetInstance::Array32(ref aa) => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - AssetInstance::Blob(ref aa) => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AssetInstance {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for AssetInstance { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AssetInstance; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Undefined" { - return Ok(AssetInstance::Undefined); - } - if value.name() == "Index" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - AssetInstance::Index({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Array4" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - AssetInstance::Array4({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Array8" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - AssetInstance::Array8({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Array16" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - AssetInstance::Array16({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Array32" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - AssetInstance::Array32({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Blob" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - AssetInstance::Blob({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Undefined", - "Index", - "Array4", - "Array8", - "Array16", - "Array32", - "Blob", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AssetInstance { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Undefined => { - ::subxt::ext::scale_encode::Variant { - name: "Undefined", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Index(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Index", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Array4(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Array4", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Array8(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Array8", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Array16(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Array16", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Array32(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Array32", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Blob(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Blob", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AssetInstance { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - AssetInstance::Undefined => { - ::core::fmt::Formatter::write_str(f, "Undefined") - } - AssetInstance::Index(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Index", - &__self_0, - ) - } - AssetInstance::Array4(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Array4", - &__self_0, - ) - } - AssetInstance::Array8(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Array8", - &__self_0, - ) - } - AssetInstance::Array16(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Array16", - &__self_0, - ) - } - AssetInstance::Array32(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Array32", - &__self_0, - ) - } - AssetInstance::Blob(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Blob", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Fungibility { - #[codec(index = 0)] - Fungible(#[codec(compact)] ::core::primitive::u128), - #[codec(index = 1)] - NonFungible( - runtime_types::xcm::v2::multiasset::AssetInstance, - ), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Fungibility { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Fungibility`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Fungibility::Fungible({ - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Fungibility::Fungible.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Fungibility::NonFungible({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Fungibility::NonFungible.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Fungibility`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Fungibility { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Fungibility::Fungible(ref aa) => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(aa), - ), - ) - } - Fungibility::NonFungible(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Fungibility::Fungible(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(aa), - __codec_dest_edqy, - ); - } - } - Fungibility::NonFungible(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Fungibility {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for Fungibility { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Fungibility; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Fungible" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Fungibility::Fungible({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "NonFungible" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Fungibility::NonFungible({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Fungible", "NonFungible"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Fungibility { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Fungible(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Fungible", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NonFungible(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "NonFungible", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Fungibility { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Fungibility::Fungible(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Fungible", - &__self_0, - ) - } - Fungibility::NonFungible(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "NonFungible", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MultiAsset { - pub id: runtime_types::xcm::v2::multiasset::AssetId, - pub fun: runtime_types::xcm::v2::multiasset::Fungibility, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MultiAsset { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(MultiAsset { - id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiAsset::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fun: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiAsset::fun`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MultiAsset { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.fun), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.fun, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MultiAsset {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MultiAsset { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MultiAsset; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MultiAsset { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - fun: { - let val = *vals - .get(&Some("fun")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fun".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fun"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(MultiAsset { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - fun: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fun"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for MultiAsset { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MultiAsset { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultiAsset { id, fun } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fun"), - fun as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MultiAsset { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultiAsset { id, fun } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fun"), - fun as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MultiAsset { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MultiAsset", - "id", - &self.id, - "fun", - &&self.fun, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum MultiAssetFilter { - #[codec(index = 0)] - Definite(runtime_types::xcm::v2::multiasset::MultiAssets), - #[codec(index = 1)] - Wild(runtime_types::xcm::v2::multiasset::WildMultiAsset), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MultiAssetFilter { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `MultiAssetFilter`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - MultiAssetFilter::Definite({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiAssetFilter::Definite.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - MultiAssetFilter::Wild({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiAssetFilter::Wild.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `MultiAssetFilter`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MultiAssetFilter { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - MultiAssetFilter::Definite(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - MultiAssetFilter::Wild(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - MultiAssetFilter::Definite(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - MultiAssetFilter::Wild(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MultiAssetFilter {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for MultiAssetFilter { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MultiAssetFilter; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Definite" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - MultiAssetFilter::Definite({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Wild" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - MultiAssetFilter::Wild({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Definite", "Wild"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for MultiAssetFilter { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Definite(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Definite", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Wild(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Wild", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MultiAssetFilter { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - MultiAssetFilter::Definite(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Definite", - &__self_0, - ) - } - MultiAssetFilter::Wild(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Wild", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MultiAssets( - pub ::std::vec::Vec< - runtime_types::xcm::v2::multiasset::MultiAsset, - >, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MultiAssets { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - MultiAssets({ - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::xcm::v2::multiasset::MultiAsset, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiAssets.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MultiAssets { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MultiAssets {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for MultiAssets { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MultiAssets; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - MultiAssets({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for MultiAssets { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MultiAssets { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultiAssets(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MultiAssets { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultiAssets(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MultiAssets { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "MultiAssets", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum WildFungibility { - #[codec(index = 0)] - Fungible, - #[codec(index = 1)] - NonFungible, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for WildFungibility { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `WildFungibility`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(WildFungibility::Fungible) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(WildFungibility::NonFungible) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `WildFungibility`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for WildFungibility { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - WildFungibility::Fungible => 0_usize, - WildFungibility::NonFungible => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - WildFungibility::Fungible => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - WildFungibility::NonFungible => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for WildFungibility {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for WildFungibility { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = WildFungibility; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Fungible" { - return Ok(WildFungibility::Fungible); - } - if value.name() == "NonFungible" { - return Ok(WildFungibility::NonFungible); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Fungible", "NonFungible"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for WildFungibility { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Fungible => { - ::subxt::ext::scale_encode::Variant { - name: "Fungible", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NonFungible => { - ::subxt::ext::scale_encode::Variant { - name: "NonFungible", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for WildFungibility { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - WildFungibility::Fungible => "Fungible", - WildFungibility::NonFungible => "NonFungible", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum WildMultiAsset { - #[codec(index = 0)] - All, - #[codec(index = 1)] - AllOf { - id: runtime_types::xcm::v2::multiasset::AssetId, - fun: runtime_types::xcm::v2::multiasset::WildFungibility, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for WildMultiAsset { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `WildMultiAsset`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(WildMultiAsset::All) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(WildMultiAsset::AllOf { - id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WildMultiAsset::AllOf::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fun: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WildMultiAsset::AllOf::fun`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `WildMultiAsset`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for WildMultiAsset { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - WildMultiAsset::All => 0_usize, - WildMultiAsset::AllOf { ref id, ref fun } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(fun)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - WildMultiAsset::All => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - WildMultiAsset::AllOf { ref id, ref fun } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - fun, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for WildMultiAsset {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for WildMultiAsset { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = WildMultiAsset; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "All" { - return Ok(WildMultiAsset::All); - } - if value.name() == "AllOf" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(WildMultiAsset::AllOf { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - fun: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fun"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(WildMultiAsset::AllOf { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - fun: { - let val = *vals - .get(&Some("fun")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fun".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fun"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["All", "AllOf"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for WildMultiAsset { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::All => { - ::subxt::ext::scale_encode::Variant { - name: "All", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AllOf { id, fun } => { - ::subxt::ext::scale_encode::Variant { - name: "AllOf", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fun"), - fun as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for WildMultiAsset { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - WildMultiAsset::All => { - ::core::fmt::Formatter::write_str(f, "All") - } - WildMultiAsset::AllOf { id: __self_0, fun: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AllOf", - "id", - __self_0, - "fun", - &__self_1, - ) - } - } - } - } - } - pub mod multilocation { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Junctions { - #[codec(index = 0)] - Here, - #[codec(index = 1)] - X1(runtime_types::xcm::v2::junction::Junction), - #[codec(index = 2)] - X2( - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - ), - #[codec(index = 3)] - X3( - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - ), - #[codec(index = 4)] - X4( - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - ), - #[codec(index = 5)] - X5( - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - ), - #[codec(index = 6)] - X6( - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - ), - #[codec(index = 7)] - X7( - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - ), - #[codec(index = 8)] - X8( - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - ), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Junctions { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Junctions`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Junctions::Here) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junctions::X1({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X1.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junctions::X2( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X2.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X2.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junctions::X3( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X3.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X3.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X3.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junctions::X4( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X4.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X4.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X4.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X4.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junctions::X5( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X5.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X5.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X5.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X5.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X5.4`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junctions::X6( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X6.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X6.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X6.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X6.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X6.4`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X6.5`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junctions::X7( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X7.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X7.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X7.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X7.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X7.4`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X7.5`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X7.6`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junctions::X8( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X8.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X8.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X8.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X8.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X8.4`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X8.5`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X8.6`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X8.7`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Junctions`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Junctions { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Junctions::Here => 0_usize, - Junctions::X1(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Junctions::X2(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Junctions::X3(ref aa, ref ba, ref ca) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - } - Junctions::X4(ref aa, ref ba, ref ca, ref da) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(da)) - } - Junctions::X5(ref aa, ref ba, ref ca, ref da, ref ea) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(da)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ea)) - } - Junctions::X6( - ref aa, - ref ba, - ref ca, - ref da, - ref ea, - ref fa, - ) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(da)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ea)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(fa)) - } - Junctions::X7( - ref aa, - ref ba, - ref ca, - ref da, - ref ea, - ref fa, - ref ga, - ) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(da)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ea)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(fa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ga)) - } - Junctions::X8( - ref aa, - ref ba, - ref ca, - ref da, - ref ea, - ref fa, - ref ga, - ref ha, - ) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(da)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ea)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(fa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ga)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ha)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Junctions::Here => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Junctions::X1(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Junctions::X2(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Junctions::X3(ref aa, ref ba, ref ca) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - } - Junctions::X4(ref aa, ref ba, ref ca, ref da) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - da, - __codec_dest_edqy, - ); - } - Junctions::X5(ref aa, ref ba, ref ca, ref da, ref ea) => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - da, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ea, - __codec_dest_edqy, - ); - } - Junctions::X6( - ref aa, - ref ba, - ref ca, - ref da, - ref ea, - ref fa, - ) => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - da, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ea, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - fa, - __codec_dest_edqy, - ); - } - Junctions::X7( - ref aa, - ref ba, - ref ca, - ref da, - ref ea, - ref fa, - ref ga, - ) => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - da, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ea, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - fa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ga, - __codec_dest_edqy, - ); - } - Junctions::X8( - ref aa, - ref ba, - ref ca, - ref da, - ref ea, - ref fa, - ref ga, - ref ha, - ) => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - da, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ea, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - fa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ga, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ha, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Junctions {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Junctions { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Junctions; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Here" { - return Ok(Junctions::Here); - } - if value.name() == "X1" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Junctions::X1({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "X2" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Junctions::X2( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "X3" { - let fields = value.fields(); - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - return Ok( - Junctions::X3( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ); - } - if value.name() == "X4" { - let fields = value.fields(); - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - return Ok( - Junctions::X4( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - ), - ); - } - if value.name() == "X5" { - let fields = value.fields(); - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - return Ok( - Junctions::X5( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(4usize))? - }, - ), - ); - } - if value.name() == "X6" { - let fields = value.fields(); - if fields.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = fields; - return Ok( - Junctions::X6( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(4usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(5usize))? - }, - ), - ); - } - if value.name() == "X7" { - let fields = value.fields(); - if fields.remaining() != 7usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 7usize, - }), - ); - } - let vals = fields; - return Ok( - Junctions::X7( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(4usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(5usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(6usize))? - }, - ), - ); - } - if value.name() == "X8" { - let fields = value.fields(); - if fields.remaining() != 8usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 8usize, - }), - ); - } - let vals = fields; - return Ok( - Junctions::X8( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(4usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(5usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(6usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(7usize))? - }, - ), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Here", - "X1", - "X2", - "X3", - "X4", - "X5", - "X6", - "X7", - "X8", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Junctions { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Here => { - ::subxt::ext::scale_encode::Variant { - name: "Here", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::X1(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "X1", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::X2(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "X2", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::X3(_0, _1, _2) => { - ::subxt::ext::scale_encode::Variant { - name: "X3", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::X4(_0, _1, _2, _3) => { - ::subxt::ext::scale_encode::Variant { - name: "X4", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::X5(_0, _1, _2, _3, _4) => { - ::subxt::ext::scale_encode::Variant { - name: "X5", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _4 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::X6(_0, _1, _2, _3, _4, _5) => { - ::subxt::ext::scale_encode::Variant { - name: "X6", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _4 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _5 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::X7(_0, _1, _2, _3, _4, _5, _6) => { - ::subxt::ext::scale_encode::Variant { - name: "X7", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _4 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _5 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _6 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::X8(_0, _1, _2, _3, _4, _5, _6, _7) => { - ::subxt::ext::scale_encode::Variant { - name: "X8", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _4 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _5 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _6 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _7 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Junctions { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Junctions::Here => { - ::core::fmt::Formatter::write_str(f, "Here") - } - Junctions::X1(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "X1", - &__self_0, - ) - } - Junctions::X2(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "X2", - __self_0, - &__self_1, - ) - } - Junctions::X3(__self_0, __self_1, __self_2) => { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "X3", - __self_0, - __self_1, - &__self_2, - ) - } - Junctions::X4(__self_0, __self_1, __self_2, __self_3) => { - ::core::fmt::Formatter::debug_tuple_field4_finish( - f, - "X4", - __self_0, - __self_1, - __self_2, - &__self_3, - ) - } - Junctions::X5( - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - ) => { - ::core::fmt::Formatter::debug_tuple_field5_finish( - f, - "X5", - __self_0, - __self_1, - __self_2, - __self_3, - &__self_4, - ) - } - Junctions::X6( - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - __self_5, - ) => { - let values: &[&dyn ::core::fmt::Debug] = &[ - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - &__self_5, - ]; - ::core::fmt::Formatter::debug_tuple_fields_finish( - f, - "X6", - values, - ) - } - Junctions::X7( - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - __self_5, - __self_6, - ) => { - let values: &[&dyn ::core::fmt::Debug] = &[ - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - __self_5, - &__self_6, - ]; - ::core::fmt::Formatter::debug_tuple_fields_finish( - f, - "X7", - values, - ) - } - Junctions::X8( - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - __self_5, - __self_6, - __self_7, - ) => { - let values: &[&dyn ::core::fmt::Debug] = &[ - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - __self_5, - __self_6, - &__self_7, - ]; - ::core::fmt::Formatter::debug_tuple_fields_finish( - f, - "X8", - values, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MultiLocation { - pub parents: ::core::primitive::u8, - pub interior: runtime_types::xcm::v2::multilocation::Junctions, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MultiLocation { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(MultiLocation { - parents: { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiLocation::parents`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - interior: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiLocation::interior`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MultiLocation { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.parents), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.interior), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.parents, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.interior, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MultiLocation {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for MultiLocation { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MultiLocation; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MultiLocation { - parents: { - let val = *vals - .get(&Some("parents")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parents".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("parents"))? - }, - interior: { - let val = *vals - .get(&Some("interior")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "interior".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("interior"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(MultiLocation { - parents: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("parents"))? - }, - interior: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("interior"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for MultiLocation { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MultiLocation { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultiLocation { parents, interior } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parents"), - parents as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("interior"), - interior as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for MultiLocation { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultiLocation { parents, interior } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parents"), - parents as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("interior"), - interior as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MultiLocation { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MultiLocation", - "parents", - &self.parents, - "interior", - &&self.interior, - ) - } - } - } - pub mod traits { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - 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, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Overflow) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Unimplemented) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UntrustedReserveLocation) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UntrustedTeleportLocation) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MultiLocationFull) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::MultiLocationNotInvertible, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::BadOrigin) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidLocation) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AssetNotFound) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::FailedToTransactAsset) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotWithdrawable) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::LocationCannotHold) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ExceedsMaxMessageSize) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::DestinationUnsupported) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Transport) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Unroutable) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UnknownClaim) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::FailedToDecode) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MaxWeightInvalid) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotHoldingFees) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooExpensive) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::Trap({ - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Error::Trap.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 22u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UnhandledXcmVersion) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 23u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::WeightLimitReached({ - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Error::WeightLimitReached.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 24u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Barrier) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 25u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::WeightNotComputable) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::Overflow => 0_usize, - Error::Unimplemented => 0_usize, - Error::UntrustedReserveLocation => 0_usize, - Error::UntrustedTeleportLocation => 0_usize, - Error::MultiLocationFull => 0_usize, - Error::MultiLocationNotInvertible => 0_usize, - Error::BadOrigin => 0_usize, - Error::InvalidLocation => 0_usize, - Error::AssetNotFound => 0_usize, - Error::FailedToTransactAsset => 0_usize, - Error::NotWithdrawable => 0_usize, - Error::LocationCannotHold => 0_usize, - Error::ExceedsMaxMessageSize => 0_usize, - Error::DestinationUnsupported => 0_usize, - Error::Transport => 0_usize, - Error::Unroutable => 0_usize, - Error::UnknownClaim => 0_usize, - Error::FailedToDecode => 0_usize, - Error::MaxWeightInvalid => 0_usize, - Error::NotHoldingFees => 0_usize, - Error::TooExpensive => 0_usize, - Error::Trap(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Error::UnhandledXcmVersion => 0_usize, - Error::WeightLimitReached(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Error::Barrier => 0_usize, - Error::WeightNotComputable => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::Overflow => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::Unimplemented => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::UntrustedReserveLocation => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::UntrustedTeleportLocation => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::MultiLocationFull => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::MultiLocationNotInvertible => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::BadOrigin => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::InvalidLocation => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::AssetNotFound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::FailedToTransactAsset => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::NotWithdrawable => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Error::LocationCannotHold => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - Error::ExceedsMaxMessageSize => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - Error::DestinationUnsupported => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - } - Error::Transport => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - } - Error::Unroutable => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - } - Error::UnknownClaim => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - } - Error::FailedToDecode => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - } - Error::MaxWeightInvalid => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - } - Error::NotHoldingFees => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - } - Error::TooExpensive => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - } - Error::Trap(ref aa) => { - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Error::UnhandledXcmVersion => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(22u8 as ::core::primitive::u8); - } - Error::WeightLimitReached(ref aa) => { - __codec_dest_edqy.push_byte(23u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Error::Barrier => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(24u8 as ::core::primitive::u8); - } - Error::WeightNotComputable => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(25u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Overflow" { - return Ok(Error::Overflow); - } - if value.name() == "Unimplemented" { - return Ok(Error::Unimplemented); - } - if value.name() == "UntrustedReserveLocation" { - return Ok(Error::UntrustedReserveLocation); - } - if value.name() == "UntrustedTeleportLocation" { - return Ok(Error::UntrustedTeleportLocation); - } - if value.name() == "MultiLocationFull" { - return Ok(Error::MultiLocationFull); - } - if value.name() == "MultiLocationNotInvertible" { - return Ok(Error::MultiLocationNotInvertible); - } - if value.name() == "BadOrigin" { - return Ok(Error::BadOrigin); - } - if value.name() == "InvalidLocation" { - return Ok(Error::InvalidLocation); - } - if value.name() == "AssetNotFound" { - return Ok(Error::AssetNotFound); - } - if value.name() == "FailedToTransactAsset" { - return Ok(Error::FailedToTransactAsset); - } - if value.name() == "NotWithdrawable" { - return Ok(Error::NotWithdrawable); - } - if value.name() == "LocationCannotHold" { - return Ok(Error::LocationCannotHold); - } - if value.name() == "ExceedsMaxMessageSize" { - return Ok(Error::ExceedsMaxMessageSize); - } - if value.name() == "DestinationUnsupported" { - return Ok(Error::DestinationUnsupported); - } - if value.name() == "Transport" { - return Ok(Error::Transport); - } - if value.name() == "Unroutable" { - return Ok(Error::Unroutable); - } - if value.name() == "UnknownClaim" { - return Ok(Error::UnknownClaim); - } - if value.name() == "FailedToDecode" { - return Ok(Error::FailedToDecode); - } - if value.name() == "MaxWeightInvalid" { - return Ok(Error::MaxWeightInvalid); - } - if value.name() == "NotHoldingFees" { - return Ok(Error::NotHoldingFees); - } - if value.name() == "TooExpensive" { - return Ok(Error::TooExpensive); - } - if value.name() == "Trap" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Error::Trap({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "UnhandledXcmVersion" { - return Ok(Error::UnhandledXcmVersion); - } - if value.name() == "WeightLimitReached" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Error::WeightLimitReached({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Barrier" { - return Ok(Error::Barrier); - } - if value.name() == "WeightNotComputable" { - return Ok(Error::WeightNotComputable); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Overflow", - "Unimplemented", - "UntrustedReserveLocation", - "UntrustedTeleportLocation", - "MultiLocationFull", - "MultiLocationNotInvertible", - "BadOrigin", - "InvalidLocation", - "AssetNotFound", - "FailedToTransactAsset", - "NotWithdrawable", - "LocationCannotHold", - "ExceedsMaxMessageSize", - "DestinationUnsupported", - "Transport", - "Unroutable", - "UnknownClaim", - "FailedToDecode", - "MaxWeightInvalid", - "NotHoldingFees", - "TooExpensive", - "Trap", - "UnhandledXcmVersion", - "WeightLimitReached", - "Barrier", - "WeightNotComputable", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Overflow => { - ::subxt::ext::scale_encode::Variant { - name: "Overflow", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unimplemented => { - ::subxt::ext::scale_encode::Variant { - name: "Unimplemented", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UntrustedReserveLocation => { - ::subxt::ext::scale_encode::Variant { - name: "UntrustedReserveLocation", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UntrustedTeleportLocation => { - ::subxt::ext::scale_encode::Variant { - name: "UntrustedTeleportLocation", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MultiLocationFull => { - ::subxt::ext::scale_encode::Variant { - name: "MultiLocationFull", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MultiLocationNotInvertible => { - ::subxt::ext::scale_encode::Variant { - name: "MultiLocationNotInvertible", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BadOrigin => { - ::subxt::ext::scale_encode::Variant { - name: "BadOrigin", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidLocation => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidLocation", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AssetNotFound => { - ::subxt::ext::scale_encode::Variant { - name: "AssetNotFound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FailedToTransactAsset => { - ::subxt::ext::scale_encode::Variant { - name: "FailedToTransactAsset", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotWithdrawable => { - ::subxt::ext::scale_encode::Variant { - name: "NotWithdrawable", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LocationCannotHold => { - ::subxt::ext::scale_encode::Variant { - name: "LocationCannotHold", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExceedsMaxMessageSize => { - ::subxt::ext::scale_encode::Variant { - name: "ExceedsMaxMessageSize", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DestinationUnsupported => { - ::subxt::ext::scale_encode::Variant { - name: "DestinationUnsupported", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Transport => { - ::subxt::ext::scale_encode::Variant { - name: "Transport", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unroutable => { - ::subxt::ext::scale_encode::Variant { - name: "Unroutable", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnknownClaim => { - ::subxt::ext::scale_encode::Variant { - name: "UnknownClaim", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FailedToDecode => { - ::subxt::ext::scale_encode::Variant { - name: "FailedToDecode", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MaxWeightInvalid => { - ::subxt::ext::scale_encode::Variant { - name: "MaxWeightInvalid", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotHoldingFees => { - ::subxt::ext::scale_encode::Variant { - name: "NotHoldingFees", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooExpensive => { - ::subxt::ext::scale_encode::Variant { - name: "TooExpensive", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Trap(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Trap", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnhandledXcmVersion => { - ::subxt::ext::scale_encode::Variant { - name: "UnhandledXcmVersion", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WeightLimitReached(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "WeightLimitReached", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Barrier => { - ::subxt::ext::scale_encode::Variant { - name: "Barrier", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WeightNotComputable => { - ::subxt::ext::scale_encode::Variant { - name: "WeightNotComputable", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Error::Overflow => { - ::core::fmt::Formatter::write_str(f, "Overflow") - } - Error::Unimplemented => { - ::core::fmt::Formatter::write_str(f, "Unimplemented") - } - Error::UntrustedReserveLocation => { - ::core::fmt::Formatter::write_str( - f, - "UntrustedReserveLocation", - ) - } - Error::UntrustedTeleportLocation => { - ::core::fmt::Formatter::write_str( - f, - "UntrustedTeleportLocation", - ) - } - Error::MultiLocationFull => { - ::core::fmt::Formatter::write_str(f, "MultiLocationFull") - } - Error::MultiLocationNotInvertible => { - ::core::fmt::Formatter::write_str( - f, - "MultiLocationNotInvertible", - ) - } - Error::BadOrigin => { - ::core::fmt::Formatter::write_str(f, "BadOrigin") - } - Error::InvalidLocation => { - ::core::fmt::Formatter::write_str(f, "InvalidLocation") - } - Error::AssetNotFound => { - ::core::fmt::Formatter::write_str(f, "AssetNotFound") - } - Error::FailedToTransactAsset => { - ::core::fmt::Formatter::write_str( - f, - "FailedToTransactAsset", - ) - } - Error::NotWithdrawable => { - ::core::fmt::Formatter::write_str(f, "NotWithdrawable") - } - Error::LocationCannotHold => { - ::core::fmt::Formatter::write_str(f, "LocationCannotHold") - } - Error::ExceedsMaxMessageSize => { - ::core::fmt::Formatter::write_str( - f, - "ExceedsMaxMessageSize", - ) - } - Error::DestinationUnsupported => { - ::core::fmt::Formatter::write_str( - f, - "DestinationUnsupported", - ) - } - Error::Transport => { - ::core::fmt::Formatter::write_str(f, "Transport") - } - Error::Unroutable => { - ::core::fmt::Formatter::write_str(f, "Unroutable") - } - Error::UnknownClaim => { - ::core::fmt::Formatter::write_str(f, "UnknownClaim") - } - Error::FailedToDecode => { - ::core::fmt::Formatter::write_str(f, "FailedToDecode") - } - Error::MaxWeightInvalid => { - ::core::fmt::Formatter::write_str(f, "MaxWeightInvalid") - } - Error::NotHoldingFees => { - ::core::fmt::Formatter::write_str(f, "NotHoldingFees") - } - Error::TooExpensive => { - ::core::fmt::Formatter::write_str(f, "TooExpensive") - } - Error::Trap(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Trap", - &__self_0, - ) - } - Error::UnhandledXcmVersion => { - ::core::fmt::Formatter::write_str(f, "UnhandledXcmVersion") - } - Error::WeightLimitReached(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "WeightLimitReached", - &__self_0, - ) - } - Error::Barrier => { - ::core::fmt::Formatter::write_str(f, "Barrier") - } - Error::WeightNotComputable => { - ::core::fmt::Formatter::write_str(f, "WeightNotComputable") - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum BodyId { - #[codec(index = 0)] - Unit, - #[codec(index = 1)] - Named( - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, - ), - #[codec(index = 2)] - Index(#[codec(compact)] ::core::primitive::u32), - #[codec(index = 3)] - Executive, - #[codec(index = 4)] - Technical, - #[codec(index = 5)] - Legislative, - #[codec(index = 6)] - Judicial, - #[codec(index = 7)] - Defense, - #[codec(index = 8)] - Administration, - #[codec(index = 9)] - Treasury, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BodyId { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `BodyId`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyId::Unit) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - BodyId::Named({ - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BodyId::Named.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - BodyId::Index({ - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BodyId::Index.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyId::Executive) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyId::Technical) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyId::Legislative) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyId::Judicial) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyId::Defense) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyId::Administration) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyId::Treasury) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `BodyId`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BodyId { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - BodyId::Unit => 0_usize, - BodyId::Named(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - BodyId::Index(ref aa) => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(aa), - ), - ) - } - BodyId::Executive => 0_usize, - BodyId::Technical => 0_usize, - BodyId::Legislative => 0_usize, - BodyId::Judicial => 0_usize, - BodyId::Defense => 0_usize, - BodyId::Administration => 0_usize, - BodyId::Treasury => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - BodyId::Unit => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - BodyId::Named(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - BodyId::Index(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(aa), - __codec_dest_edqy, - ); - } - } - BodyId::Executive => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - BodyId::Technical => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - BodyId::Legislative => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - BodyId::Judicial => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - BodyId::Defense => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - BodyId::Administration => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - BodyId::Treasury => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BodyId {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BodyId { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BodyId; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Unit" { - return Ok(BodyId::Unit); - } - if value.name() == "Named" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - BodyId::Named({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Index" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - BodyId::Index({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Executive" { - return Ok(BodyId::Executive); - } - if value.name() == "Technical" { - return Ok(BodyId::Technical); - } - if value.name() == "Legislative" { - return Ok(BodyId::Legislative); - } - if value.name() == "Judicial" { - return Ok(BodyId::Judicial); - } - if value.name() == "Defense" { - return Ok(BodyId::Defense); - } - if value.name() == "Administration" { - return Ok(BodyId::Administration); - } - if value.name() == "Treasury" { - return Ok(BodyId::Treasury); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Unit", - "Named", - "Index", - "Executive", - "Technical", - "Legislative", - "Judicial", - "Defense", - "Administration", - "Treasury", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BodyId { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Unit => { - ::subxt::ext::scale_encode::Variant { - name: "Unit", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Named(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Named", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Index(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Index", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Executive => { - ::subxt::ext::scale_encode::Variant { - name: "Executive", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Technical => { - ::subxt::ext::scale_encode::Variant { - name: "Technical", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Legislative => { - ::subxt::ext::scale_encode::Variant { - name: "Legislative", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Judicial => { - ::subxt::ext::scale_encode::Variant { - name: "Judicial", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Defense => { - ::subxt::ext::scale_encode::Variant { - name: "Defense", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Administration => { - ::subxt::ext::scale_encode::Variant { - name: "Administration", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Treasury => { - ::subxt::ext::scale_encode::Variant { - name: "Treasury", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BodyId { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - BodyId::Unit => ::core::fmt::Formatter::write_str(f, "Unit"), - BodyId::Named(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Named", - &__self_0, - ) - } - BodyId::Index(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Index", - &__self_0, - ) - } - BodyId::Executive => { - ::core::fmt::Formatter::write_str(f, "Executive") - } - BodyId::Technical => { - ::core::fmt::Formatter::write_str(f, "Technical") - } - BodyId::Legislative => { - ::core::fmt::Formatter::write_str(f, "Legislative") - } - BodyId::Judicial => { - ::core::fmt::Formatter::write_str(f, "Judicial") - } - BodyId::Defense => { - ::core::fmt::Formatter::write_str(f, "Defense") - } - BodyId::Administration => { - ::core::fmt::Formatter::write_str(f, "Administration") - } - BodyId::Treasury => { - ::core::fmt::Formatter::write_str(f, "Treasury") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum BodyPart { - #[codec(index = 0)] - Voice, - #[codec(index = 1)] - Members { #[codec(compact)] count: ::core::primitive::u32 }, - #[codec(index = 2)] - Fraction { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - #[codec(index = 3)] - AtLeastProportion { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - #[codec(index = 4)] - MoreThanProportion { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BodyPart { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `BodyPart`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyPart::Voice) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyPart::Members { - count: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BodyPart::Members::count`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyPart::Fraction { - nom: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BodyPart::Fraction::nom`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - denom: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BodyPart::Fraction::denom`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyPart::AtLeastProportion { - nom: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BodyPart::AtLeastProportion::nom`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - denom: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BodyPart::AtLeastProportion::denom`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyPart::MoreThanProportion { - nom: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BodyPart::MoreThanProportion::nom`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - denom: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BodyPart::MoreThanProportion::denom`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `BodyPart`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BodyPart { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - BodyPart::Voice => 0_usize, - BodyPart::Members { ref count } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(count), - ), - ) - } - BodyPart::Fraction { ref nom, ref denom } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(nom), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(denom), - ), - ) - } - BodyPart::AtLeastProportion { ref nom, ref denom } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(nom), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(denom), - ), - ) - } - BodyPart::MoreThanProportion { ref nom, ref denom } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(nom), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(denom), - ), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - BodyPart::Voice => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - BodyPart::Members { ref count } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(count), - __codec_dest_edqy, - ); - } - } - BodyPart::Fraction { ref nom, ref denom } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(nom), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(denom), - __codec_dest_edqy, - ); - } - } - BodyPart::AtLeastProportion { ref nom, ref denom } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(nom), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(denom), - __codec_dest_edqy, - ); - } - } - BodyPart::MoreThanProportion { ref nom, ref denom } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(nom), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(denom), - __codec_dest_edqy, - ); - } - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BodyPart {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BodyPart { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BodyPart; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Voice" { - return Ok(BodyPart::Voice); - } - if value.name() == "Members" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(BodyPart::Members { - count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("count"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BodyPart::Members { - count: { - let val = *vals - .get(&Some("count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "count".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("count"))? - }, - }) - }; - } - if value.name() == "Fraction" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(BodyPart::Fraction { - nom: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nom"))? - }, - denom: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("denom"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BodyPart::Fraction { - nom: { - let val = *vals - .get(&Some("nom")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nom".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nom"))? - }, - denom: { - let val = *vals - .get(&Some("denom")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "denom".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("denom"))? - }, - }) - }; - } - if value.name() == "AtLeastProportion" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(BodyPart::AtLeastProportion { - nom: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nom"))? - }, - denom: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("denom"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BodyPart::AtLeastProportion { - nom: { - let val = *vals - .get(&Some("nom")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nom".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nom"))? - }, - denom: { - let val = *vals - .get(&Some("denom")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "denom".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("denom"))? - }, - }) - }; - } - if value.name() == "MoreThanProportion" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(BodyPart::MoreThanProportion { - nom: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nom"))? - }, - denom: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("denom"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BodyPart::MoreThanProportion { - nom: { - let val = *vals - .get(&Some("nom")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nom".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nom"))? - }, - denom: { - let val = *vals - .get(&Some("denom")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "denom".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("denom"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Voice", - "Members", - "Fraction", - "AtLeastProportion", - "MoreThanProportion", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BodyPart { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Voice => { - ::subxt::ext::scale_encode::Variant { - name: "Voice", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Members { count } => { - ::subxt::ext::scale_encode::Variant { - name: "Members", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("count"), - count as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Fraction { nom, denom } => { - ::subxt::ext::scale_encode::Variant { - name: "Fraction", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("nom"), - nom as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("denom"), - denom as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AtLeastProportion { nom, denom } => { - ::subxt::ext::scale_encode::Variant { - name: "AtLeastProportion", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("nom"), - nom as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("denom"), - denom as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MoreThanProportion { nom, denom } => { - ::subxt::ext::scale_encode::Variant { - name: "MoreThanProportion", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("nom"), - nom as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("denom"), - denom as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BodyPart { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - BodyPart::Voice => { - ::core::fmt::Formatter::write_str(f, "Voice") - } - BodyPart::Members { count: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Members", - "count", - &__self_0, - ) - } - BodyPart::Fraction { nom: __self_0, denom: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Fraction", - "nom", - __self_0, - "denom", - &__self_1, - ) - } - BodyPart::AtLeastProportion { - nom: __self_0, - denom: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AtLeastProportion", - "nom", - __self_0, - "denom", - &__self_1, - ) - } - BodyPart::MoreThanProportion { - nom: __self_0, - denom: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MoreThanProportion", - "nom", - __self_0, - "denom", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Instruction { - #[codec(index = 0)] - WithdrawAsset(runtime_types::xcm::v2::multiasset::MultiAssets), - #[codec(index = 1)] - ReserveAssetDeposited( - runtime_types::xcm::v2::multiasset::MultiAssets, - ), - #[codec(index = 2)] - ReceiveTeleportedAsset( - runtime_types::xcm::v2::multiasset::MultiAssets, - ), - #[codec(index = 3)] - QueryResponse { - #[codec(compact)] - query_id: ::core::primitive::u64, - response: runtime_types::xcm::v2::Response, - #[codec(compact)] - max_weight: ::core::primitive::u64, - }, - #[codec(index = 4)] - TransferAsset { - assets: runtime_types::xcm::v2::multiasset::MultiAssets, - beneficiary: runtime_types::xcm::v2::multilocation::MultiLocation, - }, - #[codec(index = 5)] - TransferReserveAsset { - assets: runtime_types::xcm::v2::multiasset::MultiAssets, - dest: runtime_types::xcm::v2::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 6)] - Transact { - origin_type: runtime_types::xcm::v2::OriginKind, - #[codec(compact)] - require_weight_at_most: ::core::primitive::u64, - call: runtime_types::xcm::double_encoded::DoubleEncoded, - }, - #[codec(index = 7)] - HrmpNewChannelOpenRequest { - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - max_message_size: ::core::primitive::u32, - #[codec(compact)] - max_capacity: ::core::primitive::u32, - }, - #[codec(index = 8)] - HrmpChannelAccepted { - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 9)] - HrmpChannelClosing { - #[codec(compact)] - initiator: ::core::primitive::u32, - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 10)] - ClearOrigin, - #[codec(index = 11)] - DescendOrigin(runtime_types::xcm::v2::multilocation::Junctions), - #[codec(index = 12)] - ReportError { - #[codec(compact)] - query_id: ::core::primitive::u64, - dest: runtime_types::xcm::v2::multilocation::MultiLocation, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, - }, - #[codec(index = 13)] - DepositAsset { - assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - #[codec(compact)] - max_assets: ::core::primitive::u32, - beneficiary: runtime_types::xcm::v2::multilocation::MultiLocation, - }, - #[codec(index = 14)] - DepositReserveAsset { - assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - #[codec(compact)] - max_assets: ::core::primitive::u32, - dest: runtime_types::xcm::v2::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 15)] - ExchangeAsset { - give: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - receive: runtime_types::xcm::v2::multiasset::MultiAssets, - }, - #[codec(index = 16)] - InitiateReserveWithdraw { - assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - reserve: runtime_types::xcm::v2::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 17)] - InitiateTeleport { - assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - dest: runtime_types::xcm::v2::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 18)] - QueryHolding { - #[codec(compact)] - query_id: ::core::primitive::u64, - dest: runtime_types::xcm::v2::multilocation::MultiLocation, - assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, - }, - #[codec(index = 19)] - BuyExecution { - fees: runtime_types::xcm::v2::multiasset::MultiAsset, - weight_limit: runtime_types::xcm::v2::WeightLimit, - }, - #[codec(index = 20)] - RefundSurplus, - #[codec(index = 21)] - SetErrorHandler(runtime_types::xcm::v2::Xcm), - #[codec(index = 22)] - SetAppendix(runtime_types::xcm::v2::Xcm), - #[codec(index = 23)] - ClearError, - #[codec(index = 24)] - ClaimAsset { - assets: runtime_types::xcm::v2::multiasset::MultiAssets, - ticket: runtime_types::xcm::v2::multilocation::MultiLocation, - }, - #[codec(index = 25)] - Trap(#[codec(compact)] ::core::primitive::u64), - #[codec(index = 26)] - SubscribeVersion { - #[codec(compact)] - query_id: ::core::primitive::u64, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, - }, - #[codec(index = 27)] - UnsubscribeVersion, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Instruction { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Instruction`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::WithdrawAsset({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::WithdrawAsset.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::ReserveAssetDeposited({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ReserveAssetDeposited.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::ReceiveTeleportedAsset({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ReceiveTeleportedAsset.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::QueryResponse { - query_id: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::QueryResponse::query_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - response: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::QueryResponse::response`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_weight: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::QueryResponse::max_weight`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::TransferAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::TransferAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::TransferAsset::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::TransferReserveAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::TransferReserveAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - dest: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::TransferReserveAsset::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::TransferReserveAsset::xcm`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::Transact { - origin_type: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::Transact::origin_type`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - require_weight_at_most: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::Transact::require_weight_at_most`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - call: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::Transact::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::HrmpNewChannelOpenRequest { - sender: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::HrmpNewChannelOpenRequest::sender`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - max_message_size: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::HrmpNewChannelOpenRequest::max_message_size`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - max_capacity: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::HrmpNewChannelOpenRequest::max_capacity`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::HrmpChannelAccepted { - recipient: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::HrmpChannelAccepted::recipient`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::HrmpChannelClosing { - initiator: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::HrmpChannelClosing::initiator`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - sender: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::HrmpChannelClosing::sender`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - recipient: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::HrmpChannelClosing::recipient`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::ClearOrigin) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::DescendOrigin({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::DescendOrigin.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::ReportError { - query_id: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ReportError::query_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - dest: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::ReportError::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_response_weight: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ReportError::max_response_weight`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::DepositAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::DepositAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_assets: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::DepositAsset::max_assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - beneficiary: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::DepositAsset::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::DepositReserveAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::DepositReserveAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_assets: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::DepositReserveAsset::max_assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - dest: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::DepositReserveAsset::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::DepositReserveAsset::xcm`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::ExchangeAsset { - give: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ExchangeAsset::give`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - receive: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ExchangeAsset::receive`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::InitiateReserveWithdraw { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::InitiateReserveWithdraw::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - reserve: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::InitiateReserveWithdraw::reserve`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::InitiateReserveWithdraw::xcm`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::InitiateTeleport { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::InitiateTeleport::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - dest: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::InitiateTeleport::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::InitiateTeleport::xcm`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::QueryHolding { - query_id: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::QueryHolding::query_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - dest: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Instruction::QueryHolding::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::QueryHolding::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_response_weight: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::QueryHolding::max_response_weight`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::BuyExecution { - fees: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Instruction::BuyExecution::fees`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - weight_limit: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::BuyExecution::weight_limit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::RefundSurplus) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::SetErrorHandler({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::SetErrorHandler.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 22u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::SetAppendix({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::SetAppendix.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 23u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::ClearError) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 24u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::ClaimAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Instruction::ClaimAsset::assets`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ticket: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Instruction::ClaimAsset::ticket`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 25u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::Trap({ - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::Trap.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 26u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::SubscribeVersion { - query_id: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::SubscribeVersion::query_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - max_response_weight: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::SubscribeVersion::max_response_weight`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 27u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::UnsubscribeVersion) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Instruction`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Instruction { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Instruction::WithdrawAsset(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::ReserveAssetDeposited(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::ReceiveTeleportedAsset(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::QueryResponse { - ref query_id, - ref response, - ref max_weight, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(response), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(max_weight), - ), - ) - } - Instruction::TransferAsset { - ref assets, - ref beneficiary, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - } - Instruction::TransferReserveAsset { - ref assets, - ref dest, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction::Transact { - ref origin_type, - ref require_weight_at_most, - ref call, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(origin_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(require_weight_at_most), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call), - ) - } - Instruction::HrmpNewChannelOpenRequest { - ref sender, - ref max_message_size, - ref max_capacity, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(sender), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_message_size), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_capacity), - ), - ) - } - Instruction::HrmpChannelAccepted { ref recipient } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(recipient), - ), - ) - } - Instruction::HrmpChannelClosing { - ref initiator, - ref sender, - ref recipient, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(initiator), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(sender), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(recipient), - ), - ) - } - Instruction::ClearOrigin => 0_usize, - Instruction::DescendOrigin(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::ReportError { - ref query_id, - ref dest, - ref max_response_weight, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(max_response_weight), - ), - ) - } - Instruction::DepositAsset { - ref assets, - ref max_assets, - ref beneficiary, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_assets), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - } - Instruction::DepositReserveAsset { - ref assets, - ref max_assets, - ref dest, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_assets), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction::ExchangeAsset { ref give, ref receive } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(give), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(receive), - ) - } - Instruction::InitiateReserveWithdraw { - ref assets, - ref reserve, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(reserve), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction::InitiateTeleport { - ref assets, - ref dest, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction::QueryHolding { - ref query_id, - ref dest, - ref assets, - ref max_response_weight, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(max_response_weight), - ), - ) - } - Instruction::BuyExecution { ref fees, ref weight_limit } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(fees), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(weight_limit), - ) - } - Instruction::RefundSurplus => 0_usize, - Instruction::SetErrorHandler(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::SetAppendix(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::ClearError => 0_usize, - Instruction::ClaimAsset { ref assets, ref ticket } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(ticket), - ) - } - Instruction::Trap(ref aa) => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(aa), - ), - ) - } - Instruction::SubscribeVersion { - ref query_id, - ref max_response_weight, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(max_response_weight), - ), - ) - } - Instruction::UnsubscribeVersion => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Instruction::WithdrawAsset(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::ReserveAssetDeposited(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::ReceiveTeleportedAsset(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::QueryResponse { - ref query_id, - ref response, - ref max_weight, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - response, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(max_weight), - __codec_dest_edqy, - ); - } - } - Instruction::TransferAsset { - ref assets, - ref beneficiary, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - } - Instruction::TransferReserveAsset { - ref assets, - ref dest, - ref xcm, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction::Transact { - ref origin_type, - ref require_weight_at_most, - ref call, - } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - origin_type, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(require_weight_at_most), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - call, - __codec_dest_edqy, - ); - } - Instruction::HrmpNewChannelOpenRequest { - ref sender, - ref max_message_size, - ref max_capacity, - } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(sender), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_message_size), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_capacity), - __codec_dest_edqy, - ); - } - } - Instruction::HrmpChannelAccepted { ref recipient } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(recipient), - __codec_dest_edqy, - ); - } - } - Instruction::HrmpChannelClosing { - ref initiator, - ref sender, - ref recipient, - } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(initiator), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(sender), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(recipient), - __codec_dest_edqy, - ); - } - } - Instruction::ClearOrigin => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Instruction::DescendOrigin(ref aa) => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::ReportError { - ref query_id, - ref dest, - ref max_response_weight, - } => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(max_response_weight), - __codec_dest_edqy, - ); - } - } - Instruction::DepositAsset { - ref assets, - ref max_assets, - ref beneficiary, - } => { - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_assets), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - } - Instruction::DepositReserveAsset { - ref assets, - ref max_assets, - ref dest, - ref xcm, - } => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_assets), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction::ExchangeAsset { ref give, ref receive } => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - give, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - receive, - __codec_dest_edqy, - ); - } - Instruction::InitiateReserveWithdraw { - ref assets, - ref reserve, - ref xcm, - } => { - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - reserve, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction::InitiateTeleport { - ref assets, - ref dest, - ref xcm, - } => { - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction::QueryHolding { - ref query_id, - ref dest, - ref assets, - ref max_response_weight, - } => { - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(max_response_weight), - __codec_dest_edqy, - ); - } - } - Instruction::BuyExecution { - ref fees, - ref weight_limit, - } => { - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - fees, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - weight_limit, - __codec_dest_edqy, - ); - } - Instruction::RefundSurplus => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - } - Instruction::SetErrorHandler(ref aa) => { - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::SetAppendix(ref aa) => { - __codec_dest_edqy.push_byte(22u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::ClearError => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(23u8 as ::core::primitive::u8); - } - Instruction::ClaimAsset { ref assets, ref ticket } => { - __codec_dest_edqy.push_byte(24u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ticket, - __codec_dest_edqy, - ); - } - Instruction::Trap(ref aa) => { - __codec_dest_edqy.push_byte(25u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(aa), - __codec_dest_edqy, - ); - } - } - Instruction::SubscribeVersion { - ref query_id, - ref max_response_weight, - } => { - __codec_dest_edqy.push_byte(26u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(max_response_weight), - __codec_dest_edqy, - ); - } - } - Instruction::UnsubscribeVersion => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(27u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Instruction {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Instruction { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Instruction; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "WithdrawAsset" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::WithdrawAsset({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ReserveAssetDeposited" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::ReserveAssetDeposited({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ReceiveTeleportedAsset" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::ReceiveTeleportedAsset({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "QueryResponse" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::QueryResponse { - query_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - response: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("response"))? - }, - max_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::QueryResponse { - query_id: { - let val = *vals - .get(&Some("query_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "query_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - response: { - let val = *vals - .get(&Some("response")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "response".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("response"))? - }, - max_weight: { - let val = *vals - .get(&Some("max_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_weight".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - }; - } - if value.name() == "TransferAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction::TransferAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::TransferAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - }; - } - if value.name() == "TransferReserveAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::TransferReserveAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::TransferReserveAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "Transact" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::Transact { - origin_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("origin_type"))? - }, - require_weight_at_most: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("require_weight_at_most"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::Transact { - origin_type: { - let val = *vals - .get(&Some("origin_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "origin_type".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("origin_type"))? - }, - require_weight_at_most: { - let val = *vals - .get(&Some("require_weight_at_most")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "require_weight_at_most".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("require_weight_at_most"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - }; - } - if value.name() == "HrmpNewChannelOpenRequest" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::HrmpNewChannelOpenRequest { - sender: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - max_message_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_message_size"))? - }, - max_capacity: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_capacity"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::HrmpNewChannelOpenRequest { - sender: { - let val = *vals - .get(&Some("sender")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sender".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - max_message_size: { - let val = *vals - .get(&Some("max_message_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_message_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_message_size"))? - }, - max_capacity: { - let val = *vals - .get(&Some("max_capacity")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_capacity".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_capacity"))? - }, - }) - }; - } - if value.name() == "HrmpChannelAccepted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Instruction::HrmpChannelAccepted { - recipient: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::HrmpChannelAccepted { - recipient: { - let val = *vals - .get(&Some("recipient")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "recipient".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - }; - } - if value.name() == "HrmpChannelClosing" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::HrmpChannelClosing { - initiator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("initiator"))? - }, - sender: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - recipient: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::HrmpChannelClosing { - initiator: { - let val = *vals - .get(&Some("initiator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "initiator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("initiator"))? - }, - sender: { - let val = *vals - .get(&Some("sender")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sender".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - recipient: { - let val = *vals - .get(&Some("recipient")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "recipient".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - }; - } - if value.name() == "ClearOrigin" { - return Ok(Instruction::ClearOrigin); - } - if value.name() == "DescendOrigin" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::DescendOrigin({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ReportError" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::ReportError { - query_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - max_response_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_response_weight"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::ReportError { - query_id: { - let val = *vals - .get(&Some("query_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "query_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - max_response_weight: { - let val = *vals - .get(&Some("max_response_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_response_weight".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_response_weight"))? - }, - }) - }; - } - if value.name() == "DepositAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::DepositAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - max_assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_assets"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::DepositAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - max_assets: { - let val = *vals - .get(&Some("max_assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_assets"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - }; - } - if value.name() == "DepositReserveAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Instruction::DepositReserveAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - max_assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_assets"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::DepositReserveAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - max_assets: { - let val = *vals - .get(&Some("max_assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_assets"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "ExchangeAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction::ExchangeAsset { - give: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("give"))? - }, - receive: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("receive"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::ExchangeAsset { - give: { - let val = *vals - .get(&Some("give")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "give".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("give"))? - }, - receive: { - let val = *vals - .get(&Some("receive")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "receive".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("receive"))? - }, - }) - }; - } - if value.name() == "InitiateReserveWithdraw" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::InitiateReserveWithdraw { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - reserve: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reserve"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::InitiateReserveWithdraw { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - reserve: { - let val = *vals - .get(&Some("reserve")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reserve".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reserve"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "InitiateTeleport" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::InitiateTeleport { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::InitiateTeleport { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "QueryHolding" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Instruction::QueryHolding { - query_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - max_response_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_response_weight"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::QueryHolding { - query_id: { - let val = *vals - .get(&Some("query_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "query_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - max_response_weight: { - let val = *vals - .get(&Some("max_response_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_response_weight".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_response_weight"))? - }, - }) - }; - } - if value.name() == "BuyExecution" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction::BuyExecution { - fees: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fees"))? - }, - weight_limit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::BuyExecution { - fees: { - let val = *vals - .get(&Some("fees")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fees".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fees"))? - }, - weight_limit: { - let val = *vals - .get(&Some("weight_limit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "weight_limit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - }; - } - if value.name() == "RefundSurplus" { - return Ok(Instruction::RefundSurplus); - } - if value.name() == "SetErrorHandler" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::SetErrorHandler({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "SetAppendix" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::SetAppendix({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ClearError" { - return Ok(Instruction::ClearError); - } - if value.name() == "ClaimAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction::ClaimAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - ticket: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ticket"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::ClaimAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - ticket: { - let val = *vals - .get(&Some("ticket")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ticket".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ticket"))? - }, - }) - }; - } - if value.name() == "Trap" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::Trap({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "SubscribeVersion" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction::SubscribeVersion { - query_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - max_response_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_response_weight"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::SubscribeVersion { - query_id: { - let val = *vals - .get(&Some("query_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "query_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - max_response_weight: { - let val = *vals - .get(&Some("max_response_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_response_weight".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_response_weight"))? - }, - }) - }; - } - if value.name() == "UnsubscribeVersion" { - return Ok(Instruction::UnsubscribeVersion); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "WithdrawAsset", - "ReserveAssetDeposited", - "ReceiveTeleportedAsset", - "QueryResponse", - "TransferAsset", - "TransferReserveAsset", - "Transact", - "HrmpNewChannelOpenRequest", - "HrmpChannelAccepted", - "HrmpChannelClosing", - "ClearOrigin", - "DescendOrigin", - "ReportError", - "DepositAsset", - "DepositReserveAsset", - "ExchangeAsset", - "InitiateReserveWithdraw", - "InitiateTeleport", - "QueryHolding", - "BuyExecution", - "RefundSurplus", - "SetErrorHandler", - "SetAppendix", - "ClearError", - "ClaimAsset", - "Trap", - "SubscribeVersion", - "UnsubscribeVersion", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Instruction { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::WithdrawAsset(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "WithdrawAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReserveAssetDeposited(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ReserveAssetDeposited", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReceiveTeleportedAsset(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ReceiveTeleportedAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::QueryResponse { query_id, response, max_weight } => { - ::subxt::ext::scale_encode::Variant { - name: "QueryResponse", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("query_id"), - query_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("response"), - response as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_weight"), - max_weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TransferAsset { assets, beneficiary } => { - ::subxt::ext::scale_encode::Variant { - name: "TransferAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TransferReserveAsset { assets, dest, xcm } => { - ::subxt::ext::scale_encode::Variant { - name: "TransferReserveAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Transact { - origin_type, - require_weight_at_most, - call, - } => { - ::subxt::ext::scale_encode::Variant { - name: "Transact", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("origin_type"), - origin_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("require_weight_at_most"), - require_weight_at_most - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HrmpNewChannelOpenRequest { - sender, - max_message_size, - max_capacity, - } => { - ::subxt::ext::scale_encode::Variant { - name: "HrmpNewChannelOpenRequest", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_message_size"), - max_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_capacity"), - max_capacity - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HrmpChannelAccepted { recipient } => { - ::subxt::ext::scale_encode::Variant { - name: "HrmpChannelAccepted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HrmpChannelClosing { - initiator, - sender, - recipient, - } => { - ::subxt::ext::scale_encode::Variant { - name: "HrmpChannelClosing", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("initiator"), - initiator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ClearOrigin => { - ::subxt::ext::scale_encode::Variant { - name: "ClearOrigin", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DescendOrigin(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "DescendOrigin", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReportError { - query_id, - dest, - max_response_weight, - } => { - ::subxt::ext::scale_encode::Variant { - name: "ReportError", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("query_id"), - query_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_response_weight"), - max_response_weight - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DepositAsset { assets, max_assets, beneficiary } => { - ::subxt::ext::scale_encode::Variant { - name: "DepositAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_assets"), - max_assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DepositReserveAsset { - assets, - max_assets, - dest, - xcm, - } => { - ::subxt::ext::scale_encode::Variant { - name: "DepositReserveAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_assets"), - max_assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExchangeAsset { give, receive } => { - ::subxt::ext::scale_encode::Variant { - name: "ExchangeAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("give"), - give as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("receive"), - receive as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InitiateReserveWithdraw { assets, reserve, xcm } => { - ::subxt::ext::scale_encode::Variant { - name: "InitiateReserveWithdraw", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("reserve"), - reserve as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InitiateTeleport { assets, dest, xcm } => { - ::subxt::ext::scale_encode::Variant { - name: "InitiateTeleport", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::QueryHolding { - query_id, - dest, - assets, - max_response_weight, - } => { - ::subxt::ext::scale_encode::Variant { - name: "QueryHolding", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("query_id"), - query_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_response_weight"), - max_response_weight - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BuyExecution { fees, weight_limit } => { - ::subxt::ext::scale_encode::Variant { - name: "BuyExecution", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("fees"), - fees as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight_limit"), - weight_limit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::RefundSurplus => { - ::subxt::ext::scale_encode::Variant { - name: "RefundSurplus", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SetErrorHandler(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "SetErrorHandler", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SetAppendix(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "SetAppendix", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ClearError => { - ::subxt::ext::scale_encode::Variant { - name: "ClearError", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ClaimAsset { assets, ticket } => { - ::subxt::ext::scale_encode::Variant { - name: "ClaimAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ticket"), - ticket as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Trap(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Trap", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SubscribeVersion { query_id, max_response_weight } => { - ::subxt::ext::scale_encode::Variant { - name: "SubscribeVersion", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("query_id"), - query_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_response_weight"), - max_response_weight - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnsubscribeVersion => { - ::subxt::ext::scale_encode::Variant { - name: "UnsubscribeVersion", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Instruction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Instruction::WithdrawAsset(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "WithdrawAsset", - &__self_0, - ) - } - Instruction::ReserveAssetDeposited(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ReserveAssetDeposited", - &__self_0, - ) - } - Instruction::ReceiveTeleportedAsset(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ReceiveTeleportedAsset", - &__self_0, - ) - } - Instruction::QueryResponse { - query_id: __self_0, - response: __self_1, - max_weight: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "QueryResponse", - "query_id", - __self_0, - "response", - __self_1, - "max_weight", - &__self_2, - ) - } - Instruction::TransferAsset { - assets: __self_0, - beneficiary: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "TransferAsset", - "assets", - __self_0, - "beneficiary", - &__self_1, - ) - } - Instruction::TransferReserveAsset { - assets: __self_0, - dest: __self_1, - xcm: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "TransferReserveAsset", - "assets", - __self_0, - "dest", - __self_1, - "xcm", - &__self_2, - ) - } - Instruction::Transact { - origin_type: __self_0, - require_weight_at_most: __self_1, - call: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Transact", - "origin_type", - __self_0, - "require_weight_at_most", - __self_1, - "call", - &__self_2, - ) - } - Instruction::HrmpNewChannelOpenRequest { - sender: __self_0, - max_message_size: __self_1, - max_capacity: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "HrmpNewChannelOpenRequest", - "sender", - __self_0, - "max_message_size", - __self_1, - "max_capacity", - &__self_2, - ) - } - Instruction::HrmpChannelAccepted { recipient: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "HrmpChannelAccepted", - "recipient", - &__self_0, - ) - } - Instruction::HrmpChannelClosing { - initiator: __self_0, - sender: __self_1, - recipient: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "HrmpChannelClosing", - "initiator", - __self_0, - "sender", - __self_1, - "recipient", - &__self_2, - ) - } - Instruction::ClearOrigin => { - ::core::fmt::Formatter::write_str(f, "ClearOrigin") - } - Instruction::DescendOrigin(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "DescendOrigin", - &__self_0, - ) - } - Instruction::ReportError { - query_id: __self_0, - dest: __self_1, - max_response_weight: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ReportError", - "query_id", - __self_0, - "dest", - __self_1, - "max_response_weight", - &__self_2, - ) - } - Instruction::DepositAsset { - assets: __self_0, - max_assets: __self_1, - beneficiary: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "DepositAsset", - "assets", - __self_0, - "max_assets", - __self_1, - "beneficiary", - &__self_2, - ) - } - Instruction::DepositReserveAsset { - assets: __self_0, - max_assets: __self_1, - dest: __self_2, - xcm: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "DepositReserveAsset", - "assets", - __self_0, - "max_assets", - __self_1, - "dest", - __self_2, - "xcm", - &__self_3, - ) - } - Instruction::ExchangeAsset { - give: __self_0, - receive: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ExchangeAsset", - "give", - __self_0, - "receive", - &__self_1, - ) - } - Instruction::InitiateReserveWithdraw { - assets: __self_0, - reserve: __self_1, - xcm: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "InitiateReserveWithdraw", - "assets", - __self_0, - "reserve", - __self_1, - "xcm", - &__self_2, - ) - } - Instruction::InitiateTeleport { - assets: __self_0, - dest: __self_1, - xcm: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "InitiateTeleport", - "assets", - __self_0, - "dest", - __self_1, - "xcm", - &__self_2, - ) - } - Instruction::QueryHolding { - query_id: __self_0, - dest: __self_1, - assets: __self_2, - max_response_weight: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "QueryHolding", - "query_id", - __self_0, - "dest", - __self_1, - "assets", - __self_2, - "max_response_weight", - &__self_3, - ) - } - Instruction::BuyExecution { - fees: __self_0, - weight_limit: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "BuyExecution", - "fees", - __self_0, - "weight_limit", - &__self_1, - ) - } - Instruction::RefundSurplus => { - ::core::fmt::Formatter::write_str(f, "RefundSurplus") - } - Instruction::SetErrorHandler(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "SetErrorHandler", - &__self_0, - ) - } - Instruction::SetAppendix(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "SetAppendix", - &__self_0, - ) - } - Instruction::ClearError => { - ::core::fmt::Formatter::write_str(f, "ClearError") - } - Instruction::ClaimAsset { - assets: __self_0, - ticket: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ClaimAsset", - "assets", - __self_0, - "ticket", - &__self_1, - ) - } - Instruction::Trap(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Trap", - &__self_0, - ) - } - Instruction::SubscribeVersion { - query_id: __self_0, - max_response_weight: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SubscribeVersion", - "query_id", - __self_0, - "max_response_weight", - &__self_1, - ) - } - Instruction::UnsubscribeVersion => { - ::core::fmt::Formatter::write_str(f, "UnsubscribeVersion") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Instruction2 { - #[codec(index = 0)] - WithdrawAsset(runtime_types::xcm::v2::multiasset::MultiAssets), - #[codec(index = 1)] - ReserveAssetDeposited( - runtime_types::xcm::v2::multiasset::MultiAssets, - ), - #[codec(index = 2)] - ReceiveTeleportedAsset( - runtime_types::xcm::v2::multiasset::MultiAssets, - ), - #[codec(index = 3)] - QueryResponse { - #[codec(compact)] - query_id: ::core::primitive::u64, - response: runtime_types::xcm::v2::Response, - #[codec(compact)] - max_weight: ::core::primitive::u64, - }, - #[codec(index = 4)] - TransferAsset { - assets: runtime_types::xcm::v2::multiasset::MultiAssets, - beneficiary: runtime_types::xcm::v2::multilocation::MultiLocation, - }, - #[codec(index = 5)] - TransferReserveAsset { - assets: runtime_types::xcm::v2::multiasset::MultiAssets, - dest: runtime_types::xcm::v2::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 6)] - Transact { - origin_type: runtime_types::xcm::v2::OriginKind, - #[codec(compact)] - require_weight_at_most: ::core::primitive::u64, - call: runtime_types::xcm::double_encoded::DoubleEncoded2, - }, - #[codec(index = 7)] - HrmpNewChannelOpenRequest { - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - max_message_size: ::core::primitive::u32, - #[codec(compact)] - max_capacity: ::core::primitive::u32, - }, - #[codec(index = 8)] - HrmpChannelAccepted { - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 9)] - HrmpChannelClosing { - #[codec(compact)] - initiator: ::core::primitive::u32, - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 10)] - ClearOrigin, - #[codec(index = 11)] - DescendOrigin(runtime_types::xcm::v2::multilocation::Junctions), - #[codec(index = 12)] - ReportError { - #[codec(compact)] - query_id: ::core::primitive::u64, - dest: runtime_types::xcm::v2::multilocation::MultiLocation, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, - }, - #[codec(index = 13)] - DepositAsset { - assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - #[codec(compact)] - max_assets: ::core::primitive::u32, - beneficiary: runtime_types::xcm::v2::multilocation::MultiLocation, - }, - #[codec(index = 14)] - DepositReserveAsset { - assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - #[codec(compact)] - max_assets: ::core::primitive::u32, - dest: runtime_types::xcm::v2::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 15)] - ExchangeAsset { - give: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - receive: runtime_types::xcm::v2::multiasset::MultiAssets, - }, - #[codec(index = 16)] - InitiateReserveWithdraw { - assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - reserve: runtime_types::xcm::v2::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 17)] - InitiateTeleport { - assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - dest: runtime_types::xcm::v2::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 18)] - QueryHolding { - #[codec(compact)] - query_id: ::core::primitive::u64, - dest: runtime_types::xcm::v2::multilocation::MultiLocation, - assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, - }, - #[codec(index = 19)] - BuyExecution { - fees: runtime_types::xcm::v2::multiasset::MultiAsset, - weight_limit: runtime_types::xcm::v2::WeightLimit, - }, - #[codec(index = 20)] - RefundSurplus, - #[codec(index = 21)] - SetErrorHandler(runtime_types::xcm::v2::Xcm2), - #[codec(index = 22)] - SetAppendix(runtime_types::xcm::v2::Xcm2), - #[codec(index = 23)] - ClearError, - #[codec(index = 24)] - ClaimAsset { - assets: runtime_types::xcm::v2::multiasset::MultiAssets, - ticket: runtime_types::xcm::v2::multilocation::MultiLocation, - }, - #[codec(index = 25)] - Trap(#[codec(compact)] ::core::primitive::u64), - #[codec(index = 26)] - SubscribeVersion { - #[codec(compact)] - query_id: ::core::primitive::u64, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, - }, - #[codec(index = 27)] - UnsubscribeVersion, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Instruction2 { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Instruction2`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::WithdrawAsset({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::WithdrawAsset.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::ReserveAssetDeposited({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ReserveAssetDeposited.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::ReceiveTeleportedAsset({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ReceiveTeleportedAsset.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::QueryResponse { - query_id: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::QueryResponse::query_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - response: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::QueryResponse::response`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_weight: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::QueryResponse::max_weight`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::TransferAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::TransferAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::TransferAsset::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::TransferReserveAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::TransferReserveAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - dest: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::TransferReserveAsset::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::TransferReserveAsset::xcm`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::Transact { - origin_type: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::Transact::origin_type`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - require_weight_at_most: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::Transact::require_weight_at_most`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - call: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::Transact::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::HrmpNewChannelOpenRequest { - sender: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::HrmpNewChannelOpenRequest::sender`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - max_message_size: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::HrmpNewChannelOpenRequest::max_message_size`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - max_capacity: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::HrmpNewChannelOpenRequest::max_capacity`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::HrmpChannelAccepted { - recipient: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::HrmpChannelAccepted::recipient`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::HrmpChannelClosing { - initiator: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::HrmpChannelClosing::initiator`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - sender: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::HrmpChannelClosing::sender`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - recipient: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::HrmpChannelClosing::recipient`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::ClearOrigin) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::DescendOrigin({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::DescendOrigin.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::ReportError { - query_id: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ReportError::query_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - dest: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Instruction2::ReportError::dest`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_response_weight: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ReportError::max_response_weight`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::DepositAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::DepositAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_assets: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::DepositAsset::max_assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - beneficiary: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::DepositAsset::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::DepositReserveAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::DepositReserveAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_assets: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::DepositReserveAsset::max_assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - dest: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::DepositReserveAsset::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::DepositReserveAsset::xcm`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::ExchangeAsset { - give: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ExchangeAsset::give`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - receive: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ExchangeAsset::receive`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::InitiateReserveWithdraw { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::InitiateReserveWithdraw::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - reserve: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::InitiateReserveWithdraw::reserve`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::InitiateReserveWithdraw::xcm`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::InitiateTeleport { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::InitiateTeleport::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - dest: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::InitiateTeleport::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::InitiateTeleport::xcm`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::QueryHolding { - query_id: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::QueryHolding::query_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - dest: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::QueryHolding::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::QueryHolding::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_response_weight: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::QueryHolding::max_response_weight`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::BuyExecution { - fees: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::BuyExecution::fees`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - weight_limit: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::BuyExecution::weight_limit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::RefundSurplus) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::SetErrorHandler({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Instruction2::SetErrorHandler.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 22u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::SetAppendix({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::SetAppendix.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 23u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::ClearError) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 24u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::ClaimAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ClaimAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ticket: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ClaimAsset::ticket`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 25u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::Trap({ - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::Trap.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 26u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::SubscribeVersion { - query_id: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::SubscribeVersion::query_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - max_response_weight: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::SubscribeVersion::max_response_weight`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 27u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::UnsubscribeVersion) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Instruction2`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Instruction2 { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Instruction2::WithdrawAsset(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::ReserveAssetDeposited(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::ReceiveTeleportedAsset(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::QueryResponse { - ref query_id, - ref response, - ref max_weight, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(response), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(max_weight), - ), - ) - } - Instruction2::TransferAsset { - ref assets, - ref beneficiary, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - } - Instruction2::TransferReserveAsset { - ref assets, - ref dest, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction2::Transact { - ref origin_type, - ref require_weight_at_most, - ref call, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(origin_type), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(require_weight_at_most), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call), - ) - } - Instruction2::HrmpNewChannelOpenRequest { - ref sender, - ref max_message_size, - ref max_capacity, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(sender), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_message_size), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_capacity), - ), - ) - } - Instruction2::HrmpChannelAccepted { ref recipient } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(recipient), - ), - ) - } - Instruction2::HrmpChannelClosing { - ref initiator, - ref sender, - ref recipient, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(initiator), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(sender), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(recipient), - ), - ) - } - Instruction2::ClearOrigin => 0_usize, - Instruction2::DescendOrigin(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::ReportError { - ref query_id, - ref dest, - ref max_response_weight, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(max_response_weight), - ), - ) - } - Instruction2::DepositAsset { - ref assets, - ref max_assets, - ref beneficiary, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_assets), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - } - Instruction2::DepositReserveAsset { - ref assets, - ref max_assets, - ref dest, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_assets), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction2::ExchangeAsset { ref give, ref receive } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(give), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(receive), - ) - } - Instruction2::InitiateReserveWithdraw { - ref assets, - ref reserve, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(reserve), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction2::InitiateTeleport { - ref assets, - ref dest, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction2::QueryHolding { - ref query_id, - ref dest, - ref assets, - ref max_response_weight, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(max_response_weight), - ), - ) - } - Instruction2::BuyExecution { - ref fees, - ref weight_limit, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(fees), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(weight_limit), - ) - } - Instruction2::RefundSurplus => 0_usize, - Instruction2::SetErrorHandler(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::SetAppendix(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::ClearError => 0_usize, - Instruction2::ClaimAsset { ref assets, ref ticket } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(ticket), - ) - } - Instruction2::Trap(ref aa) => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(aa), - ), - ) - } - Instruction2::SubscribeVersion { - ref query_id, - ref max_response_weight, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(max_response_weight), - ), - ) - } - Instruction2::UnsubscribeVersion => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Instruction2::WithdrawAsset(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::ReserveAssetDeposited(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::ReceiveTeleportedAsset(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::QueryResponse { - ref query_id, - ref response, - ref max_weight, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - response, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(max_weight), - __codec_dest_edqy, - ); - } - } - Instruction2::TransferAsset { - ref assets, - ref beneficiary, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - } - Instruction2::TransferReserveAsset { - ref assets, - ref dest, - ref xcm, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction2::Transact { - ref origin_type, - ref require_weight_at_most, - ref call, - } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - origin_type, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(require_weight_at_most), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - call, - __codec_dest_edqy, - ); - } - Instruction2::HrmpNewChannelOpenRequest { - ref sender, - ref max_message_size, - ref max_capacity, - } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(sender), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_message_size), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_capacity), - __codec_dest_edqy, - ); - } - } - Instruction2::HrmpChannelAccepted { ref recipient } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(recipient), - __codec_dest_edqy, - ); - } - } - Instruction2::HrmpChannelClosing { - ref initiator, - ref sender, - ref recipient, - } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(initiator), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(sender), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(recipient), - __codec_dest_edqy, - ); - } - } - Instruction2::ClearOrigin => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Instruction2::DescendOrigin(ref aa) => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::ReportError { - ref query_id, - ref dest, - ref max_response_weight, - } => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(max_response_weight), - __codec_dest_edqy, - ); - } - } - Instruction2::DepositAsset { - ref assets, - ref max_assets, - ref beneficiary, - } => { - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_assets), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - } - Instruction2::DepositReserveAsset { - ref assets, - ref max_assets, - ref dest, - ref xcm, - } => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_assets), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction2::ExchangeAsset { ref give, ref receive } => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - give, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - receive, - __codec_dest_edqy, - ); - } - Instruction2::InitiateReserveWithdraw { - ref assets, - ref reserve, - ref xcm, - } => { - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - reserve, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction2::InitiateTeleport { - ref assets, - ref dest, - ref xcm, - } => { - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction2::QueryHolding { - ref query_id, - ref dest, - ref assets, - ref max_response_weight, - } => { - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(max_response_weight), - __codec_dest_edqy, - ); - } - } - Instruction2::BuyExecution { - ref fees, - ref weight_limit, - } => { - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - fees, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - weight_limit, - __codec_dest_edqy, - ); - } - Instruction2::RefundSurplus => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - } - Instruction2::SetErrorHandler(ref aa) => { - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::SetAppendix(ref aa) => { - __codec_dest_edqy.push_byte(22u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::ClearError => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(23u8 as ::core::primitive::u8); - } - Instruction2::ClaimAsset { ref assets, ref ticket } => { - __codec_dest_edqy.push_byte(24u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ticket, - __codec_dest_edqy, - ); - } - Instruction2::Trap(ref aa) => { - __codec_dest_edqy.push_byte(25u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(aa), - __codec_dest_edqy, - ); - } - } - Instruction2::SubscribeVersion { - ref query_id, - ref max_response_weight, - } => { - __codec_dest_edqy.push_byte(26u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(max_response_weight), - __codec_dest_edqy, - ); - } - } - Instruction2::UnsubscribeVersion => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(27u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Instruction2 {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Instruction2 { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Instruction2; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "WithdrawAsset" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::WithdrawAsset({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ReserveAssetDeposited" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::ReserveAssetDeposited({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ReceiveTeleportedAsset" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::ReceiveTeleportedAsset({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "QueryResponse" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::QueryResponse { - query_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - response: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("response"))? - }, - max_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::QueryResponse { - query_id: { - let val = *vals - .get(&Some("query_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "query_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - response: { - let val = *vals - .get(&Some("response")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "response".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("response"))? - }, - max_weight: { - let val = *vals - .get(&Some("max_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_weight".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - }; - } - if value.name() == "TransferAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::TransferAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::TransferAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - }; - } - if value.name() == "TransferReserveAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::TransferReserveAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::TransferReserveAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "Transact" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::Transact { - origin_type: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("origin_type"))? - }, - require_weight_at_most: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("require_weight_at_most"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::Transact { - origin_type: { - let val = *vals - .get(&Some("origin_type")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "origin_type".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("origin_type"))? - }, - require_weight_at_most: { - let val = *vals - .get(&Some("require_weight_at_most")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "require_weight_at_most".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("require_weight_at_most"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - }; - } - if value.name() == "HrmpNewChannelOpenRequest" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::HrmpNewChannelOpenRequest { - sender: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - max_message_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_message_size"))? - }, - max_capacity: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_capacity"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::HrmpNewChannelOpenRequest { - sender: { - let val = *vals - .get(&Some("sender")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sender".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - max_message_size: { - let val = *vals - .get(&Some("max_message_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_message_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_message_size"))? - }, - max_capacity: { - let val = *vals - .get(&Some("max_capacity")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_capacity".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_capacity"))? - }, - }) - }; - } - if value.name() == "HrmpChannelAccepted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::HrmpChannelAccepted { - recipient: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::HrmpChannelAccepted { - recipient: { - let val = *vals - .get(&Some("recipient")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "recipient".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - }; - } - if value.name() == "HrmpChannelClosing" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::HrmpChannelClosing { - initiator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("initiator"))? - }, - sender: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - recipient: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::HrmpChannelClosing { - initiator: { - let val = *vals - .get(&Some("initiator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "initiator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("initiator"))? - }, - sender: { - let val = *vals - .get(&Some("sender")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sender".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - recipient: { - let val = *vals - .get(&Some("recipient")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "recipient".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - }; - } - if value.name() == "ClearOrigin" { - return Ok(Instruction2::ClearOrigin); - } - if value.name() == "DescendOrigin" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::DescendOrigin({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ReportError" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::ReportError { - query_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - max_response_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_response_weight"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::ReportError { - query_id: { - let val = *vals - .get(&Some("query_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "query_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - max_response_weight: { - let val = *vals - .get(&Some("max_response_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_response_weight".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_response_weight"))? - }, - }) - }; - } - if value.name() == "DepositAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::DepositAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - max_assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_assets"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::DepositAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - max_assets: { - let val = *vals - .get(&Some("max_assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_assets"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - }; - } - if value.name() == "DepositReserveAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::DepositReserveAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - max_assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_assets"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::DepositReserveAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - max_assets: { - let val = *vals - .get(&Some("max_assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_assets"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "ExchangeAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::ExchangeAsset { - give: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("give"))? - }, - receive: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("receive"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::ExchangeAsset { - give: { - let val = *vals - .get(&Some("give")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "give".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("give"))? - }, - receive: { - let val = *vals - .get(&Some("receive")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "receive".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("receive"))? - }, - }) - }; - } - if value.name() == "InitiateReserveWithdraw" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::InitiateReserveWithdraw { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - reserve: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reserve"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::InitiateReserveWithdraw { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - reserve: { - let val = *vals - .get(&Some("reserve")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reserve".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reserve"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "InitiateTeleport" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::InitiateTeleport { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::InitiateTeleport { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "QueryHolding" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::QueryHolding { - query_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - max_response_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_response_weight"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::QueryHolding { - query_id: { - let val = *vals - .get(&Some("query_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "query_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - max_response_weight: { - let val = *vals - .get(&Some("max_response_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_response_weight".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_response_weight"))? - }, - }) - }; - } - if value.name() == "BuyExecution" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::BuyExecution { - fees: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fees"))? - }, - weight_limit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::BuyExecution { - fees: { - let val = *vals - .get(&Some("fees")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fees".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fees"))? - }, - weight_limit: { - let val = *vals - .get(&Some("weight_limit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "weight_limit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - }; - } - if value.name() == "RefundSurplus" { - return Ok(Instruction2::RefundSurplus); - } - if value.name() == "SetErrorHandler" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::SetErrorHandler({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "SetAppendix" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::SetAppendix({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ClearError" { - return Ok(Instruction2::ClearError); - } - if value.name() == "ClaimAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::ClaimAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - ticket: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ticket"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::ClaimAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - ticket: { - let val = *vals - .get(&Some("ticket")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ticket".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ticket"))? - }, - }) - }; - } - if value.name() == "Trap" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::Trap({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "SubscribeVersion" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::SubscribeVersion { - query_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - max_response_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_response_weight"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::SubscribeVersion { - query_id: { - let val = *vals - .get(&Some("query_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "query_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - max_response_weight: { - let val = *vals - .get(&Some("max_response_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_response_weight".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_response_weight"))? - }, - }) - }; - } - if value.name() == "UnsubscribeVersion" { - return Ok(Instruction2::UnsubscribeVersion); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "WithdrawAsset", - "ReserveAssetDeposited", - "ReceiveTeleportedAsset", - "QueryResponse", - "TransferAsset", - "TransferReserveAsset", - "Transact", - "HrmpNewChannelOpenRequest", - "HrmpChannelAccepted", - "HrmpChannelClosing", - "ClearOrigin", - "DescendOrigin", - "ReportError", - "DepositAsset", - "DepositReserveAsset", - "ExchangeAsset", - "InitiateReserveWithdraw", - "InitiateTeleport", - "QueryHolding", - "BuyExecution", - "RefundSurplus", - "SetErrorHandler", - "SetAppendix", - "ClearError", - "ClaimAsset", - "Trap", - "SubscribeVersion", - "UnsubscribeVersion", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Instruction2 { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::WithdrawAsset(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "WithdrawAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReserveAssetDeposited(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ReserveAssetDeposited", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReceiveTeleportedAsset(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ReceiveTeleportedAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::QueryResponse { query_id, response, max_weight } => { - ::subxt::ext::scale_encode::Variant { - name: "QueryResponse", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("query_id"), - query_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("response"), - response as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_weight"), - max_weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TransferAsset { assets, beneficiary } => { - ::subxt::ext::scale_encode::Variant { - name: "TransferAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TransferReserveAsset { assets, dest, xcm } => { - ::subxt::ext::scale_encode::Variant { - name: "TransferReserveAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Transact { - origin_type, - require_weight_at_most, - call, - } => { - ::subxt::ext::scale_encode::Variant { - name: "Transact", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("origin_type"), - origin_type as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("require_weight_at_most"), - require_weight_at_most - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HrmpNewChannelOpenRequest { - sender, - max_message_size, - max_capacity, - } => { - ::subxt::ext::scale_encode::Variant { - name: "HrmpNewChannelOpenRequest", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_message_size"), - max_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_capacity"), - max_capacity - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HrmpChannelAccepted { recipient } => { - ::subxt::ext::scale_encode::Variant { - name: "HrmpChannelAccepted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HrmpChannelClosing { - initiator, - sender, - recipient, - } => { - ::subxt::ext::scale_encode::Variant { - name: "HrmpChannelClosing", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("initiator"), - initiator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ClearOrigin => { - ::subxt::ext::scale_encode::Variant { - name: "ClearOrigin", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DescendOrigin(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "DescendOrigin", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReportError { - query_id, - dest, - max_response_weight, - } => { - ::subxt::ext::scale_encode::Variant { - name: "ReportError", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("query_id"), - query_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_response_weight"), - max_response_weight - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DepositAsset { assets, max_assets, beneficiary } => { - ::subxt::ext::scale_encode::Variant { - name: "DepositAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_assets"), - max_assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DepositReserveAsset { - assets, - max_assets, - dest, - xcm, - } => { - ::subxt::ext::scale_encode::Variant { - name: "DepositReserveAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_assets"), - max_assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExchangeAsset { give, receive } => { - ::subxt::ext::scale_encode::Variant { - name: "ExchangeAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("give"), - give as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("receive"), - receive as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InitiateReserveWithdraw { assets, reserve, xcm } => { - ::subxt::ext::scale_encode::Variant { - name: "InitiateReserveWithdraw", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("reserve"), - reserve as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InitiateTeleport { assets, dest, xcm } => { - ::subxt::ext::scale_encode::Variant { - name: "InitiateTeleport", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::QueryHolding { - query_id, - dest, - assets, - max_response_weight, - } => { - ::subxt::ext::scale_encode::Variant { - name: "QueryHolding", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("query_id"), - query_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_response_weight"), - max_response_weight - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BuyExecution { fees, weight_limit } => { - ::subxt::ext::scale_encode::Variant { - name: "BuyExecution", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("fees"), - fees as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight_limit"), - weight_limit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::RefundSurplus => { - ::subxt::ext::scale_encode::Variant { - name: "RefundSurplus", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SetErrorHandler(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "SetErrorHandler", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SetAppendix(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "SetAppendix", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ClearError => { - ::subxt::ext::scale_encode::Variant { - name: "ClearError", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ClaimAsset { assets, ticket } => { - ::subxt::ext::scale_encode::Variant { - name: "ClaimAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ticket"), - ticket as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Trap(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Trap", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SubscribeVersion { query_id, max_response_weight } => { - ::subxt::ext::scale_encode::Variant { - name: "SubscribeVersion", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("query_id"), - query_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_response_weight"), - max_response_weight - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnsubscribeVersion => { - ::subxt::ext::scale_encode::Variant { - name: "UnsubscribeVersion", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Instruction2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Instruction2::WithdrawAsset(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "WithdrawAsset", - &__self_0, - ) - } - Instruction2::ReserveAssetDeposited(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ReserveAssetDeposited", - &__self_0, - ) - } - Instruction2::ReceiveTeleportedAsset(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ReceiveTeleportedAsset", - &__self_0, - ) - } - Instruction2::QueryResponse { - query_id: __self_0, - response: __self_1, - max_weight: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "QueryResponse", - "query_id", - __self_0, - "response", - __self_1, - "max_weight", - &__self_2, - ) - } - Instruction2::TransferAsset { - assets: __self_0, - beneficiary: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "TransferAsset", - "assets", - __self_0, - "beneficiary", - &__self_1, - ) - } - Instruction2::TransferReserveAsset { - assets: __self_0, - dest: __self_1, - xcm: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "TransferReserveAsset", - "assets", - __self_0, - "dest", - __self_1, - "xcm", - &__self_2, - ) - } - Instruction2::Transact { - origin_type: __self_0, - require_weight_at_most: __self_1, - call: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Transact", - "origin_type", - __self_0, - "require_weight_at_most", - __self_1, - "call", - &__self_2, - ) - } - Instruction2::HrmpNewChannelOpenRequest { - sender: __self_0, - max_message_size: __self_1, - max_capacity: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "HrmpNewChannelOpenRequest", - "sender", - __self_0, - "max_message_size", - __self_1, - "max_capacity", - &__self_2, - ) - } - Instruction2::HrmpChannelAccepted { - recipient: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "HrmpChannelAccepted", - "recipient", - &__self_0, - ) - } - Instruction2::HrmpChannelClosing { - initiator: __self_0, - sender: __self_1, - recipient: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "HrmpChannelClosing", - "initiator", - __self_0, - "sender", - __self_1, - "recipient", - &__self_2, - ) - } - Instruction2::ClearOrigin => { - ::core::fmt::Formatter::write_str(f, "ClearOrigin") - } - Instruction2::DescendOrigin(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "DescendOrigin", - &__self_0, - ) - } - Instruction2::ReportError { - query_id: __self_0, - dest: __self_1, - max_response_weight: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ReportError", - "query_id", - __self_0, - "dest", - __self_1, - "max_response_weight", - &__self_2, - ) - } - Instruction2::DepositAsset { - assets: __self_0, - max_assets: __self_1, - beneficiary: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "DepositAsset", - "assets", - __self_0, - "max_assets", - __self_1, - "beneficiary", - &__self_2, - ) - } - Instruction2::DepositReserveAsset { - assets: __self_0, - max_assets: __self_1, - dest: __self_2, - xcm: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "DepositReserveAsset", - "assets", - __self_0, - "max_assets", - __self_1, - "dest", - __self_2, - "xcm", - &__self_3, - ) - } - Instruction2::ExchangeAsset { - give: __self_0, - receive: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ExchangeAsset", - "give", - __self_0, - "receive", - &__self_1, - ) - } - Instruction2::InitiateReserveWithdraw { - assets: __self_0, - reserve: __self_1, - xcm: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "InitiateReserveWithdraw", - "assets", - __self_0, - "reserve", - __self_1, - "xcm", - &__self_2, - ) - } - Instruction2::InitiateTeleport { - assets: __self_0, - dest: __self_1, - xcm: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "InitiateTeleport", - "assets", - __self_0, - "dest", - __self_1, - "xcm", - &__self_2, - ) - } - Instruction2::QueryHolding { - query_id: __self_0, - dest: __self_1, - assets: __self_2, - max_response_weight: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "QueryHolding", - "query_id", - __self_0, - "dest", - __self_1, - "assets", - __self_2, - "max_response_weight", - &__self_3, - ) - } - Instruction2::BuyExecution { - fees: __self_0, - weight_limit: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "BuyExecution", - "fees", - __self_0, - "weight_limit", - &__self_1, - ) - } - Instruction2::RefundSurplus => { - ::core::fmt::Formatter::write_str(f, "RefundSurplus") - } - Instruction2::SetErrorHandler(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "SetErrorHandler", - &__self_0, - ) - } - Instruction2::SetAppendix(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "SetAppendix", - &__self_0, - ) - } - Instruction2::ClearError => { - ::core::fmt::Formatter::write_str(f, "ClearError") - } - Instruction2::ClaimAsset { - assets: __self_0, - ticket: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ClaimAsset", - "assets", - __self_0, - "ticket", - &__self_1, - ) - } - Instruction2::Trap(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Trap", - &__self_0, - ) - } - Instruction2::SubscribeVersion { - query_id: __self_0, - max_response_weight: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SubscribeVersion", - "query_id", - __self_0, - "max_response_weight", - &__self_1, - ) - } - Instruction2::UnsubscribeVersion => { - ::core::fmt::Formatter::write_str(f, "UnsubscribeVersion") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum NetworkId { - #[codec(index = 0)] - Any, - #[codec(index = 1)] - Named( - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, - ), - #[codec(index = 2)] - Polkadot, - #[codec(index = 3)] - Kusama, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NetworkId { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `NetworkId`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(NetworkId::Any) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - NetworkId::Named({ - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NetworkId::Named.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(NetworkId::Polkadot) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(NetworkId::Kusama) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `NetworkId`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NetworkId { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - NetworkId::Any => 0_usize, - NetworkId::Named(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - NetworkId::Polkadot => 0_usize, - NetworkId::Kusama => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - NetworkId::Any => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - NetworkId::Named(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - NetworkId::Polkadot => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - NetworkId::Kusama => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NetworkId {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for NetworkId { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NetworkId; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Any" { - return Ok(NetworkId::Any); - } - if value.name() == "Named" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - NetworkId::Named({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Polkadot" { - return Ok(NetworkId::Polkadot); - } - if value.name() == "Kusama" { - return Ok(NetworkId::Kusama); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Any", - "Named", - "Polkadot", - "Kusama", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NetworkId { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Any => { - ::subxt::ext::scale_encode::Variant { - name: "Any", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Named(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Named", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Polkadot => { - ::subxt::ext::scale_encode::Variant { - name: "Polkadot", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Kusama => { - ::subxt::ext::scale_encode::Variant { - name: "Kusama", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NetworkId { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - NetworkId::Any => { - ::core::fmt::Formatter::write_str(f, "Any") - } - NetworkId::Named(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Named", - &__self_0, - ) - } - NetworkId::Polkadot => { - ::core::fmt::Formatter::write_str(f, "Polkadot") - } - NetworkId::Kusama => { - ::core::fmt::Formatter::write_str(f, "Kusama") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum OriginKind { - #[codec(index = 0)] - Native, - #[codec(index = 1)] - SovereignAccount, - #[codec(index = 2)] - Superuser, - #[codec(index = 3)] - Xcm, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for OriginKind { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `OriginKind`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(OriginKind::Native) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(OriginKind::SovereignAccount) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(OriginKind::Superuser) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(OriginKind::Xcm) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `OriginKind`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for OriginKind { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - OriginKind::Native => 0_usize, - OriginKind::SovereignAccount => 0_usize, - OriginKind::Superuser => 0_usize, - OriginKind::Xcm => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - OriginKind::Native => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - OriginKind::SovereignAccount => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - OriginKind::Superuser => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - OriginKind::Xcm => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for OriginKind {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for OriginKind { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = OriginKind; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Native" { - return Ok(OriginKind::Native); - } - if value.name() == "SovereignAccount" { - return Ok(OriginKind::SovereignAccount); - } - if value.name() == "Superuser" { - return Ok(OriginKind::Superuser); - } - if value.name() == "Xcm" { - return Ok(OriginKind::Xcm); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Native", - "SovereignAccount", - "Superuser", - "Xcm", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for OriginKind { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Native => { - ::subxt::ext::scale_encode::Variant { - name: "Native", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SovereignAccount => { - ::subxt::ext::scale_encode::Variant { - name: "SovereignAccount", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Superuser => { - ::subxt::ext::scale_encode::Variant { - name: "Superuser", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Xcm => { - ::subxt::ext::scale_encode::Variant { - name: "Xcm", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for OriginKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - OriginKind::Native => "Native", - OriginKind::SovereignAccount => "SovereignAccount", - OriginKind::Superuser => "Superuser", - OriginKind::Xcm => "Xcm", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Response { - #[codec(index = 0)] - Null, - #[codec(index = 1)] - Assets(runtime_types::xcm::v2::multiasset::MultiAssets), - #[codec(index = 2)] - ExecutionResult( - ::core::option::Option< - ( - ::core::primitive::u32, - runtime_types::xcm::v2::traits::Error, - ), - >, - ), - #[codec(index = 3)] - Version(::core::primitive::u32), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Response { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Response`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Response::Null) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Response::Assets({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Response::Assets.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Response::ExecutionResult({ - let __codec_res_edqy = <::core::option::Option< - ( - ::core::primitive::u32, - runtime_types::xcm::v2::traits::Error, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Response::ExecutionResult.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Response::Version({ - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Response::Version.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Response`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Response { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Response::Null => 0_usize, - Response::Assets(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Response::ExecutionResult(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Response::Version(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Response::Null => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Response::Assets(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Response::ExecutionResult(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Response::Version(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Response {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Response { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Response; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Null" { - return Ok(Response::Null); - } - if value.name() == "Assets" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Response::Assets({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ExecutionResult" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Response::ExecutionResult({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Version" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Response::Version({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Null", - "Assets", - "ExecutionResult", - "Version", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Response { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Null => { - ::subxt::ext::scale_encode::Variant { - name: "Null", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Assets(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Assets", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExecutionResult(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ExecutionResult", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Version(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Version", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Response { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Response::Null => { - ::core::fmt::Formatter::write_str(f, "Null") - } - Response::Assets(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Assets", - &__self_0, - ) - } - Response::ExecutionResult(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ExecutionResult", - &__self_0, - ) - } - Response::Version(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Version", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum WeightLimit { - #[codec(index = 0)] - Unlimited, - #[codec(index = 1)] - Limited(#[codec(compact)] ::core::primitive::u64), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for WeightLimit { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `WeightLimit`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(WeightLimit::Unlimited) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - WeightLimit::Limited({ - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WeightLimit::Limited.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `WeightLimit`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for WeightLimit { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - WeightLimit::Unlimited => 0_usize, - WeightLimit::Limited(ref aa) => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(aa), - ), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - WeightLimit::Unlimited => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - WeightLimit::Limited(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(aa), - __codec_dest_edqy, - ); - } - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for WeightLimit {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for WeightLimit { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = WeightLimit; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Unlimited" { - return Ok(WeightLimit::Unlimited); - } - if value.name() == "Limited" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - WeightLimit::Limited({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Unlimited", "Limited"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for WeightLimit { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Unlimited => { - ::subxt::ext::scale_encode::Variant { - name: "Unlimited", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Limited(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Limited", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for WeightLimit { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - WeightLimit::Unlimited => { - ::core::fmt::Formatter::write_str(f, "Unlimited") - } - WeightLimit::Limited(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Limited", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Xcm( - pub ::std::vec::Vec, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Xcm { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Xcm({ - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::xcm::v2::Instruction, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Xcm.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Xcm { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Xcm {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Xcm { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Xcm; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Xcm({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Xcm { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Xcm { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Xcm(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Xcm { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Xcm(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Xcm { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Xcm", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Xcm2( - pub ::std::vec::Vec, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Xcm2 { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Xcm2({ - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::xcm::v2::Instruction2, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Xcm2.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Xcm2 { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Xcm2 {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Xcm2 { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Xcm2; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Xcm2({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Xcm2 { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Xcm2 { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Xcm2(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Xcm2 { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Xcm2(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Xcm2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Xcm2", - &&self.0, - ) - } - } - } - pub mod v3 { - use super::runtime_types; - pub mod junction { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum BodyId { - #[codec(index = 0)] - Unit, - #[codec(index = 1)] - Moniker([::core::primitive::u8; 4usize]), - #[codec(index = 2)] - Index(#[codec(compact)] ::core::primitive::u32), - #[codec(index = 3)] - Executive, - #[codec(index = 4)] - Technical, - #[codec(index = 5)] - Legislative, - #[codec(index = 6)] - Judicial, - #[codec(index = 7)] - Defense, - #[codec(index = 8)] - Administration, - #[codec(index = 9)] - Treasury, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BodyId { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `BodyId`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyId::Unit) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - BodyId::Moniker({ - let __codec_res_edqy = <[::core::primitive::u8; 4usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BodyId::Moniker.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - BodyId::Index({ - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BodyId::Index.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyId::Executive) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyId::Technical) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyId::Legislative) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyId::Judicial) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyId::Defense) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyId::Administration) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyId::Treasury) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `BodyId`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BodyId { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - BodyId::Unit => 0_usize, - BodyId::Moniker(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - BodyId::Index(ref aa) => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(aa), - ), - ) - } - BodyId::Executive => 0_usize, - BodyId::Technical => 0_usize, - BodyId::Legislative => 0_usize, - BodyId::Judicial => 0_usize, - BodyId::Defense => 0_usize, - BodyId::Administration => 0_usize, - BodyId::Treasury => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - BodyId::Unit => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - BodyId::Moniker(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - BodyId::Index(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(aa), - __codec_dest_edqy, - ); - } - } - BodyId::Executive => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - BodyId::Technical => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - BodyId::Legislative => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - BodyId::Judicial => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - BodyId::Defense => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - BodyId::Administration => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - BodyId::Treasury => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BodyId {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BodyId { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BodyId; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Unit" { - return Ok(BodyId::Unit); - } - if value.name() == "Moniker" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - BodyId::Moniker({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Index" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - BodyId::Index({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Executive" { - return Ok(BodyId::Executive); - } - if value.name() == "Technical" { - return Ok(BodyId::Technical); - } - if value.name() == "Legislative" { - return Ok(BodyId::Legislative); - } - if value.name() == "Judicial" { - return Ok(BodyId::Judicial); - } - if value.name() == "Defense" { - return Ok(BodyId::Defense); - } - if value.name() == "Administration" { - return Ok(BodyId::Administration); - } - if value.name() == "Treasury" { - return Ok(BodyId::Treasury); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Unit", - "Moniker", - "Index", - "Executive", - "Technical", - "Legislative", - "Judicial", - "Defense", - "Administration", - "Treasury", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BodyId { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Unit => { - ::subxt::ext::scale_encode::Variant { - name: "Unit", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Moniker(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Moniker", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Index(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Index", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Executive => { - ::subxt::ext::scale_encode::Variant { - name: "Executive", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Technical => { - ::subxt::ext::scale_encode::Variant { - name: "Technical", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Legislative => { - ::subxt::ext::scale_encode::Variant { - name: "Legislative", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Judicial => { - ::subxt::ext::scale_encode::Variant { - name: "Judicial", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Defense => { - ::subxt::ext::scale_encode::Variant { - name: "Defense", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Administration => { - ::subxt::ext::scale_encode::Variant { - name: "Administration", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Treasury => { - ::subxt::ext::scale_encode::Variant { - name: "Treasury", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BodyId { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - BodyId::Unit => ::core::fmt::Formatter::write_str(f, "Unit"), - BodyId::Moniker(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Moniker", - &__self_0, - ) - } - BodyId::Index(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Index", - &__self_0, - ) - } - BodyId::Executive => { - ::core::fmt::Formatter::write_str(f, "Executive") - } - BodyId::Technical => { - ::core::fmt::Formatter::write_str(f, "Technical") - } - BodyId::Legislative => { - ::core::fmt::Formatter::write_str(f, "Legislative") - } - BodyId::Judicial => { - ::core::fmt::Formatter::write_str(f, "Judicial") - } - BodyId::Defense => { - ::core::fmt::Formatter::write_str(f, "Defense") - } - BodyId::Administration => { - ::core::fmt::Formatter::write_str(f, "Administration") - } - BodyId::Treasury => { - ::core::fmt::Formatter::write_str(f, "Treasury") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum BodyPart { - #[codec(index = 0)] - Voice, - #[codec(index = 1)] - Members { #[codec(compact)] count: ::core::primitive::u32 }, - #[codec(index = 2)] - Fraction { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - #[codec(index = 3)] - AtLeastProportion { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - #[codec(index = 4)] - MoreThanProportion { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for BodyPart { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `BodyPart`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyPart::Voice) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyPart::Members { - count: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BodyPart::Members::count`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyPart::Fraction { - nom: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BodyPart::Fraction::nom`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - denom: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `BodyPart::Fraction::denom`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyPart::AtLeastProportion { - nom: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BodyPart::AtLeastProportion::nom`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - denom: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BodyPart::AtLeastProportion::denom`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(BodyPart::MoreThanProportion { - nom: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BodyPart::MoreThanProportion::nom`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - denom: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `BodyPart::MoreThanProportion::denom`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `BodyPart`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for BodyPart { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - BodyPart::Voice => 0_usize, - BodyPart::Members { ref count } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(count), - ), - ) - } - BodyPart::Fraction { ref nom, ref denom } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(nom), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(denom), - ), - ) - } - BodyPart::AtLeastProportion { ref nom, ref denom } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(nom), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(denom), - ), - ) - } - BodyPart::MoreThanProportion { ref nom, ref denom } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(nom), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(denom), - ), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - BodyPart::Voice => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - BodyPart::Members { ref count } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(count), - __codec_dest_edqy, - ); - } - } - BodyPart::Fraction { ref nom, ref denom } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(nom), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(denom), - __codec_dest_edqy, - ); - } - } - BodyPart::AtLeastProportion { ref nom, ref denom } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(nom), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(denom), - __codec_dest_edqy, - ); - } - } - BodyPart::MoreThanProportion { ref nom, ref denom } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(nom), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(denom), - __codec_dest_edqy, - ); - } - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for BodyPart {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for BodyPart { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = BodyPart; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Voice" { - return Ok(BodyPart::Voice); - } - if value.name() == "Members" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(BodyPart::Members { - count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("count"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BodyPart::Members { - count: { - let val = *vals - .get(&Some("count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "count".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("count"))? - }, - }) - }; - } - if value.name() == "Fraction" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(BodyPart::Fraction { - nom: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nom"))? - }, - denom: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("denom"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BodyPart::Fraction { - nom: { - let val = *vals - .get(&Some("nom")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nom".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nom"))? - }, - denom: { - let val = *vals - .get(&Some("denom")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "denom".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("denom"))? - }, - }) - }; - } - if value.name() == "AtLeastProportion" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(BodyPart::AtLeastProportion { - nom: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nom"))? - }, - denom: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("denom"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BodyPart::AtLeastProportion { - nom: { - let val = *vals - .get(&Some("nom")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nom".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nom"))? - }, - denom: { - let val = *vals - .get(&Some("denom")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "denom".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("denom"))? - }, - }) - }; - } - if value.name() == "MoreThanProportion" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(BodyPart::MoreThanProportion { - nom: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("nom"))? - }, - denom: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("denom"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(BodyPart::MoreThanProportion { - nom: { - let val = *vals - .get(&Some("nom")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "nom".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("nom"))? - }, - denom: { - let val = *vals - .get(&Some("denom")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "denom".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("denom"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Voice", - "Members", - "Fraction", - "AtLeastProportion", - "MoreThanProportion", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for BodyPart { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Voice => { - ::subxt::ext::scale_encode::Variant { - name: "Voice", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Members { count } => { - ::subxt::ext::scale_encode::Variant { - name: "Members", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("count"), - count as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Fraction { nom, denom } => { - ::subxt::ext::scale_encode::Variant { - name: "Fraction", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("nom"), - nom as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("denom"), - denom as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AtLeastProportion { nom, denom } => { - ::subxt::ext::scale_encode::Variant { - name: "AtLeastProportion", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("nom"), - nom as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("denom"), - denom as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MoreThanProportion { nom, denom } => { - ::subxt::ext::scale_encode::Variant { - name: "MoreThanProportion", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("nom"), - nom as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("denom"), - denom as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for BodyPart { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - BodyPart::Voice => { - ::core::fmt::Formatter::write_str(f, "Voice") - } - BodyPart::Members { count: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Members", - "count", - &__self_0, - ) - } - BodyPart::Fraction { nom: __self_0, denom: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Fraction", - "nom", - __self_0, - "denom", - &__self_1, - ) - } - BodyPart::AtLeastProportion { - nom: __self_0, - denom: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AtLeastProportion", - "nom", - __self_0, - "denom", - &__self_1, - ) - } - BodyPart::MoreThanProportion { - nom: __self_0, - denom: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MoreThanProportion", - "nom", - __self_0, - "denom", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Junction { - #[codec(index = 0)] - Parachain(#[codec(compact)] ::core::primitive::u32), - #[codec(index = 1)] - AccountId32 { - network: ::core::option::Option< - runtime_types::xcm::v3::junction::NetworkId, - >, - id: [::core::primitive::u8; 32usize], - }, - #[codec(index = 2)] - AccountIndex64 { - network: ::core::option::Option< - runtime_types::xcm::v3::junction::NetworkId, - >, - #[codec(compact)] - index: ::core::primitive::u64, - }, - #[codec(index = 3)] - AccountKey20 { - network: ::core::option::Option< - runtime_types::xcm::v3::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 { - length: ::core::primitive::u8, - data: [::core::primitive::u8; 32usize], - }, - #[codec(index = 7)] - OnlyChild, - #[codec(index = 8)] - Plurality { - id: runtime_types::xcm::v3::junction::BodyId, - part: runtime_types::xcm::v3::junction::BodyPart, - }, - #[codec(index = 9)] - GlobalConsensus(runtime_types::xcm::v3::junction::NetworkId), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Junction { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Junction`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junction::Parachain({ - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::Parachain.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Junction::AccountId32 { - network: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::xcm::v3::junction::NetworkId, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::AccountId32::network`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - id: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::AccountId32::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Junction::AccountIndex64 { - network: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::xcm::v3::junction::NetworkId, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Junction::AccountIndex64::network`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - index: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Junction::AccountIndex64::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Junction::AccountKey20 { - network: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::xcm::v3::junction::NetworkId, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Junction::AccountKey20::network`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - key: { - let __codec_res_edqy = <[::core::primitive::u8; 20usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::AccountKey20::key`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junction::PalletInstance({ - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::PalletInstance.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junction::GeneralIndex({ - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::GeneralIndex.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Junction::GeneralKey { - length: { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::GeneralKey::length`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - data: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::GeneralKey::data`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Junction::OnlyChild) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Junction::Plurality { - id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::Plurality::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - part: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::Plurality::part`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junction::GlobalConsensus({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junction::GlobalConsensus.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Junction`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Junction { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Junction::Parachain(ref aa) => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(aa), - ), - ) - } - Junction::AccountId32 { ref network, ref id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(network), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - } - Junction::AccountIndex64 { ref network, ref index } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(network), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(index), - ), - ) - } - Junction::AccountKey20 { ref network, ref key } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(network), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(key)) - } - Junction::PalletInstance(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Junction::GeneralIndex(ref aa) => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(aa), - ), - ) - } - Junction::GeneralKey { ref length, ref data } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(length), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(data), - ) - } - Junction::OnlyChild => 0_usize, - Junction::Plurality { ref id, ref part } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(part), - ) - } - Junction::GlobalConsensus(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Junction::Parachain(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(aa), - __codec_dest_edqy, - ); - } - } - Junction::AccountId32 { ref network, ref id } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - network, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - } - Junction::AccountIndex64 { ref network, ref index } => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - network, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - } - Junction::AccountKey20 { ref network, ref key } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - network, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - key, - __codec_dest_edqy, - ); - } - Junction::PalletInstance(ref aa) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Junction::GeneralIndex(ref aa) => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(aa), - __codec_dest_edqy, - ); - } - } - Junction::GeneralKey { ref length, ref data } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - length, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - data, - __codec_dest_edqy, - ); - } - Junction::OnlyChild => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Junction::Plurality { ref id, ref part } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - part, - __codec_dest_edqy, - ); - } - Junction::GlobalConsensus(ref aa) => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Junction {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Junction { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Junction; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Parachain" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Junction::Parachain({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "AccountId32" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Junction::AccountId32 { - network: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("network"))? - }, - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Junction::AccountId32 { - network: { - let val = *vals - .get(&Some("network")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "network".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("network"))? - }, - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - }) - }; - } - if value.name() == "AccountIndex64" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Junction::AccountIndex64 { - network: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("network"))? - }, - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Junction::AccountIndex64 { - network: { - let val = *vals - .get(&Some("network")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "network".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("network"))? - }, - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - }) - }; - } - if value.name() == "AccountKey20" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Junction::AccountKey20 { - network: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("network"))? - }, - key: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("key"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Junction::AccountKey20 { - network: { - let val = *vals - .get(&Some("network")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "network".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("network"))? - }, - key: { - let val = *vals - .get(&Some("key")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "key".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("key"))? - }, - }) - }; - } - if value.name() == "PalletInstance" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Junction::PalletInstance({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "GeneralIndex" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Junction::GeneralIndex({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "GeneralKey" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Junction::GeneralKey { - length: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("length"))? - }, - data: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Junction::GeneralKey { - length: { - let val = *vals - .get(&Some("length")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "length".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("length"))? - }, - data: { - let val = *vals - .get(&Some("data")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "data".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("data"))? - }, - }) - }; - } - if value.name() == "OnlyChild" { - return Ok(Junction::OnlyChild); - } - if value.name() == "Plurality" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Junction::Plurality { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - part: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("part"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Junction::Plurality { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - part: { - let val = *vals - .get(&Some("part")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "part".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("part"))? - }, - }) - }; - } - if value.name() == "GlobalConsensus" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Junction::GlobalConsensus({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Parachain", - "AccountId32", - "AccountIndex64", - "AccountKey20", - "PalletInstance", - "GeneralIndex", - "GeneralKey", - "OnlyChild", - "Plurality", - "GlobalConsensus", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Junction { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Parachain(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Parachain", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AccountId32 { network, id } => { - ::subxt::ext::scale_encode::Variant { - name: "AccountId32", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("network"), - network as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AccountIndex64 { network, index } => { - ::subxt::ext::scale_encode::Variant { - name: "AccountIndex64", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("network"), - network as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AccountKey20 { network, key } => { - ::subxt::ext::scale_encode::Variant { - name: "AccountKey20", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("network"), - network as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("key"), - key as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PalletInstance(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "PalletInstance", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::GeneralIndex(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "GeneralIndex", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::GeneralKey { length, data } => { - ::subxt::ext::scale_encode::Variant { - name: "GeneralKey", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("length"), - length as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("data"), - data as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::OnlyChild => { - ::subxt::ext::scale_encode::Variant { - name: "OnlyChild", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Plurality { id, part } => { - ::subxt::ext::scale_encode::Variant { - name: "Plurality", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("part"), - part as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::GlobalConsensus(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "GlobalConsensus", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Junction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Junction::Parachain(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Parachain", - &__self_0, - ) - } - Junction::AccountId32 { - network: __self_0, - id: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AccountId32", - "network", - __self_0, - "id", - &__self_1, - ) - } - Junction::AccountIndex64 { - network: __self_0, - index: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AccountIndex64", - "network", - __self_0, - "index", - &__self_1, - ) - } - Junction::AccountKey20 { - network: __self_0, - key: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AccountKey20", - "network", - __self_0, - "key", - &__self_1, - ) - } - Junction::PalletInstance(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "PalletInstance", - &__self_0, - ) - } - Junction::GeneralIndex(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "GeneralIndex", - &__self_0, - ) - } - Junction::GeneralKey { - length: __self_0, - data: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "GeneralKey", - "length", - __self_0, - "data", - &__self_1, - ) - } - Junction::OnlyChild => { - ::core::fmt::Formatter::write_str(f, "OnlyChild") - } - Junction::Plurality { id: __self_0, part: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "Plurality", - "id", - __self_0, - "part", - &__self_1, - ) - } - Junction::GlobalConsensus(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "GlobalConsensus", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum NetworkId { - #[codec(index = 0)] - ByGenesis([::core::primitive::u8; 32usize]), - #[codec(index = 1)] - ByFork { - block_number: ::core::primitive::u64, - block_hash: [::core::primitive::u8; 32usize], - }, - #[codec(index = 2)] - Polkadot, - #[codec(index = 3)] - Kusama, - #[codec(index = 4)] - Westend, - #[codec(index = 5)] - Rococo, - #[codec(index = 6)] - Wococo, - #[codec(index = 7)] - Ethereum { - #[codec(compact)] - chain_id: ::core::primitive::u64, - }, - #[codec(index = 8)] - BitcoinCore, - #[codec(index = 9)] - BitcoinCash, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for NetworkId { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `NetworkId`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - NetworkId::ByGenesis({ - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NetworkId::ByGenesis.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(NetworkId::ByFork { - block_number: { - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `NetworkId::ByFork::block_number`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - block_hash: { - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NetworkId::ByFork::block_hash`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(NetworkId::Polkadot) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(NetworkId::Kusama) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(NetworkId::Westend) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(NetworkId::Rococo) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(NetworkId::Wococo) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(NetworkId::Ethereum { - chain_id: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `NetworkId::Ethereum::chain_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(NetworkId::BitcoinCore) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(NetworkId::BitcoinCash) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `NetworkId`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for NetworkId { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - NetworkId::ByGenesis(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - NetworkId::ByFork { ref block_number, ref block_hash } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(block_number), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(block_hash), - ) - } - NetworkId::Polkadot => 0_usize, - NetworkId::Kusama => 0_usize, - NetworkId::Westend => 0_usize, - NetworkId::Rococo => 0_usize, - NetworkId::Wococo => 0_usize, - NetworkId::Ethereum { ref chain_id } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(chain_id), - ), - ) - } - NetworkId::BitcoinCore => 0_usize, - NetworkId::BitcoinCash => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - NetworkId::ByGenesis(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - NetworkId::ByFork { ref block_number, ref block_hash } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - block_number, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - block_hash, - __codec_dest_edqy, - ); - } - NetworkId::Polkadot => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - NetworkId::Kusama => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - NetworkId::Westend => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - NetworkId::Rococo => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - NetworkId::Wococo => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - NetworkId::Ethereum { ref chain_id } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(chain_id), - __codec_dest_edqy, - ); - } - } - NetworkId::BitcoinCore => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - NetworkId::BitcoinCash => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for NetworkId {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for NetworkId { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = NetworkId; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "ByGenesis" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - NetworkId::ByGenesis({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ByFork" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(NetworkId::ByFork { - block_number: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("block_number"))? - }, - block_hash: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("block_hash"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(NetworkId::ByFork { - block_number: { - let val = *vals - .get(&Some("block_number")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "block_number".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("block_number"))? - }, - block_hash: { - let val = *vals - .get(&Some("block_hash")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "block_hash".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("block_hash"))? - }, - }) - }; - } - if value.name() == "Polkadot" { - return Ok(NetworkId::Polkadot); - } - if value.name() == "Kusama" { - return Ok(NetworkId::Kusama); - } - if value.name() == "Westend" { - return Ok(NetworkId::Westend); - } - if value.name() == "Rococo" { - return Ok(NetworkId::Rococo); - } - if value.name() == "Wococo" { - return Ok(NetworkId::Wococo); - } - if value.name() == "Ethereum" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(NetworkId::Ethereum { - chain_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("chain_id"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(NetworkId::Ethereum { - chain_id: { - let val = *vals - .get(&Some("chain_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "chain_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("chain_id"))? - }, - }) - }; - } - if value.name() == "BitcoinCore" { - return Ok(NetworkId::BitcoinCore); - } - if value.name() == "BitcoinCash" { - return Ok(NetworkId::BitcoinCash); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "ByGenesis", - "ByFork", - "Polkadot", - "Kusama", - "Westend", - "Rococo", - "Wococo", - "Ethereum", - "BitcoinCore", - "BitcoinCash", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for NetworkId { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::ByGenesis(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ByGenesis", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ByFork { block_number, block_hash } => { - ::subxt::ext::scale_encode::Variant { - name: "ByFork", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("block_number"), - block_number - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("block_hash"), - block_hash as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Polkadot => { - ::subxt::ext::scale_encode::Variant { - name: "Polkadot", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Kusama => { - ::subxt::ext::scale_encode::Variant { - name: "Kusama", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Westend => { - ::subxt::ext::scale_encode::Variant { - name: "Westend", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Rococo => { - ::subxt::ext::scale_encode::Variant { - name: "Rococo", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Wococo => { - ::subxt::ext::scale_encode::Variant { - name: "Wococo", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Ethereum { chain_id } => { - ::subxt::ext::scale_encode::Variant { - name: "Ethereum", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("chain_id"), - chain_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BitcoinCore => { - ::subxt::ext::scale_encode::Variant { - name: "BitcoinCore", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BitcoinCash => { - ::subxt::ext::scale_encode::Variant { - name: "BitcoinCash", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for NetworkId { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - NetworkId::ByGenesis(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ByGenesis", - &__self_0, - ) - } - NetworkId::ByFork { - block_number: __self_0, - block_hash: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ByFork", - "block_number", - __self_0, - "block_hash", - &__self_1, - ) - } - NetworkId::Polkadot => { - ::core::fmt::Formatter::write_str(f, "Polkadot") - } - NetworkId::Kusama => { - ::core::fmt::Formatter::write_str(f, "Kusama") - } - NetworkId::Westend => { - ::core::fmt::Formatter::write_str(f, "Westend") - } - NetworkId::Rococo => { - ::core::fmt::Formatter::write_str(f, "Rococo") - } - NetworkId::Wococo => { - ::core::fmt::Formatter::write_str(f, "Wococo") - } - NetworkId::Ethereum { chain_id: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "Ethereum", - "chain_id", - &__self_0, - ) - } - NetworkId::BitcoinCore => { - ::core::fmt::Formatter::write_str(f, "BitcoinCore") - } - NetworkId::BitcoinCash => { - ::core::fmt::Formatter::write_str(f, "BitcoinCash") - } - } - } - } - } - pub mod junctions { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Junctions { - #[codec(index = 0)] - Here, - #[codec(index = 1)] - X1(runtime_types::xcm::v3::junction::Junction), - #[codec(index = 2)] - X2( - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - ), - #[codec(index = 3)] - X3( - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - ), - #[codec(index = 4)] - X4( - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - ), - #[codec(index = 5)] - X5( - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - ), - #[codec(index = 6)] - X6( - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - ), - #[codec(index = 7)] - X7( - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - ), - #[codec(index = 8)] - X8( - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - ), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Junctions { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Junctions`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Junctions::Here) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junctions::X1({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X1.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junctions::X2( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X2.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X2.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junctions::X3( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X3.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X3.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X3.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junctions::X4( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X4.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X4.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X4.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X4.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junctions::X5( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X5.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X5.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X5.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X5.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X5.4`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junctions::X6( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X6.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X6.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X6.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X6.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X6.4`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X6.5`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junctions::X7( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X7.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X7.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X7.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X7.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X7.4`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X7.5`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X7.6`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Junctions::X8( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X8.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X8.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X8.2`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X8.3`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X8.4`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X8.5`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X8.6`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Junctions::X8.7`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Junctions`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Junctions { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Junctions::Here => 0_usize, - Junctions::X1(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Junctions::X2(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Junctions::X3(ref aa, ref ba, ref ca) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - } - Junctions::X4(ref aa, ref ba, ref ca, ref da) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(da)) - } - Junctions::X5(ref aa, ref ba, ref ca, ref da, ref ea) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(da)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ea)) - } - Junctions::X6( - ref aa, - ref ba, - ref ca, - ref da, - ref ea, - ref fa, - ) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(da)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ea)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(fa)) - } - Junctions::X7( - ref aa, - ref ba, - ref ca, - ref da, - ref ea, - ref fa, - ref ga, - ) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(da)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ea)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(fa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ga)) - } - Junctions::X8( - ref aa, - ref ba, - ref ca, - ref da, - ref ea, - ref fa, - ref ga, - ref ha, - ) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ca)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(da)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ea)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(fa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ga)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ha)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Junctions::Here => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Junctions::X1(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Junctions::X2(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Junctions::X3(ref aa, ref ba, ref ca) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - } - Junctions::X4(ref aa, ref ba, ref ca, ref da) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - da, - __codec_dest_edqy, - ); - } - Junctions::X5(ref aa, ref ba, ref ca, ref da, ref ea) => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - da, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ea, - __codec_dest_edqy, - ); - } - Junctions::X6( - ref aa, - ref ba, - ref ca, - ref da, - ref ea, - ref fa, - ) => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - da, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ea, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - fa, - __codec_dest_edqy, - ); - } - Junctions::X7( - ref aa, - ref ba, - ref ca, - ref da, - ref ea, - ref fa, - ref ga, - ) => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - da, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ea, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - fa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ga, - __codec_dest_edqy, - ); - } - Junctions::X8( - ref aa, - ref ba, - ref ca, - ref da, - ref ea, - ref fa, - ref ga, - ref ha, - ) => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ca, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - da, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ea, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - fa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ga, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ha, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Junctions {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Junctions { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Junctions; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Here" { - return Ok(Junctions::Here); - } - if value.name() == "X1" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Junctions::X1({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "X2" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Junctions::X2( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "X3" { - let fields = value.fields(); - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - return Ok( - Junctions::X3( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - ), - ); - } - if value.name() == "X4" { - let fields = value.fields(); - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - return Ok( - Junctions::X4( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - ), - ); - } - if value.name() == "X5" { - let fields = value.fields(); - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - return Ok( - Junctions::X5( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(4usize))? - }, - ), - ); - } - if value.name() == "X6" { - let fields = value.fields(); - if fields.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = fields; - return Ok( - Junctions::X6( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(4usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(5usize))? - }, - ), - ); - } - if value.name() == "X7" { - let fields = value.fields(); - if fields.remaining() != 7usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 7usize, - }), - ); - } - let vals = fields; - return Ok( - Junctions::X7( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(4usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(5usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(6usize))? - }, - ), - ); - } - if value.name() == "X8" { - let fields = value.fields(); - if fields.remaining() != 8usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 8usize, - }), - ); - } - let vals = fields; - return Ok( - Junctions::X8( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(2usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(3usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(4usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(5usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(6usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(7usize))? - }, - ), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Here", - "X1", - "X2", - "X3", - "X4", - "X5", - "X6", - "X7", - "X8", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Junctions { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Here => { - ::subxt::ext::scale_encode::Variant { - name: "Here", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::X1(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "X1", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::X2(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "X2", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::X3(_0, _1, _2) => { - ::subxt::ext::scale_encode::Variant { - name: "X3", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::X4(_0, _1, _2, _3) => { - ::subxt::ext::scale_encode::Variant { - name: "X4", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::X5(_0, _1, _2, _3, _4) => { - ::subxt::ext::scale_encode::Variant { - name: "X5", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _4 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::X6(_0, _1, _2, _3, _4, _5) => { - ::subxt::ext::scale_encode::Variant { - name: "X6", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _4 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _5 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::X7(_0, _1, _2, _3, _4, _5, _6) => { - ::subxt::ext::scale_encode::Variant { - name: "X7", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _4 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _5 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _6 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::X8(_0, _1, _2, _3, _4, _5, _6, _7) => { - ::subxt::ext::scale_encode::Variant { - name: "X8", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _2 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _3 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _4 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _5 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _6 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _7 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Junctions { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Junctions::Here => { - ::core::fmt::Formatter::write_str(f, "Here") - } - Junctions::X1(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "X1", - &__self_0, - ) - } - Junctions::X2(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "X2", - __self_0, - &__self_1, - ) - } - Junctions::X3(__self_0, __self_1, __self_2) => { - ::core::fmt::Formatter::debug_tuple_field3_finish( - f, - "X3", - __self_0, - __self_1, - &__self_2, - ) - } - Junctions::X4(__self_0, __self_1, __self_2, __self_3) => { - ::core::fmt::Formatter::debug_tuple_field4_finish( - f, - "X4", - __self_0, - __self_1, - __self_2, - &__self_3, - ) - } - Junctions::X5( - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - ) => { - ::core::fmt::Formatter::debug_tuple_field5_finish( - f, - "X5", - __self_0, - __self_1, - __self_2, - __self_3, - &__self_4, - ) - } - Junctions::X6( - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - __self_5, - ) => { - let values: &[&dyn ::core::fmt::Debug] = &[ - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - &__self_5, - ]; - ::core::fmt::Formatter::debug_tuple_fields_finish( - f, - "X6", - values, - ) - } - Junctions::X7( - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - __self_5, - __self_6, - ) => { - let values: &[&dyn ::core::fmt::Debug] = &[ - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - __self_5, - &__self_6, - ]; - ::core::fmt::Formatter::debug_tuple_fields_finish( - f, - "X7", - values, - ) - } - Junctions::X8( - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - __self_5, - __self_6, - __self_7, - ) => { - let values: &[&dyn ::core::fmt::Debug] = &[ - __self_0, - __self_1, - __self_2, - __self_3, - __self_4, - __self_5, - __self_6, - &__self_7, - ]; - ::core::fmt::Formatter::debug_tuple_fields_finish( - f, - "X8", - values, - ) - } - } - } - } - } - pub mod multiasset { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum AssetId { - #[codec(index = 0)] - Concrete( - runtime_types::xcm::v3::multilocation::MultiLocation, - ), - #[codec(index = 1)] - Abstract([::core::primitive::u8; 32usize]), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AssetId { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `AssetId`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AssetId::Concrete({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetId::Concrete.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AssetId::Abstract({ - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetId::Abstract.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `AssetId`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AssetId { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - AssetId::Concrete(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - AssetId::Abstract(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - AssetId::Concrete(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - AssetId::Abstract(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AssetId {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for AssetId { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AssetId; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Concrete" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - AssetId::Concrete({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Abstract" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - AssetId::Abstract({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Concrete", "Abstract"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AssetId { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Concrete(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Concrete", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Abstract(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Abstract", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AssetId { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - AssetId::Concrete(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Concrete", - &__self_0, - ) - } - AssetId::Abstract(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Abstract", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum AssetInstance { - #[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]), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for AssetInstance { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `AssetInstance`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(AssetInstance::Undefined) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AssetInstance::Index({ - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetInstance::Index.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AssetInstance::Array4({ - let __codec_res_edqy = <[::core::primitive::u8; 4usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetInstance::Array4.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AssetInstance::Array8({ - let __codec_res_edqy = <[::core::primitive::u8; 8usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetInstance::Array8.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AssetInstance::Array16({ - let __codec_res_edqy = <[::core::primitive::u8; 16usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetInstance::Array16.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - AssetInstance::Array32({ - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `AssetInstance::Array32.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `AssetInstance`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for AssetInstance { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - AssetInstance::Undefined => 0_usize, - AssetInstance::Index(ref aa) => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(aa), - ), - ) - } - AssetInstance::Array4(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - AssetInstance::Array8(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - AssetInstance::Array16(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - AssetInstance::Array32(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - AssetInstance::Undefined => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - AssetInstance::Index(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(aa), - __codec_dest_edqy, - ); - } - } - AssetInstance::Array4(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - AssetInstance::Array8(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - AssetInstance::Array16(ref aa) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - AssetInstance::Array32(ref aa) => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for AssetInstance {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for AssetInstance { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = AssetInstance; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Undefined" { - return Ok(AssetInstance::Undefined); - } - if value.name() == "Index" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - AssetInstance::Index({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Array4" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - AssetInstance::Array4({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Array8" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - AssetInstance::Array8({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Array16" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - AssetInstance::Array16({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Array32" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - AssetInstance::Array32({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Undefined", - "Index", - "Array4", - "Array8", - "Array16", - "Array32", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for AssetInstance { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Undefined => { - ::subxt::ext::scale_encode::Variant { - name: "Undefined", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Index(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Index", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Array4(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Array4", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Array8(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Array8", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Array16(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Array16", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Array32(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Array32", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for AssetInstance { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - AssetInstance::Undefined => { - ::core::fmt::Formatter::write_str(f, "Undefined") - } - AssetInstance::Index(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Index", - &__self_0, - ) - } - AssetInstance::Array4(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Array4", - &__self_0, - ) - } - AssetInstance::Array8(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Array8", - &__self_0, - ) - } - AssetInstance::Array16(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Array16", - &__self_0, - ) - } - AssetInstance::Array32(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Array32", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Fungibility { - #[codec(index = 0)] - Fungible(#[codec(compact)] ::core::primitive::u128), - #[codec(index = 1)] - NonFungible( - runtime_types::xcm::v3::multiasset::AssetInstance, - ), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Fungibility { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Fungibility`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Fungibility::Fungible({ - let __codec_res_edqy = <<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Fungibility::Fungible.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Fungibility::NonFungible({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Fungibility::NonFungible.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Fungibility`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Fungibility { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Fungibility::Fungible(ref aa) => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(aa), - ), - ) - } - Fungibility::NonFungible(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Fungibility::Fungible(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u128 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u128, - >>::RefType::from(aa), - __codec_dest_edqy, - ); - } - } - Fungibility::NonFungible(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Fungibility {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for Fungibility { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Fungibility; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Fungible" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Fungibility::Fungible({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "NonFungible" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Fungibility::NonFungible({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Fungible", "NonFungible"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Fungibility { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Fungible(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Fungible", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NonFungible(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "NonFungible", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Fungibility { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Fungibility::Fungible(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Fungible", - &__self_0, - ) - } - Fungibility::NonFungible(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "NonFungible", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MultiAsset { - pub id: runtime_types::xcm::v3::multiasset::AssetId, - pub fun: runtime_types::xcm::v3::multiasset::Fungibility, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MultiAsset { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(MultiAsset { - id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiAsset::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fun: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiAsset::fun`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MultiAsset { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.id), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.fun), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.fun, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MultiAsset {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MultiAsset { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MultiAsset; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MultiAsset { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - fun: { - let val = *vals - .get(&Some("fun")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fun".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fun"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(MultiAsset { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - fun: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fun"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for MultiAsset { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MultiAsset { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultiAsset { id, fun } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fun"), - fun as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MultiAsset { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultiAsset { id, fun } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fun"), - fun as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MultiAsset { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MultiAsset", - "id", - &self.id, - "fun", - &&self.fun, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum MultiAssetFilter { - #[codec(index = 0)] - Definite(runtime_types::xcm::v3::multiasset::MultiAssets), - #[codec(index = 1)] - Wild(runtime_types::xcm::v3::multiasset::WildMultiAsset), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MultiAssetFilter { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `MultiAssetFilter`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - MultiAssetFilter::Definite({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiAssetFilter::Definite.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - MultiAssetFilter::Wild({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiAssetFilter::Wild.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `MultiAssetFilter`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MultiAssetFilter { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - MultiAssetFilter::Definite(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - MultiAssetFilter::Wild(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - MultiAssetFilter::Definite(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - MultiAssetFilter::Wild(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MultiAssetFilter {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for MultiAssetFilter { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MultiAssetFilter; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Definite" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - MultiAssetFilter::Definite({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Wild" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - MultiAssetFilter::Wild({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Definite", "Wild"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for MultiAssetFilter { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Definite(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Definite", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Wild(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Wild", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MultiAssetFilter { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - MultiAssetFilter::Definite(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Definite", - &__self_0, - ) - } - MultiAssetFilter::Wild(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Wild", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MultiAssets( - pub ::std::vec::Vec< - runtime_types::xcm::v3::multiasset::MultiAsset, - >, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MultiAssets { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - MultiAssets({ - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::xcm::v3::multiasset::MultiAsset, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiAssets.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MultiAssets { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MultiAssets {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for MultiAssets { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MultiAssets; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - MultiAssets({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for MultiAssets { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MultiAssets { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultiAssets(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for MultiAssets { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultiAssets(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MultiAssets { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "MultiAssets", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum WildFungibility { - #[codec(index = 0)] - Fungible, - #[codec(index = 1)] - NonFungible, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for WildFungibility { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `WildFungibility`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(WildFungibility::Fungible) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(WildFungibility::NonFungible) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `WildFungibility`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for WildFungibility { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - WildFungibility::Fungible => 0_usize, - WildFungibility::NonFungible => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - WildFungibility::Fungible => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - WildFungibility::NonFungible => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for WildFungibility {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for WildFungibility { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = WildFungibility; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Fungible" { - return Ok(WildFungibility::Fungible); - } - if value.name() == "NonFungible" { - return Ok(WildFungibility::NonFungible); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Fungible", "NonFungible"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for WildFungibility { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Fungible => { - ::subxt::ext::scale_encode::Variant { - name: "Fungible", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NonFungible => { - ::subxt::ext::scale_encode::Variant { - name: "NonFungible", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for WildFungibility { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str( - f, - match self { - WildFungibility::Fungible => "Fungible", - WildFungibility::NonFungible => "NonFungible", - }, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum WildMultiAsset { - #[codec(index = 0)] - All, - #[codec(index = 1)] - AllOf { - id: runtime_types::xcm::v3::multiasset::AssetId, - fun: runtime_types::xcm::v3::multiasset::WildFungibility, - }, - #[codec(index = 2)] - AllCounted(#[codec(compact)] ::core::primitive::u32), - #[codec(index = 3)] - AllOfCounted { - id: runtime_types::xcm::v3::multiasset::AssetId, - fun: runtime_types::xcm::v3::multiasset::WildFungibility, - #[codec(compact)] - count: ::core::primitive::u32, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for WildMultiAsset { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `WildMultiAsset`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(WildMultiAsset::All) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(WildMultiAsset::AllOf { - id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WildMultiAsset::AllOf::id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fun: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WildMultiAsset::AllOf::fun`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - WildMultiAsset::AllCounted({ - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WildMultiAsset::AllCounted.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(WildMultiAsset::AllOfCounted { - id: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `WildMultiAsset::AllOfCounted::id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - fun: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `WildMultiAsset::AllOfCounted::fun`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - count: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `WildMultiAsset::AllOfCounted::count`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `WildMultiAsset`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for WildMultiAsset { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - WildMultiAsset::All => 0_usize, - WildMultiAsset::AllOf { ref id, ref fun } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(fun)) - } - WildMultiAsset::AllCounted(ref aa) => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(aa), - ), - ) - } - WildMultiAsset::AllOfCounted { - ref id, - ref fun, - ref count, - } => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(id)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(fun)) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(count), - ), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - WildMultiAsset::All => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - WildMultiAsset::AllOf { ref id, ref fun } => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - fun, - __codec_dest_edqy, - ); - } - WildMultiAsset::AllCounted(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(aa), - __codec_dest_edqy, - ); - } - } - WildMultiAsset::AllOfCounted { - ref id, - ref fun, - ref count, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - id, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - fun, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(count), - __codec_dest_edqy, - ); - } - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for WildMultiAsset {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for WildMultiAsset { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = WildMultiAsset; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "All" { - return Ok(WildMultiAsset::All); - } - if value.name() == "AllOf" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(WildMultiAsset::AllOf { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - fun: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fun"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(WildMultiAsset::AllOf { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - fun: { - let val = *vals - .get(&Some("fun")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fun".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fun"))? - }, - }) - }; - } - if value.name() == "AllCounted" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - WildMultiAsset::AllCounted({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "AllOfCounted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(WildMultiAsset::AllOfCounted { - id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - fun: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fun"))? - }, - count: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("count"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(WildMultiAsset::AllOfCounted { - id: { - let val = *vals - .get(&Some("id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("id"))? - }, - fun: { - let val = *vals - .get(&Some("fun")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fun".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fun"))? - }, - count: { - let val = *vals - .get(&Some("count")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "count".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("count"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "All", - "AllOf", - "AllCounted", - "AllOfCounted", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for WildMultiAsset { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::All => { - ::subxt::ext::scale_encode::Variant { - name: "All", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AllOf { id, fun } => { - ::subxt::ext::scale_encode::Variant { - name: "AllOf", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fun"), - fun as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AllCounted(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "AllCounted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AllOfCounted { id, fun, count } => { - ::subxt::ext::scale_encode::Variant { - name: "AllOfCounted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("id"), - id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("fun"), - fun as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("count"), - count as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for WildMultiAsset { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - WildMultiAsset::All => { - ::core::fmt::Formatter::write_str(f, "All") - } - WildMultiAsset::AllOf { id: __self_0, fun: __self_1 } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "AllOf", - "id", - __self_0, - "fun", - &__self_1, - ) - } - WildMultiAsset::AllCounted(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "AllCounted", - &__self_0, - ) - } - WildMultiAsset::AllOfCounted { - id: __self_0, - fun: __self_1, - count: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "AllOfCounted", - "id", - __self_0, - "fun", - __self_1, - "count", - &__self_2, - ) - } - } - } - } - } - pub mod multilocation { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MultiLocation { - pub parents: ::core::primitive::u8, - pub interior: runtime_types::xcm::v3::junctions::Junctions, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MultiLocation { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(MultiLocation { - parents: { - let __codec_res_edqy = <::core::primitive::u8 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiLocation::parents`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - interior: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MultiLocation::interior`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MultiLocation { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.parents), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.interior), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.parents, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.interior, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MultiLocation {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for MultiLocation { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MultiLocation; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(MultiLocation { - parents: { - let val = *vals - .get(&Some("parents")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "parents".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("parents"))? - }, - interior: { - let val = *vals - .get(&Some("interior")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "interior".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("interior"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = value; - Ok(MultiLocation { - parents: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("parents"))? - }, - interior: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("interior"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for MultiLocation { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MultiLocation { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultiLocation { parents, interior } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parents"), - parents as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("interior"), - interior as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for MultiLocation { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let MultiLocation { parents, interior } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("parents"), - parents as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("interior"), - interior as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MultiLocation { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "MultiLocation", - "parents", - &self.parents, - "interior", - &&self.interior, - ) - } - } - } - pub mod traits { - use super::runtime_types; - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { - #[codec(index = 0)] - Overflow, - #[codec(index = 1)] - Unimplemented, - #[codec(index = 2)] - UntrustedReserveLocation, - #[codec(index = 3)] - UntrustedTeleportLocation, - #[codec(index = 4)] - LocationFull, - #[codec(index = 5)] - LocationNotInvertible, - #[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)] - ExpectationFalse, - #[codec(index = 23)] - PalletNotFound, - #[codec(index = 24)] - NameMismatch, - #[codec(index = 25)] - VersionIncompatible, - #[codec(index = 26)] - HoldingWouldOverflow, - #[codec(index = 27)] - ExportError, - #[codec(index = 28)] - ReanchorFailed, - #[codec(index = 29)] - NoDeal, - #[codec(index = 30)] - FeesNotMet, - #[codec(index = 31)] - LockError, - #[codec(index = 32)] - NoPermission, - #[codec(index = 33)] - Unanchored, - #[codec(index = 34)] - NotDepositable, - #[codec(index = 35)] - UnhandledXcmVersion, - #[codec(index = 36)] - WeightLimitReached( - runtime_types::sp_weights::weight_v2::Weight, - ), - #[codec(index = 37)] - Barrier, - #[codec(index = 38)] - WeightNotComputable, - #[codec(index = 39)] - ExceedsStackLimit, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Error { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Error`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Overflow) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Unimplemented) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UntrustedReserveLocation) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UntrustedTeleportLocation) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::LocationFull) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::LocationNotInvertible) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::BadOrigin) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::InvalidLocation) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::AssetNotFound) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::FailedToTransactAsset) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotWithdrawable) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::LocationCannotHold) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ExceedsMaxMessageSize) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::DestinationUnsupported) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Transport) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Unroutable) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UnknownClaim) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::FailedToDecode) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::MaxWeightInvalid) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotHoldingFees) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::TooExpensive) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::Trap({ - let __codec_res_edqy = <::core::primitive::u64 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Error::Trap.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 22u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ExpectationFalse) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 23u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::PalletNotFound) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 24u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NameMismatch) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 25u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::VersionIncompatible) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 26u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::HoldingWouldOverflow) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 27u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ExportError) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 28u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ReanchorFailed) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 29u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoDeal) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 30u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::FeesNotMet) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 31u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::LockError) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 32u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NoPermission) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 33u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Unanchored) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 34u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::NotDepositable) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 35u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::UnhandledXcmVersion) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 36u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Error::WeightLimitReached({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Error::WeightLimitReached.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 37u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::Barrier) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 38u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::WeightNotComputable) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 39u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Error::ExceedsStackLimit) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into("Could not decode `Error`, variant doesn't exist"), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Error { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Error::Overflow => 0_usize, - Error::Unimplemented => 0_usize, - Error::UntrustedReserveLocation => 0_usize, - Error::UntrustedTeleportLocation => 0_usize, - Error::LocationFull => 0_usize, - Error::LocationNotInvertible => 0_usize, - Error::BadOrigin => 0_usize, - Error::InvalidLocation => 0_usize, - Error::AssetNotFound => 0_usize, - Error::FailedToTransactAsset => 0_usize, - Error::NotWithdrawable => 0_usize, - Error::LocationCannotHold => 0_usize, - Error::ExceedsMaxMessageSize => 0_usize, - Error::DestinationUnsupported => 0_usize, - Error::Transport => 0_usize, - Error::Unroutable => 0_usize, - Error::UnknownClaim => 0_usize, - Error::FailedToDecode => 0_usize, - Error::MaxWeightInvalid => 0_usize, - Error::NotHoldingFees => 0_usize, - Error::TooExpensive => 0_usize, - Error::Trap(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Error::ExpectationFalse => 0_usize, - Error::PalletNotFound => 0_usize, - Error::NameMismatch => 0_usize, - Error::VersionIncompatible => 0_usize, - Error::HoldingWouldOverflow => 0_usize, - Error::ExportError => 0_usize, - Error::ReanchorFailed => 0_usize, - Error::NoDeal => 0_usize, - Error::FeesNotMet => 0_usize, - Error::LockError => 0_usize, - Error::NoPermission => 0_usize, - Error::Unanchored => 0_usize, - Error::NotDepositable => 0_usize, - Error::UnhandledXcmVersion => 0_usize, - Error::WeightLimitReached(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Error::Barrier => 0_usize, - Error::WeightNotComputable => 0_usize, - Error::ExceedsStackLimit => 0_usize, - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Error::Overflow => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Error::Unimplemented => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - } - Error::UntrustedReserveLocation => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - } - Error::UntrustedTeleportLocation => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - } - Error::LocationFull => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - } - Error::LocationNotInvertible => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - } - Error::BadOrigin => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - } - Error::InvalidLocation => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - } - Error::AssetNotFound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - } - Error::FailedToTransactAsset => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - } - Error::NotWithdrawable => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Error::LocationCannotHold => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - } - Error::ExceedsMaxMessageSize => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - } - Error::DestinationUnsupported => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - } - Error::Transport => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - } - Error::Unroutable => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - } - Error::UnknownClaim => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - } - Error::FailedToDecode => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - } - Error::MaxWeightInvalid => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - } - Error::NotHoldingFees => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - } - Error::TooExpensive => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - } - Error::Trap(ref aa) => { - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Error::ExpectationFalse => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(22u8 as ::core::primitive::u8); - } - Error::PalletNotFound => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(23u8 as ::core::primitive::u8); - } - Error::NameMismatch => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(24u8 as ::core::primitive::u8); - } - Error::VersionIncompatible => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(25u8 as ::core::primitive::u8); - } - Error::HoldingWouldOverflow => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(26u8 as ::core::primitive::u8); - } - Error::ExportError => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(27u8 as ::core::primitive::u8); - } - Error::ReanchorFailed => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(28u8 as ::core::primitive::u8); - } - Error::NoDeal => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(29u8 as ::core::primitive::u8); - } - Error::FeesNotMet => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(30u8 as ::core::primitive::u8); - } - Error::LockError => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(31u8 as ::core::primitive::u8); - } - Error::NoPermission => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(32u8 as ::core::primitive::u8); - } - Error::Unanchored => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(33u8 as ::core::primitive::u8); - } - Error::NotDepositable => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(34u8 as ::core::primitive::u8); - } - Error::UnhandledXcmVersion => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(35u8 as ::core::primitive::u8); - } - Error::WeightLimitReached(ref aa) => { - __codec_dest_edqy.push_byte(36u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Error::Barrier => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(37u8 as ::core::primitive::u8); - } - Error::WeightNotComputable => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(38u8 as ::core::primitive::u8); - } - Error::ExceedsStackLimit => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(39u8 as ::core::primitive::u8); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Error {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Error { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Error; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Overflow" { - return Ok(Error::Overflow); - } - if value.name() == "Unimplemented" { - return Ok(Error::Unimplemented); - } - if value.name() == "UntrustedReserveLocation" { - return Ok(Error::UntrustedReserveLocation); - } - if value.name() == "UntrustedTeleportLocation" { - return Ok(Error::UntrustedTeleportLocation); - } - if value.name() == "LocationFull" { - return Ok(Error::LocationFull); - } - if value.name() == "LocationNotInvertible" { - return Ok(Error::LocationNotInvertible); - } - if value.name() == "BadOrigin" { - return Ok(Error::BadOrigin); - } - if value.name() == "InvalidLocation" { - return Ok(Error::InvalidLocation); - } - if value.name() == "AssetNotFound" { - return Ok(Error::AssetNotFound); - } - if value.name() == "FailedToTransactAsset" { - return Ok(Error::FailedToTransactAsset); - } - if value.name() == "NotWithdrawable" { - return Ok(Error::NotWithdrawable); - } - if value.name() == "LocationCannotHold" { - return Ok(Error::LocationCannotHold); - } - if value.name() == "ExceedsMaxMessageSize" { - return Ok(Error::ExceedsMaxMessageSize); - } - if value.name() == "DestinationUnsupported" { - return Ok(Error::DestinationUnsupported); - } - if value.name() == "Transport" { - return Ok(Error::Transport); - } - if value.name() == "Unroutable" { - return Ok(Error::Unroutable); - } - if value.name() == "UnknownClaim" { - return Ok(Error::UnknownClaim); - } - if value.name() == "FailedToDecode" { - return Ok(Error::FailedToDecode); - } - if value.name() == "MaxWeightInvalid" { - return Ok(Error::MaxWeightInvalid); - } - if value.name() == "NotHoldingFees" { - return Ok(Error::NotHoldingFees); - } - if value.name() == "TooExpensive" { - return Ok(Error::TooExpensive); - } - if value.name() == "Trap" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Error::Trap({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ExpectationFalse" { - return Ok(Error::ExpectationFalse); - } - if value.name() == "PalletNotFound" { - return Ok(Error::PalletNotFound); - } - if value.name() == "NameMismatch" { - return Ok(Error::NameMismatch); - } - if value.name() == "VersionIncompatible" { - return Ok(Error::VersionIncompatible); - } - if value.name() == "HoldingWouldOverflow" { - return Ok(Error::HoldingWouldOverflow); - } - if value.name() == "ExportError" { - return Ok(Error::ExportError); - } - if value.name() == "ReanchorFailed" { - return Ok(Error::ReanchorFailed); - } - if value.name() == "NoDeal" { - return Ok(Error::NoDeal); - } - if value.name() == "FeesNotMet" { - return Ok(Error::FeesNotMet); - } - if value.name() == "LockError" { - return Ok(Error::LockError); - } - if value.name() == "NoPermission" { - return Ok(Error::NoPermission); - } - if value.name() == "Unanchored" { - return Ok(Error::Unanchored); - } - if value.name() == "NotDepositable" { - return Ok(Error::NotDepositable); - } - if value.name() == "UnhandledXcmVersion" { - return Ok(Error::UnhandledXcmVersion); - } - if value.name() == "WeightLimitReached" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Error::WeightLimitReached({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Barrier" { - return Ok(Error::Barrier); - } - if value.name() == "WeightNotComputable" { - return Ok(Error::WeightNotComputable); - } - if value.name() == "ExceedsStackLimit" { - return Ok(Error::ExceedsStackLimit); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Overflow", - "Unimplemented", - "UntrustedReserveLocation", - "UntrustedTeleportLocation", - "LocationFull", - "LocationNotInvertible", - "BadOrigin", - "InvalidLocation", - "AssetNotFound", - "FailedToTransactAsset", - "NotWithdrawable", - "LocationCannotHold", - "ExceedsMaxMessageSize", - "DestinationUnsupported", - "Transport", - "Unroutable", - "UnknownClaim", - "FailedToDecode", - "MaxWeightInvalid", - "NotHoldingFees", - "TooExpensive", - "Trap", - "ExpectationFalse", - "PalletNotFound", - "NameMismatch", - "VersionIncompatible", - "HoldingWouldOverflow", - "ExportError", - "ReanchorFailed", - "NoDeal", - "FeesNotMet", - "LockError", - "NoPermission", - "Unanchored", - "NotDepositable", - "UnhandledXcmVersion", - "WeightLimitReached", - "Barrier", - "WeightNotComputable", - "ExceedsStackLimit", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Error { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Overflow => { - ::subxt::ext::scale_encode::Variant { - name: "Overflow", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unimplemented => { - ::subxt::ext::scale_encode::Variant { - name: "Unimplemented", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UntrustedReserveLocation => { - ::subxt::ext::scale_encode::Variant { - name: "UntrustedReserveLocation", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UntrustedTeleportLocation => { - ::subxt::ext::scale_encode::Variant { - name: "UntrustedTeleportLocation", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LocationFull => { - ::subxt::ext::scale_encode::Variant { - name: "LocationFull", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LocationNotInvertible => { - ::subxt::ext::scale_encode::Variant { - name: "LocationNotInvertible", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BadOrigin => { - ::subxt::ext::scale_encode::Variant { - name: "BadOrigin", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InvalidLocation => { - ::subxt::ext::scale_encode::Variant { - name: "InvalidLocation", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AssetNotFound => { - ::subxt::ext::scale_encode::Variant { - name: "AssetNotFound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FailedToTransactAsset => { - ::subxt::ext::scale_encode::Variant { - name: "FailedToTransactAsset", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotWithdrawable => { - ::subxt::ext::scale_encode::Variant { - name: "NotWithdrawable", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LocationCannotHold => { - ::subxt::ext::scale_encode::Variant { - name: "LocationCannotHold", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExceedsMaxMessageSize => { - ::subxt::ext::scale_encode::Variant { - name: "ExceedsMaxMessageSize", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DestinationUnsupported => { - ::subxt::ext::scale_encode::Variant { - name: "DestinationUnsupported", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Transport => { - ::subxt::ext::scale_encode::Variant { - name: "Transport", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unroutable => { - ::subxt::ext::scale_encode::Variant { - name: "Unroutable", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnknownClaim => { - ::subxt::ext::scale_encode::Variant { - name: "UnknownClaim", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FailedToDecode => { - ::subxt::ext::scale_encode::Variant { - name: "FailedToDecode", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::MaxWeightInvalid => { - ::subxt::ext::scale_encode::Variant { - name: "MaxWeightInvalid", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotHoldingFees => { - ::subxt::ext::scale_encode::Variant { - name: "NotHoldingFees", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TooExpensive => { - ::subxt::ext::scale_encode::Variant { - name: "TooExpensive", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Trap(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Trap", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExpectationFalse => { - ::subxt::ext::scale_encode::Variant { - name: "ExpectationFalse", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PalletNotFound => { - ::subxt::ext::scale_encode::Variant { - name: "PalletNotFound", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NameMismatch => { - ::subxt::ext::scale_encode::Variant { - name: "NameMismatch", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::VersionIncompatible => { - ::subxt::ext::scale_encode::Variant { - name: "VersionIncompatible", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HoldingWouldOverflow => { - ::subxt::ext::scale_encode::Variant { - name: "HoldingWouldOverflow", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExportError => { - ::subxt::ext::scale_encode::Variant { - name: "ExportError", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReanchorFailed => { - ::subxt::ext::scale_encode::Variant { - name: "ReanchorFailed", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoDeal => { - ::subxt::ext::scale_encode::Variant { - name: "NoDeal", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::FeesNotMet => { - ::subxt::ext::scale_encode::Variant { - name: "FeesNotMet", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LockError => { - ::subxt::ext::scale_encode::Variant { - name: "LockError", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoPermission => { - ::subxt::ext::scale_encode::Variant { - name: "NoPermission", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Unanchored => { - ::subxt::ext::scale_encode::Variant { - name: "Unanchored", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NotDepositable => { - ::subxt::ext::scale_encode::Variant { - name: "NotDepositable", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnhandledXcmVersion => { - ::subxt::ext::scale_encode::Variant { - name: "UnhandledXcmVersion", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WeightLimitReached(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "WeightLimitReached", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Barrier => { - ::subxt::ext::scale_encode::Variant { - name: "Barrier", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::WeightNotComputable => { - ::subxt::ext::scale_encode::Variant { - name: "WeightNotComputable", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExceedsStackLimit => { - ::subxt::ext::scale_encode::Variant { - name: "ExceedsStackLimit", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Error { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Error::Overflow => { - ::core::fmt::Formatter::write_str(f, "Overflow") - } - Error::Unimplemented => { - ::core::fmt::Formatter::write_str(f, "Unimplemented") - } - Error::UntrustedReserveLocation => { - ::core::fmt::Formatter::write_str( - f, - "UntrustedReserveLocation", - ) - } - Error::UntrustedTeleportLocation => { - ::core::fmt::Formatter::write_str( - f, - "UntrustedTeleportLocation", - ) - } - Error::LocationFull => { - ::core::fmt::Formatter::write_str(f, "LocationFull") - } - Error::LocationNotInvertible => { - ::core::fmt::Formatter::write_str( - f, - "LocationNotInvertible", - ) - } - Error::BadOrigin => { - ::core::fmt::Formatter::write_str(f, "BadOrigin") - } - Error::InvalidLocation => { - ::core::fmt::Formatter::write_str(f, "InvalidLocation") - } - Error::AssetNotFound => { - ::core::fmt::Formatter::write_str(f, "AssetNotFound") - } - Error::FailedToTransactAsset => { - ::core::fmt::Formatter::write_str( - f, - "FailedToTransactAsset", - ) - } - Error::NotWithdrawable => { - ::core::fmt::Formatter::write_str(f, "NotWithdrawable") - } - Error::LocationCannotHold => { - ::core::fmt::Formatter::write_str(f, "LocationCannotHold") - } - Error::ExceedsMaxMessageSize => { - ::core::fmt::Formatter::write_str( - f, - "ExceedsMaxMessageSize", - ) - } - Error::DestinationUnsupported => { - ::core::fmt::Formatter::write_str( - f, - "DestinationUnsupported", - ) - } - Error::Transport => { - ::core::fmt::Formatter::write_str(f, "Transport") - } - Error::Unroutable => { - ::core::fmt::Formatter::write_str(f, "Unroutable") - } - Error::UnknownClaim => { - ::core::fmt::Formatter::write_str(f, "UnknownClaim") - } - Error::FailedToDecode => { - ::core::fmt::Formatter::write_str(f, "FailedToDecode") - } - Error::MaxWeightInvalid => { - ::core::fmt::Formatter::write_str(f, "MaxWeightInvalid") - } - Error::NotHoldingFees => { - ::core::fmt::Formatter::write_str(f, "NotHoldingFees") - } - Error::TooExpensive => { - ::core::fmt::Formatter::write_str(f, "TooExpensive") - } - Error::Trap(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Trap", - &__self_0, - ) - } - Error::ExpectationFalse => { - ::core::fmt::Formatter::write_str(f, "ExpectationFalse") - } - Error::PalletNotFound => { - ::core::fmt::Formatter::write_str(f, "PalletNotFound") - } - Error::NameMismatch => { - ::core::fmt::Formatter::write_str(f, "NameMismatch") - } - Error::VersionIncompatible => { - ::core::fmt::Formatter::write_str(f, "VersionIncompatible") - } - Error::HoldingWouldOverflow => { - ::core::fmt::Formatter::write_str(f, "HoldingWouldOverflow") - } - Error::ExportError => { - ::core::fmt::Formatter::write_str(f, "ExportError") - } - Error::ReanchorFailed => { - ::core::fmt::Formatter::write_str(f, "ReanchorFailed") - } - Error::NoDeal => { - ::core::fmt::Formatter::write_str(f, "NoDeal") - } - Error::FeesNotMet => { - ::core::fmt::Formatter::write_str(f, "FeesNotMet") - } - Error::LockError => { - ::core::fmt::Formatter::write_str(f, "LockError") - } - Error::NoPermission => { - ::core::fmt::Formatter::write_str(f, "NoPermission") - } - Error::Unanchored => { - ::core::fmt::Formatter::write_str(f, "Unanchored") - } - Error::NotDepositable => { - ::core::fmt::Formatter::write_str(f, "NotDepositable") - } - Error::UnhandledXcmVersion => { - ::core::fmt::Formatter::write_str(f, "UnhandledXcmVersion") - } - Error::WeightLimitReached(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "WeightLimitReached", - &__self_0, - ) - } - Error::Barrier => { - ::core::fmt::Formatter::write_str(f, "Barrier") - } - Error::WeightNotComputable => { - ::core::fmt::Formatter::write_str(f, "WeightNotComputable") - } - Error::ExceedsStackLimit => { - ::core::fmt::Formatter::write_str(f, "ExceedsStackLimit") - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Outcome { - #[codec(index = 0)] - Complete(runtime_types::sp_weights::weight_v2::Weight), - #[codec(index = 1)] - Incomplete( - runtime_types::sp_weights::weight_v2::Weight, - runtime_types::xcm::v3::traits::Error, - ), - #[codec(index = 2)] - Error(runtime_types::xcm::v3::traits::Error), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Outcome { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Outcome`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Outcome::Complete({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Outcome::Complete.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Outcome::Incomplete( - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Outcome::Incomplete.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Outcome::Incomplete.1`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Outcome::Error({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Outcome::Error.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Outcome`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Outcome { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Outcome::Complete(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Outcome::Incomplete(ref aa, ref ba) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - .saturating_add(::subxt::ext::codec::Encode::size_hint(ba)) - } - Outcome::Error(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Outcome::Complete(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Outcome::Incomplete(ref aa, ref ba) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ba, - __codec_dest_edqy, - ); - } - Outcome::Error(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Outcome {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Outcome { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Outcome; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Complete" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Outcome::Complete({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Incomplete" { - let fields = value.fields(); - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - return Ok( - Outcome::Incomplete( - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }, - { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(1usize))? - }, - ), - ); - } - if value.name() == "Error" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Outcome::Error({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Complete", - "Incomplete", - "Error", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Outcome { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Complete(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Complete", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Incomplete(_0, _1) => { - ::subxt::ext::scale_encode::Variant { - name: "Incomplete", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - None as Option<&'static str>, - _1 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Error(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Error", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Outcome { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Outcome::Complete(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Complete", - &__self_0, - ) - } - Outcome::Incomplete(__self_0, __self_1) => { - ::core::fmt::Formatter::debug_tuple_field2_finish( - f, - "Incomplete", - __self_0, - &__self_1, - ) - } - Outcome::Error(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Error", - &__self_0, - ) - } - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Instruction { - #[codec(index = 0)] - WithdrawAsset(runtime_types::xcm::v3::multiasset::MultiAssets), - #[codec(index = 1)] - ReserveAssetDeposited( - runtime_types::xcm::v3::multiasset::MultiAssets, - ), - #[codec(index = 2)] - ReceiveTeleportedAsset( - runtime_types::xcm::v3::multiasset::MultiAssets, - ), - #[codec(index = 3)] - QueryResponse { - #[codec(compact)] - query_id: ::core::primitive::u64, - response: runtime_types::xcm::v3::Response, - max_weight: runtime_types::sp_weights::weight_v2::Weight, - querier: ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - >, - }, - #[codec(index = 4)] - TransferAsset { - assets: runtime_types::xcm::v3::multiasset::MultiAssets, - beneficiary: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 5)] - TransferReserveAsset { - assets: runtime_types::xcm::v3::multiasset::MultiAssets, - dest: runtime_types::xcm::v3::multilocation::MultiLocation, - xcm: runtime_types::xcm::v3::Xcm, - }, - #[codec(index = 6)] - Transact { - origin_kind: runtime_types::xcm::v2::OriginKind, - require_weight_at_most: runtime_types::sp_weights::weight_v2::Weight, - call: runtime_types::xcm::double_encoded::DoubleEncoded, - }, - #[codec(index = 7)] - 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::v3::junctions::Junctions), - #[codec(index = 12)] - ReportError(runtime_types::xcm::v3::QueryResponseInfo), - #[codec(index = 13)] - DepositAsset { - assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - beneficiary: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 14)] - DepositReserveAsset { - assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - dest: runtime_types::xcm::v3::multilocation::MultiLocation, - xcm: runtime_types::xcm::v3::Xcm, - }, - #[codec(index = 15)] - ExchangeAsset { - give: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - want: runtime_types::xcm::v3::multiasset::MultiAssets, - maximal: ::core::primitive::bool, - }, - #[codec(index = 16)] - InitiateReserveWithdraw { - assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - reserve: runtime_types::xcm::v3::multilocation::MultiLocation, - xcm: runtime_types::xcm::v3::Xcm, - }, - #[codec(index = 17)] - InitiateTeleport { - assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - dest: runtime_types::xcm::v3::multilocation::MultiLocation, - xcm: runtime_types::xcm::v3::Xcm, - }, - #[codec(index = 18)] - ReportHolding { - response_info: runtime_types::xcm::v3::QueryResponseInfo, - assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - }, - #[codec(index = 19)] - BuyExecution { - fees: runtime_types::xcm::v3::multiasset::MultiAsset, - weight_limit: runtime_types::xcm::v3::WeightLimit, - }, - #[codec(index = 20)] - RefundSurplus, - #[codec(index = 21)] - SetErrorHandler(runtime_types::xcm::v3::Xcm), - #[codec(index = 22)] - SetAppendix(runtime_types::xcm::v3::Xcm), - #[codec(index = 23)] - ClearError, - #[codec(index = 24)] - ClaimAsset { - assets: runtime_types::xcm::v3::multiasset::MultiAssets, - ticket: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 25)] - Trap(#[codec(compact)] ::core::primitive::u64), - #[codec(index = 26)] - SubscribeVersion { - #[codec(compact)] - query_id: ::core::primitive::u64, - max_response_weight: runtime_types::sp_weights::weight_v2::Weight, - }, - #[codec(index = 27)] - UnsubscribeVersion, - #[codec(index = 28)] - BurnAsset(runtime_types::xcm::v3::multiasset::MultiAssets), - #[codec(index = 29)] - ExpectAsset(runtime_types::xcm::v3::multiasset::MultiAssets), - #[codec(index = 30)] - ExpectOrigin( - ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - >, - ), - #[codec(index = 31)] - ExpectError( - ::core::option::Option< - ( - ::core::primitive::u32, - runtime_types::xcm::v3::traits::Error, - ), - >, - ), - #[codec(index = 32)] - ExpectTransactStatus(runtime_types::xcm::v3::MaybeErrorCode), - #[codec(index = 33)] - QueryPallet { - module_name: ::std::vec::Vec<::core::primitive::u8>, - response_info: runtime_types::xcm::v3::QueryResponseInfo, - }, - #[codec(index = 34)] - ExpectPallet { - #[codec(compact)] - index: ::core::primitive::u32, - name: ::std::vec::Vec<::core::primitive::u8>, - module_name: ::std::vec::Vec<::core::primitive::u8>, - #[codec(compact)] - crate_major: ::core::primitive::u32, - #[codec(compact)] - min_crate_minor: ::core::primitive::u32, - }, - #[codec(index = 35)] - ReportTransactStatus(runtime_types::xcm::v3::QueryResponseInfo), - #[codec(index = 36)] - ClearTransactStatus, - #[codec(index = 37)] - UniversalOrigin(runtime_types::xcm::v3::junction::Junction), - #[codec(index = 38)] - ExportMessage { - network: runtime_types::xcm::v3::junction::NetworkId, - destination: runtime_types::xcm::v3::junctions::Junctions, - xcm: runtime_types::xcm::v3::Xcm, - }, - #[codec(index = 39)] - LockAsset { - asset: runtime_types::xcm::v3::multiasset::MultiAsset, - unlocker: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 40)] - UnlockAsset { - asset: runtime_types::xcm::v3::multiasset::MultiAsset, - target: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 41)] - NoteUnlockable { - asset: runtime_types::xcm::v3::multiasset::MultiAsset, - owner: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 42)] - RequestUnlock { - asset: runtime_types::xcm::v3::multiasset::MultiAsset, - locker: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 43)] - SetFeesMode { jit_withdraw: ::core::primitive::bool }, - #[codec(index = 44)] - SetTopic([::core::primitive::u8; 32usize]), - #[codec(index = 45)] - ClearTopic, - #[codec(index = 46)] - AliasOrigin( - runtime_types::xcm::v3::multilocation::MultiLocation, - ), - #[codec(index = 47)] - UnpaidExecution { - weight_limit: runtime_types::xcm::v3::WeightLimit, - check_origin: ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - >, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Instruction { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Instruction`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::WithdrawAsset({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::WithdrawAsset.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::ReserveAssetDeposited({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ReserveAssetDeposited.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::ReceiveTeleportedAsset({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ReceiveTeleportedAsset.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::QueryResponse { - query_id: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::QueryResponse::query_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - response: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::QueryResponse::response`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_weight: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::QueryResponse::max_weight`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - querier: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::QueryResponse::querier`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::TransferAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::TransferAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::TransferAsset::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::TransferReserveAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::TransferReserveAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - dest: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::TransferReserveAsset::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::TransferReserveAsset::xcm`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::Transact { - origin_kind: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::Transact::origin_kind`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - require_weight_at_most: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::Transact::require_weight_at_most`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::Transact::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::HrmpNewChannelOpenRequest { - sender: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::HrmpNewChannelOpenRequest::sender`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - max_message_size: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::HrmpNewChannelOpenRequest::max_message_size`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - max_capacity: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::HrmpNewChannelOpenRequest::max_capacity`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::HrmpChannelAccepted { - recipient: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::HrmpChannelAccepted::recipient`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::HrmpChannelClosing { - initiator: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::HrmpChannelClosing::initiator`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - sender: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::HrmpChannelClosing::sender`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - recipient: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::HrmpChannelClosing::recipient`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::ClearOrigin) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::DescendOrigin({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::DescendOrigin.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::ReportError({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::ReportError.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::DepositAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::DepositAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::DepositAsset::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::DepositReserveAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::DepositReserveAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - dest: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::DepositReserveAsset::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::DepositReserveAsset::xcm`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::ExchangeAsset { - give: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ExchangeAsset::give`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - want: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ExchangeAsset::want`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maximal: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ExchangeAsset::maximal`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::InitiateReserveWithdraw { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::InitiateReserveWithdraw::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - reserve: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::InitiateReserveWithdraw::reserve`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::InitiateReserveWithdraw::xcm`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::InitiateTeleport { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::InitiateTeleport::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - dest: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::InitiateTeleport::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::InitiateTeleport::xcm`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::ReportHolding { - response_info: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ReportHolding::response_info`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ReportHolding::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::BuyExecution { - fees: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Instruction::BuyExecution::fees`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - weight_limit: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::BuyExecution::weight_limit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::RefundSurplus) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::SetErrorHandler({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::SetErrorHandler.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 22u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::SetAppendix({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::SetAppendix.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 23u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::ClearError) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 24u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::ClaimAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Instruction::ClaimAsset::assets`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ticket: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Instruction::ClaimAsset::ticket`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 25u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::Trap({ - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::Trap.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 26u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::SubscribeVersion { - query_id: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::SubscribeVersion::query_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - max_response_weight: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::SubscribeVersion::max_response_weight`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 27u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::UnsubscribeVersion) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 28u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::BurnAsset({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::BurnAsset.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 29u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::ExpectAsset({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::ExpectAsset.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 30u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::ExpectOrigin({ - let __codec_res_edqy = <::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::ExpectOrigin.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 31u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::ExpectError({ - let __codec_res_edqy = <::core::option::Option< - ( - ::core::primitive::u32, - runtime_types::xcm::v3::traits::Error, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::ExpectError.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 32u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::ExpectTransactStatus({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ExpectTransactStatus.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 33u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::QueryPallet { - module_name: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::QueryPallet::module_name`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - response_info: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::QueryPallet::response_info`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 34u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::ExpectPallet { - index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ExpectPallet::index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - name: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Instruction::ExpectPallet::name`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - module_name: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ExpectPallet::module_name`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - crate_major: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ExpectPallet::crate_major`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - min_crate_minor: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ExpectPallet::min_crate_minor`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 35u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::ReportTransactStatus({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ReportTransactStatus.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 36u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::ClearTransactStatus) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 37u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::UniversalOrigin({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::UniversalOrigin.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 38u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::ExportMessage { - network: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ExportMessage::network`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - destination: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::ExportMessage::destination`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Instruction::ExportMessage::xcm`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 39u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::LockAsset { - asset: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::LockAsset::asset`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - unlocker: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::LockAsset::unlocker`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 40u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::UnlockAsset { - asset: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Instruction::UnlockAsset::asset`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - target: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::UnlockAsset::target`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 41u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::NoteUnlockable { - asset: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::NoteUnlockable::asset`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - owner: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::NoteUnlockable::owner`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 42u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::RequestUnlock { - asset: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::RequestUnlock::asset`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - locker: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::RequestUnlock::locker`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 43u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::SetFeesMode { - jit_withdraw: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::SetFeesMode::jit_withdraw`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 44u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::SetTopic({ - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::SetTopic.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 45u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::ClearTopic) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 46u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction::AliasOrigin({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction::AliasOrigin.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 47u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction::UnpaidExecution { - weight_limit: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::UnpaidExecution::weight_limit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - check_origin: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction::UnpaidExecution::check_origin`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Instruction`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Instruction { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Instruction::WithdrawAsset(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::ReserveAssetDeposited(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::ReceiveTeleportedAsset(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::QueryResponse { - ref query_id, - ref response, - ref max_weight, - ref querier, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(response), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(max_weight), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(querier), - ) - } - Instruction::TransferAsset { - ref assets, - ref beneficiary, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - } - Instruction::TransferReserveAsset { - ref assets, - ref dest, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction::Transact { - ref origin_kind, - ref require_weight_at_most, - ref call, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(origin_kind), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - require_weight_at_most, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call), - ) - } - Instruction::HrmpNewChannelOpenRequest { - ref sender, - ref max_message_size, - ref max_capacity, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(sender), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_message_size), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_capacity), - ), - ) - } - Instruction::HrmpChannelAccepted { ref recipient } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(recipient), - ), - ) - } - Instruction::HrmpChannelClosing { - ref initiator, - ref sender, - ref recipient, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(initiator), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(sender), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(recipient), - ), - ) - } - Instruction::ClearOrigin => 0_usize, - Instruction::DescendOrigin(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::ReportError(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::DepositAsset { - ref assets, - ref beneficiary, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - } - Instruction::DepositReserveAsset { - ref assets, - ref dest, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction::ExchangeAsset { - ref give, - ref want, - ref maximal, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(give), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(want), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maximal), - ) - } - Instruction::InitiateReserveWithdraw { - ref assets, - ref reserve, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(reserve), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction::InitiateTeleport { - ref assets, - ref dest, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction::ReportHolding { - ref response_info, - ref assets, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(response_info), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - } - Instruction::BuyExecution { ref fees, ref weight_limit } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(fees), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(weight_limit), - ) - } - Instruction::RefundSurplus => 0_usize, - Instruction::SetErrorHandler(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::SetAppendix(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::ClearError => 0_usize, - Instruction::ClaimAsset { ref assets, ref ticket } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(ticket), - ) - } - Instruction::Trap(ref aa) => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(aa), - ), - ) - } - Instruction::SubscribeVersion { - ref query_id, - ref max_response_weight, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(max_response_weight), - ) - } - Instruction::UnsubscribeVersion => 0_usize, - Instruction::BurnAsset(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::ExpectAsset(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::ExpectOrigin(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::ExpectError(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::ExpectTransactStatus(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::QueryPallet { - ref module_name, - ref response_info, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(module_name), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(response_info), - ) - } - Instruction::ExpectPallet { - ref index, - ref name, - ref module_name, - ref crate_major, - ref min_crate_minor, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(name), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(module_name), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(crate_major), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(min_crate_minor), - ), - ) - } - Instruction::ReportTransactStatus(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::ClearTransactStatus => 0_usize, - Instruction::UniversalOrigin(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::ExportMessage { - ref network, - ref destination, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(network), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(destination), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction::LockAsset { ref asset, ref unlocker } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(asset), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(unlocker), - ) - } - Instruction::UnlockAsset { ref asset, ref target } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(asset), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(target), - ) - } - Instruction::NoteUnlockable { ref asset, ref owner } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(asset), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(owner), - ) - } - Instruction::RequestUnlock { ref asset, ref locker } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(asset), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(locker), - ) - } - Instruction::SetFeesMode { ref jit_withdraw } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(jit_withdraw), - ) - } - Instruction::SetTopic(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::ClearTopic => 0_usize, - Instruction::AliasOrigin(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction::UnpaidExecution { - ref weight_limit, - ref check_origin, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(weight_limit), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(check_origin), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Instruction::WithdrawAsset(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::ReserveAssetDeposited(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::ReceiveTeleportedAsset(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::QueryResponse { - ref query_id, - ref response, - ref max_weight, - ref querier, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - response, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - max_weight, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - querier, - __codec_dest_edqy, - ); - } - Instruction::TransferAsset { - ref assets, - ref beneficiary, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - } - Instruction::TransferReserveAsset { - ref assets, - ref dest, - ref xcm, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction::Transact { - ref origin_kind, - ref require_weight_at_most, - ref call, - } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - origin_kind, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - require_weight_at_most, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call, - __codec_dest_edqy, - ); - } - Instruction::HrmpNewChannelOpenRequest { - ref sender, - ref max_message_size, - ref max_capacity, - } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(sender), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_message_size), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_capacity), - __codec_dest_edqy, - ); - } - } - Instruction::HrmpChannelAccepted { ref recipient } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(recipient), - __codec_dest_edqy, - ); - } - } - Instruction::HrmpChannelClosing { - ref initiator, - ref sender, - ref recipient, - } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(initiator), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(sender), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(recipient), - __codec_dest_edqy, - ); - } - } - Instruction::ClearOrigin => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Instruction::DescendOrigin(ref aa) => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::ReportError(ref aa) => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::DepositAsset { - ref assets, - ref beneficiary, - } => { - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - } - Instruction::DepositReserveAsset { - ref assets, - ref dest, - ref xcm, - } => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction::ExchangeAsset { - ref give, - ref want, - ref maximal, - } => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - give, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - want, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - maximal, - __codec_dest_edqy, - ); - } - Instruction::InitiateReserveWithdraw { - ref assets, - ref reserve, - ref xcm, - } => { - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - reserve, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction::InitiateTeleport { - ref assets, - ref dest, - ref xcm, - } => { - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction::ReportHolding { - ref response_info, - ref assets, - } => { - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - response_info, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - } - Instruction::BuyExecution { - ref fees, - ref weight_limit, - } => { - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - fees, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - weight_limit, - __codec_dest_edqy, - ); - } - Instruction::RefundSurplus => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - } - Instruction::SetErrorHandler(ref aa) => { - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::SetAppendix(ref aa) => { - __codec_dest_edqy.push_byte(22u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::ClearError => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(23u8 as ::core::primitive::u8); - } - Instruction::ClaimAsset { ref assets, ref ticket } => { - __codec_dest_edqy.push_byte(24u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ticket, - __codec_dest_edqy, - ); - } - Instruction::Trap(ref aa) => { - __codec_dest_edqy.push_byte(25u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(aa), - __codec_dest_edqy, - ); - } - } - Instruction::SubscribeVersion { - ref query_id, - ref max_response_weight, - } => { - __codec_dest_edqy.push_byte(26u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - max_response_weight, - __codec_dest_edqy, - ); - } - Instruction::UnsubscribeVersion => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(27u8 as ::core::primitive::u8); - } - Instruction::BurnAsset(ref aa) => { - __codec_dest_edqy.push_byte(28u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::ExpectAsset(ref aa) => { - __codec_dest_edqy.push_byte(29u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::ExpectOrigin(ref aa) => { - __codec_dest_edqy.push_byte(30u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::ExpectError(ref aa) => { - __codec_dest_edqy.push_byte(31u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::ExpectTransactStatus(ref aa) => { - __codec_dest_edqy.push_byte(32u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::QueryPallet { - ref module_name, - ref response_info, - } => { - __codec_dest_edqy.push_byte(33u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - module_name, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - response_info, - __codec_dest_edqy, - ); - } - Instruction::ExpectPallet { - ref index, - ref name, - ref module_name, - ref crate_major, - ref min_crate_minor, - } => { - __codec_dest_edqy.push_byte(34u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - name, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - module_name, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(crate_major), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(min_crate_minor), - __codec_dest_edqy, - ); - } - } - Instruction::ReportTransactStatus(ref aa) => { - __codec_dest_edqy.push_byte(35u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::ClearTransactStatus => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(36u8 as ::core::primitive::u8); - } - Instruction::UniversalOrigin(ref aa) => { - __codec_dest_edqy.push_byte(37u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::ExportMessage { - ref network, - ref destination, - ref xcm, - } => { - __codec_dest_edqy.push_byte(38u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - network, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - destination, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction::LockAsset { ref asset, ref unlocker } => { - __codec_dest_edqy.push_byte(39u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - asset, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - unlocker, - __codec_dest_edqy, - ); - } - Instruction::UnlockAsset { ref asset, ref target } => { - __codec_dest_edqy.push_byte(40u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - asset, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - target, - __codec_dest_edqy, - ); - } - Instruction::NoteUnlockable { ref asset, ref owner } => { - __codec_dest_edqy.push_byte(41u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - asset, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - owner, - __codec_dest_edqy, - ); - } - Instruction::RequestUnlock { ref asset, ref locker } => { - __codec_dest_edqy.push_byte(42u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - asset, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - locker, - __codec_dest_edqy, - ); - } - Instruction::SetFeesMode { ref jit_withdraw } => { - __codec_dest_edqy.push_byte(43u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - jit_withdraw, - __codec_dest_edqy, - ); - } - Instruction::SetTopic(ref aa) => { - __codec_dest_edqy.push_byte(44u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::ClearTopic => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(45u8 as ::core::primitive::u8); - } - Instruction::AliasOrigin(ref aa) => { - __codec_dest_edqy.push_byte(46u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction::UnpaidExecution { - ref weight_limit, - ref check_origin, - } => { - __codec_dest_edqy.push_byte(47u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - weight_limit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - check_origin, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Instruction {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Instruction { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Instruction; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "WithdrawAsset" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::WithdrawAsset({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ReserveAssetDeposited" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::ReserveAssetDeposited({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ReceiveTeleportedAsset" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::ReceiveTeleportedAsset({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "QueryResponse" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Instruction::QueryResponse { - query_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - response: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("response"))? - }, - max_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - querier: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("querier"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::QueryResponse { - query_id: { - let val = *vals - .get(&Some("query_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "query_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - response: { - let val = *vals - .get(&Some("response")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "response".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("response"))? - }, - max_weight: { - let val = *vals - .get(&Some("max_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_weight".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - querier: { - let val = *vals - .get(&Some("querier")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "querier".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("querier"))? - }, - }) - }; - } - if value.name() == "TransferAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction::TransferAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::TransferAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - }; - } - if value.name() == "TransferReserveAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::TransferReserveAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::TransferReserveAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "Transact" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::Transact { - origin_kind: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("origin_kind"))? - }, - require_weight_at_most: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("require_weight_at_most"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::Transact { - origin_kind: { - let val = *vals - .get(&Some("origin_kind")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "origin_kind".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("origin_kind"))? - }, - require_weight_at_most: { - let val = *vals - .get(&Some("require_weight_at_most")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "require_weight_at_most".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("require_weight_at_most"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - }; - } - if value.name() == "HrmpNewChannelOpenRequest" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::HrmpNewChannelOpenRequest { - sender: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - max_message_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_message_size"))? - }, - max_capacity: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_capacity"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::HrmpNewChannelOpenRequest { - sender: { - let val = *vals - .get(&Some("sender")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sender".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - max_message_size: { - let val = *vals - .get(&Some("max_message_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_message_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_message_size"))? - }, - max_capacity: { - let val = *vals - .get(&Some("max_capacity")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_capacity".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_capacity"))? - }, - }) - }; - } - if value.name() == "HrmpChannelAccepted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Instruction::HrmpChannelAccepted { - recipient: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::HrmpChannelAccepted { - recipient: { - let val = *vals - .get(&Some("recipient")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "recipient".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - }; - } - if value.name() == "HrmpChannelClosing" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::HrmpChannelClosing { - initiator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("initiator"))? - }, - sender: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - recipient: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::HrmpChannelClosing { - initiator: { - let val = *vals - .get(&Some("initiator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "initiator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("initiator"))? - }, - sender: { - let val = *vals - .get(&Some("sender")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sender".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - recipient: { - let val = *vals - .get(&Some("recipient")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "recipient".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - }; - } - if value.name() == "ClearOrigin" { - return Ok(Instruction::ClearOrigin); - } - if value.name() == "DescendOrigin" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::DescendOrigin({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ReportError" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::ReportError({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "DepositAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction::DepositAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::DepositAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - }; - } - if value.name() == "DepositReserveAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::DepositReserveAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::DepositReserveAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "ExchangeAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::ExchangeAsset { - give: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("give"))? - }, - want: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("want"))? - }, - maximal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("maximal"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::ExchangeAsset { - give: { - let val = *vals - .get(&Some("give")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "give".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("give"))? - }, - want: { - let val = *vals - .get(&Some("want")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "want".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("want"))? - }, - maximal: { - let val = *vals - .get(&Some("maximal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maximal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("maximal"))? - }, - }) - }; - } - if value.name() == "InitiateReserveWithdraw" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::InitiateReserveWithdraw { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - reserve: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reserve"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::InitiateReserveWithdraw { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - reserve: { - let val = *vals - .get(&Some("reserve")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reserve".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reserve"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "InitiateTeleport" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::InitiateTeleport { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::InitiateTeleport { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "ReportHolding" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction::ReportHolding { - response_info: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("response_info"))? - }, - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::ReportHolding { - response_info: { - let val = *vals - .get(&Some("response_info")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "response_info".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("response_info"))? - }, - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - }) - }; - } - if value.name() == "BuyExecution" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction::BuyExecution { - fees: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fees"))? - }, - weight_limit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::BuyExecution { - fees: { - let val = *vals - .get(&Some("fees")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fees".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fees"))? - }, - weight_limit: { - let val = *vals - .get(&Some("weight_limit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "weight_limit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - }; - } - if value.name() == "RefundSurplus" { - return Ok(Instruction::RefundSurplus); - } - if value.name() == "SetErrorHandler" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::SetErrorHandler({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "SetAppendix" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::SetAppendix({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ClearError" { - return Ok(Instruction::ClearError); - } - if value.name() == "ClaimAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction::ClaimAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - ticket: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ticket"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::ClaimAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - ticket: { - let val = *vals - .get(&Some("ticket")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ticket".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ticket"))? - }, - }) - }; - } - if value.name() == "Trap" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::Trap({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "SubscribeVersion" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction::SubscribeVersion { - query_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - max_response_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_response_weight"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::SubscribeVersion { - query_id: { - let val = *vals - .get(&Some("query_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "query_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - max_response_weight: { - let val = *vals - .get(&Some("max_response_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_response_weight".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_response_weight"))? - }, - }) - }; - } - if value.name() == "UnsubscribeVersion" { - return Ok(Instruction::UnsubscribeVersion); - } - if value.name() == "BurnAsset" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::BurnAsset({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ExpectAsset" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::ExpectAsset({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ExpectOrigin" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::ExpectOrigin({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ExpectError" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::ExpectError({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ExpectTransactStatus" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::ExpectTransactStatus({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "QueryPallet" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction::QueryPallet { - module_name: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("module_name"))? - }, - response_info: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("response_info"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::QueryPallet { - module_name: { - let val = *vals - .get(&Some("module_name")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "module_name".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("module_name"))? - }, - response_info: { - let val = *vals - .get(&Some("response_info")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "response_info".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("response_info"))? - }, - }) - }; - } - if value.name() == "ExpectPallet" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Instruction::ExpectPallet { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - name: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("name"))? - }, - module_name: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("module_name"))? - }, - crate_major: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("crate_major"))? - }, - min_crate_minor: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("min_crate_minor"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::ExpectPallet { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - name: { - let val = *vals - .get(&Some("name")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "name".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("name"))? - }, - module_name: { - let val = *vals - .get(&Some("module_name")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "module_name".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("module_name"))? - }, - crate_major: { - let val = *vals - .get(&Some("crate_major")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "crate_major".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("crate_major"))? - }, - min_crate_minor: { - let val = *vals - .get(&Some("min_crate_minor")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "min_crate_minor".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("min_crate_minor"))? - }, - }) - }; - } - if value.name() == "ReportTransactStatus" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::ReportTransactStatus({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ClearTransactStatus" { - return Ok(Instruction::ClearTransactStatus); - } - if value.name() == "UniversalOrigin" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::UniversalOrigin({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ExportMessage" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction::ExportMessage { - network: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("network"))? - }, - destination: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("destination"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::ExportMessage { - network: { - let val = *vals - .get(&Some("network")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "network".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("network"))? - }, - destination: { - let val = *vals - .get(&Some("destination")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "destination".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("destination"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "LockAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction::LockAsset { - asset: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("asset"))? - }, - unlocker: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("unlocker"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::LockAsset { - asset: { - let val = *vals - .get(&Some("asset")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "asset".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("asset"))? - }, - unlocker: { - let val = *vals - .get(&Some("unlocker")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "unlocker".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("unlocker"))? - }, - }) - }; - } - if value.name() == "UnlockAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction::UnlockAsset { - asset: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("asset"))? - }, - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::UnlockAsset { - asset: { - let val = *vals - .get(&Some("asset")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "asset".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("asset"))? - }, - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - }; - } - if value.name() == "NoteUnlockable" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction::NoteUnlockable { - asset: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("asset"))? - }, - owner: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::NoteUnlockable { - asset: { - let val = *vals - .get(&Some("asset")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "asset".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("asset"))? - }, - owner: { - let val = *vals - .get(&Some("owner")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "owner".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - }) - }; - } - if value.name() == "RequestUnlock" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction::RequestUnlock { - asset: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("asset"))? - }, - locker: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("locker"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::RequestUnlock { - asset: { - let val = *vals - .get(&Some("asset")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "asset".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("asset"))? - }, - locker: { - let val = *vals - .get(&Some("locker")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "locker".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("locker"))? - }, - }) - }; - } - if value.name() == "SetFeesMode" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Instruction::SetFeesMode { - jit_withdraw: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("jit_withdraw"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::SetFeesMode { - jit_withdraw: { - let val = *vals - .get(&Some("jit_withdraw")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "jit_withdraw".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("jit_withdraw"))? - }, - }) - }; - } - if value.name() == "SetTopic" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::SetTopic({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ClearTopic" { - return Ok(Instruction::ClearTopic); - } - if value.name() == "AliasOrigin" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction::AliasOrigin({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "UnpaidExecution" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction::UnpaidExecution { - weight_limit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - check_origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("check_origin"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction::UnpaidExecution { - weight_limit: { - let val = *vals - .get(&Some("weight_limit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "weight_limit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - check_origin: { - let val = *vals - .get(&Some("check_origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "check_origin".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("check_origin"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "WithdrawAsset", - "ReserveAssetDeposited", - "ReceiveTeleportedAsset", - "QueryResponse", - "TransferAsset", - "TransferReserveAsset", - "Transact", - "HrmpNewChannelOpenRequest", - "HrmpChannelAccepted", - "HrmpChannelClosing", - "ClearOrigin", - "DescendOrigin", - "ReportError", - "DepositAsset", - "DepositReserveAsset", - "ExchangeAsset", - "InitiateReserveWithdraw", - "InitiateTeleport", - "ReportHolding", - "BuyExecution", - "RefundSurplus", - "SetErrorHandler", - "SetAppendix", - "ClearError", - "ClaimAsset", - "Trap", - "SubscribeVersion", - "UnsubscribeVersion", - "BurnAsset", - "ExpectAsset", - "ExpectOrigin", - "ExpectError", - "ExpectTransactStatus", - "QueryPallet", - "ExpectPallet", - "ReportTransactStatus", - "ClearTransactStatus", - "UniversalOrigin", - "ExportMessage", - "LockAsset", - "UnlockAsset", - "NoteUnlockable", - "RequestUnlock", - "SetFeesMode", - "SetTopic", - "ClearTopic", - "AliasOrigin", - "UnpaidExecution", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Instruction { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::WithdrawAsset(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "WithdrawAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReserveAssetDeposited(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ReserveAssetDeposited", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReceiveTeleportedAsset(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ReceiveTeleportedAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::QueryResponse { - query_id, - response, - max_weight, - querier, - } => { - ::subxt::ext::scale_encode::Variant { - name: "QueryResponse", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("query_id"), - query_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("response"), - response as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_weight"), - max_weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("querier"), - querier as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TransferAsset { assets, beneficiary } => { - ::subxt::ext::scale_encode::Variant { - name: "TransferAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TransferReserveAsset { assets, dest, xcm } => { - ::subxt::ext::scale_encode::Variant { - name: "TransferReserveAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Transact { - origin_kind, - require_weight_at_most, - call, - } => { - ::subxt::ext::scale_encode::Variant { - name: "Transact", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("origin_kind"), - origin_kind as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("require_weight_at_most"), - require_weight_at_most - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HrmpNewChannelOpenRequest { - sender, - max_message_size, - max_capacity, - } => { - ::subxt::ext::scale_encode::Variant { - name: "HrmpNewChannelOpenRequest", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_message_size"), - max_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_capacity"), - max_capacity - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HrmpChannelAccepted { recipient } => { - ::subxt::ext::scale_encode::Variant { - name: "HrmpChannelAccepted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HrmpChannelClosing { - initiator, - sender, - recipient, - } => { - ::subxt::ext::scale_encode::Variant { - name: "HrmpChannelClosing", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("initiator"), - initiator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ClearOrigin => { - ::subxt::ext::scale_encode::Variant { - name: "ClearOrigin", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DescendOrigin(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "DescendOrigin", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReportError(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ReportError", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DepositAsset { assets, beneficiary } => { - ::subxt::ext::scale_encode::Variant { - name: "DepositAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DepositReserveAsset { assets, dest, xcm } => { - ::subxt::ext::scale_encode::Variant { - name: "DepositReserveAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExchangeAsset { give, want, maximal } => { - ::subxt::ext::scale_encode::Variant { - name: "ExchangeAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("give"), - give as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("want"), - want as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maximal"), - maximal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InitiateReserveWithdraw { assets, reserve, xcm } => { - ::subxt::ext::scale_encode::Variant { - name: "InitiateReserveWithdraw", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("reserve"), - reserve as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InitiateTeleport { assets, dest, xcm } => { - ::subxt::ext::scale_encode::Variant { - name: "InitiateTeleport", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReportHolding { response_info, assets } => { - ::subxt::ext::scale_encode::Variant { - name: "ReportHolding", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("response_info"), - response_info - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BuyExecution { fees, weight_limit } => { - ::subxt::ext::scale_encode::Variant { - name: "BuyExecution", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("fees"), - fees as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight_limit"), - weight_limit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::RefundSurplus => { - ::subxt::ext::scale_encode::Variant { - name: "RefundSurplus", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SetErrorHandler(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "SetErrorHandler", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SetAppendix(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "SetAppendix", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ClearError => { - ::subxt::ext::scale_encode::Variant { - name: "ClearError", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ClaimAsset { assets, ticket } => { - ::subxt::ext::scale_encode::Variant { - name: "ClaimAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ticket"), - ticket as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Trap(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Trap", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SubscribeVersion { query_id, max_response_weight } => { - ::subxt::ext::scale_encode::Variant { - name: "SubscribeVersion", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("query_id"), - query_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_response_weight"), - max_response_weight - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnsubscribeVersion => { - ::subxt::ext::scale_encode::Variant { - name: "UnsubscribeVersion", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BurnAsset(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "BurnAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExpectAsset(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ExpectAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExpectOrigin(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ExpectOrigin", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExpectError(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ExpectError", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExpectTransactStatus(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ExpectTransactStatus", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::QueryPallet { module_name, response_info } => { - ::subxt::ext::scale_encode::Variant { - name: "QueryPallet", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("module_name"), - module_name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("response_info"), - response_info - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExpectPallet { - index, - name, - module_name, - crate_major, - min_crate_minor, - } => { - ::subxt::ext::scale_encode::Variant { - name: "ExpectPallet", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("name"), - name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("module_name"), - module_name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("crate_major"), - crate_major as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_crate_minor"), - min_crate_minor - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReportTransactStatus(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ReportTransactStatus", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ClearTransactStatus => { - ::subxt::ext::scale_encode::Variant { - name: "ClearTransactStatus", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UniversalOrigin(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "UniversalOrigin", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExportMessage { network, destination, xcm } => { - ::subxt::ext::scale_encode::Variant { - name: "ExportMessage", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("network"), - network as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("destination"), - destination as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LockAsset { asset, unlocker } => { - ::subxt::ext::scale_encode::Variant { - name: "LockAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("asset"), - asset as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("unlocker"), - unlocker as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnlockAsset { asset, target } => { - ::subxt::ext::scale_encode::Variant { - name: "UnlockAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("asset"), - asset as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoteUnlockable { asset, owner } => { - ::subxt::ext::scale_encode::Variant { - name: "NoteUnlockable", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("asset"), - asset as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("owner"), - owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::RequestUnlock { asset, locker } => { - ::subxt::ext::scale_encode::Variant { - name: "RequestUnlock", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("asset"), - asset as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("locker"), - locker as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SetFeesMode { jit_withdraw } => { - ::subxt::ext::scale_encode::Variant { - name: "SetFeesMode", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("jit_withdraw"), - jit_withdraw - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SetTopic(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "SetTopic", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ClearTopic => { - ::subxt::ext::scale_encode::Variant { - name: "ClearTopic", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AliasOrigin(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "AliasOrigin", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnpaidExecution { weight_limit, check_origin } => { - ::subxt::ext::scale_encode::Variant { - name: "UnpaidExecution", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("weight_limit"), - weight_limit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("check_origin"), - check_origin - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Instruction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Instruction::WithdrawAsset(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "WithdrawAsset", - &__self_0, - ) - } - Instruction::ReserveAssetDeposited(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ReserveAssetDeposited", - &__self_0, - ) - } - Instruction::ReceiveTeleportedAsset(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ReceiveTeleportedAsset", - &__self_0, - ) - } - Instruction::QueryResponse { - query_id: __self_0, - response: __self_1, - max_weight: __self_2, - querier: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "QueryResponse", - "query_id", - __self_0, - "response", - __self_1, - "max_weight", - __self_2, - "querier", - &__self_3, - ) - } - Instruction::TransferAsset { - assets: __self_0, - beneficiary: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "TransferAsset", - "assets", - __self_0, - "beneficiary", - &__self_1, - ) - } - Instruction::TransferReserveAsset { - assets: __self_0, - dest: __self_1, - xcm: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "TransferReserveAsset", - "assets", - __self_0, - "dest", - __self_1, - "xcm", - &__self_2, - ) - } - Instruction::Transact { - origin_kind: __self_0, - require_weight_at_most: __self_1, - call: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Transact", - "origin_kind", - __self_0, - "require_weight_at_most", - __self_1, - "call", - &__self_2, - ) - } - Instruction::HrmpNewChannelOpenRequest { - sender: __self_0, - max_message_size: __self_1, - max_capacity: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "HrmpNewChannelOpenRequest", - "sender", - __self_0, - "max_message_size", - __self_1, - "max_capacity", - &__self_2, - ) - } - Instruction::HrmpChannelAccepted { recipient: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "HrmpChannelAccepted", - "recipient", - &__self_0, - ) - } - Instruction::HrmpChannelClosing { - initiator: __self_0, - sender: __self_1, - recipient: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "HrmpChannelClosing", - "initiator", - __self_0, - "sender", - __self_1, - "recipient", - &__self_2, - ) - } - Instruction::ClearOrigin => { - ::core::fmt::Formatter::write_str(f, "ClearOrigin") - } - Instruction::DescendOrigin(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "DescendOrigin", - &__self_0, - ) - } - Instruction::ReportError(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ReportError", - &__self_0, - ) - } - Instruction::DepositAsset { - assets: __self_0, - beneficiary: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "DepositAsset", - "assets", - __self_0, - "beneficiary", - &__self_1, - ) - } - Instruction::DepositReserveAsset { - assets: __self_0, - dest: __self_1, - xcm: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "DepositReserveAsset", - "assets", - __self_0, - "dest", - __self_1, - "xcm", - &__self_2, - ) - } - Instruction::ExchangeAsset { - give: __self_0, - want: __self_1, - maximal: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ExchangeAsset", - "give", - __self_0, - "want", - __self_1, - "maximal", - &__self_2, - ) - } - Instruction::InitiateReserveWithdraw { - assets: __self_0, - reserve: __self_1, - xcm: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "InitiateReserveWithdraw", - "assets", - __self_0, - "reserve", - __self_1, - "xcm", - &__self_2, - ) - } - Instruction::InitiateTeleport { - assets: __self_0, - dest: __self_1, - xcm: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "InitiateTeleport", - "assets", - __self_0, - "dest", - __self_1, - "xcm", - &__self_2, - ) - } - Instruction::ReportHolding { - response_info: __self_0, - assets: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ReportHolding", - "response_info", - __self_0, - "assets", - &__self_1, - ) - } - Instruction::BuyExecution { - fees: __self_0, - weight_limit: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "BuyExecution", - "fees", - __self_0, - "weight_limit", - &__self_1, - ) - } - Instruction::RefundSurplus => { - ::core::fmt::Formatter::write_str(f, "RefundSurplus") - } - Instruction::SetErrorHandler(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "SetErrorHandler", - &__self_0, - ) - } - Instruction::SetAppendix(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "SetAppendix", - &__self_0, - ) - } - Instruction::ClearError => { - ::core::fmt::Formatter::write_str(f, "ClearError") - } - Instruction::ClaimAsset { - assets: __self_0, - ticket: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ClaimAsset", - "assets", - __self_0, - "ticket", - &__self_1, - ) - } - Instruction::Trap(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Trap", - &__self_0, - ) - } - Instruction::SubscribeVersion { - query_id: __self_0, - max_response_weight: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SubscribeVersion", - "query_id", - __self_0, - "max_response_weight", - &__self_1, - ) - } - Instruction::UnsubscribeVersion => { - ::core::fmt::Formatter::write_str(f, "UnsubscribeVersion") - } - Instruction::BurnAsset(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "BurnAsset", - &__self_0, - ) - } - Instruction::ExpectAsset(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ExpectAsset", - &__self_0, - ) - } - Instruction::ExpectOrigin(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ExpectOrigin", - &__self_0, - ) - } - Instruction::ExpectError(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ExpectError", - &__self_0, - ) - } - Instruction::ExpectTransactStatus(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ExpectTransactStatus", - &__self_0, - ) - } - Instruction::QueryPallet { - module_name: __self_0, - response_info: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "QueryPallet", - "module_name", - __self_0, - "response_info", - &__self_1, - ) - } - Instruction::ExpectPallet { - index: __self_0, - name: __self_1, - module_name: __self_2, - crate_major: __self_3, - min_crate_minor: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "ExpectPallet", - "index", - __self_0, - "name", - __self_1, - "module_name", - __self_2, - "crate_major", - __self_3, - "min_crate_minor", - &__self_4, - ) - } - Instruction::ReportTransactStatus(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ReportTransactStatus", - &__self_0, - ) - } - Instruction::ClearTransactStatus => { - ::core::fmt::Formatter::write_str(f, "ClearTransactStatus") - } - Instruction::UniversalOrigin(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "UniversalOrigin", - &__self_0, - ) - } - Instruction::ExportMessage { - network: __self_0, - destination: __self_1, - xcm: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ExportMessage", - "network", - __self_0, - "destination", - __self_1, - "xcm", - &__self_2, - ) - } - Instruction::LockAsset { - asset: __self_0, - unlocker: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "LockAsset", - "asset", - __self_0, - "unlocker", - &__self_1, - ) - } - Instruction::UnlockAsset { - asset: __self_0, - target: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "UnlockAsset", - "asset", - __self_0, - "target", - &__self_1, - ) - } - Instruction::NoteUnlockable { - asset: __self_0, - owner: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "NoteUnlockable", - "asset", - __self_0, - "owner", - &__self_1, - ) - } - Instruction::RequestUnlock { - asset: __self_0, - locker: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "RequestUnlock", - "asset", - __self_0, - "locker", - &__self_1, - ) - } - Instruction::SetFeesMode { jit_withdraw: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetFeesMode", - "jit_withdraw", - &__self_0, - ) - } - Instruction::SetTopic(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "SetTopic", - &__self_0, - ) - } - Instruction::ClearTopic => { - ::core::fmt::Formatter::write_str(f, "ClearTopic") - } - Instruction::AliasOrigin(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "AliasOrigin", - &__self_0, - ) - } - Instruction::UnpaidExecution { - weight_limit: __self_0, - check_origin: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "UnpaidExecution", - "weight_limit", - __self_0, - "check_origin", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Instruction2 { - #[codec(index = 0)] - WithdrawAsset(runtime_types::xcm::v3::multiasset::MultiAssets), - #[codec(index = 1)] - ReserveAssetDeposited( - runtime_types::xcm::v3::multiasset::MultiAssets, - ), - #[codec(index = 2)] - ReceiveTeleportedAsset( - runtime_types::xcm::v3::multiasset::MultiAssets, - ), - #[codec(index = 3)] - QueryResponse { - #[codec(compact)] - query_id: ::core::primitive::u64, - response: runtime_types::xcm::v3::Response, - max_weight: runtime_types::sp_weights::weight_v2::Weight, - querier: ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - >, - }, - #[codec(index = 4)] - TransferAsset { - assets: runtime_types::xcm::v3::multiasset::MultiAssets, - beneficiary: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 5)] - TransferReserveAsset { - assets: runtime_types::xcm::v3::multiasset::MultiAssets, - dest: runtime_types::xcm::v3::multilocation::MultiLocation, - xcm: runtime_types::xcm::v3::Xcm, - }, - #[codec(index = 6)] - Transact { - origin_kind: runtime_types::xcm::v2::OriginKind, - require_weight_at_most: runtime_types::sp_weights::weight_v2::Weight, - call: runtime_types::xcm::double_encoded::DoubleEncoded2, - }, - #[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::v3::junctions::Junctions), - #[codec(index = 12)] - ReportError(runtime_types::xcm::v3::QueryResponseInfo), - #[codec(index = 13)] - DepositAsset { - assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - beneficiary: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 14)] - DepositReserveAsset { - assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - dest: runtime_types::xcm::v3::multilocation::MultiLocation, - xcm: runtime_types::xcm::v3::Xcm, - }, - #[codec(index = 15)] - ExchangeAsset { - give: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - want: runtime_types::xcm::v3::multiasset::MultiAssets, - maximal: ::core::primitive::bool, - }, - #[codec(index = 16)] - InitiateReserveWithdraw { - assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - reserve: runtime_types::xcm::v3::multilocation::MultiLocation, - xcm: runtime_types::xcm::v3::Xcm, - }, - #[codec(index = 17)] - InitiateTeleport { - assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - dest: runtime_types::xcm::v3::multilocation::MultiLocation, - xcm: runtime_types::xcm::v3::Xcm, - }, - #[codec(index = 18)] - ReportHolding { - response_info: runtime_types::xcm::v3::QueryResponseInfo, - assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - }, - #[codec(index = 19)] - BuyExecution { - fees: runtime_types::xcm::v3::multiasset::MultiAsset, - weight_limit: runtime_types::xcm::v3::WeightLimit, - }, - #[codec(index = 20)] - RefundSurplus, - #[codec(index = 21)] - SetErrorHandler(runtime_types::xcm::v3::Xcm2), - #[codec(index = 22)] - SetAppendix(runtime_types::xcm::v3::Xcm2), - #[codec(index = 23)] - ClearError, - #[codec(index = 24)] - ClaimAsset { - assets: runtime_types::xcm::v3::multiasset::MultiAssets, - ticket: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 25)] - Trap(#[codec(compact)] ::core::primitive::u64), - #[codec(index = 26)] - SubscribeVersion { - #[codec(compact)] - query_id: ::core::primitive::u64, - max_response_weight: runtime_types::sp_weights::weight_v2::Weight, - }, - #[codec(index = 27)] - UnsubscribeVersion, - #[codec(index = 28)] - BurnAsset(runtime_types::xcm::v3::multiasset::MultiAssets), - #[codec(index = 29)] - ExpectAsset(runtime_types::xcm::v3::multiasset::MultiAssets), - #[codec(index = 30)] - ExpectOrigin( - ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - >, - ), - #[codec(index = 31)] - ExpectError( - ::core::option::Option< - ( - ::core::primitive::u32, - runtime_types::xcm::v3::traits::Error, - ), - >, - ), - #[codec(index = 32)] - ExpectTransactStatus(runtime_types::xcm::v3::MaybeErrorCode), - #[codec(index = 33)] - QueryPallet { - module_name: ::std::vec::Vec<::core::primitive::u8>, - response_info: runtime_types::xcm::v3::QueryResponseInfo, - }, - #[codec(index = 34)] - ExpectPallet { - #[codec(compact)] - index: ::core::primitive::u32, - name: ::std::vec::Vec<::core::primitive::u8>, - module_name: ::std::vec::Vec<::core::primitive::u8>, - #[codec(compact)] - crate_major: ::core::primitive::u32, - #[codec(compact)] - min_crate_minor: ::core::primitive::u32, - }, - #[codec(index = 35)] - ReportTransactStatus(runtime_types::xcm::v3::QueryResponseInfo), - #[codec(index = 36)] - ClearTransactStatus, - #[codec(index = 37)] - UniversalOrigin(runtime_types::xcm::v3::junction::Junction), - #[codec(index = 38)] - ExportMessage { - network: runtime_types::xcm::v3::junction::NetworkId, - destination: runtime_types::xcm::v3::junctions::Junctions, - xcm: runtime_types::xcm::v3::Xcm, - }, - #[codec(index = 39)] - LockAsset { - asset: runtime_types::xcm::v3::multiasset::MultiAsset, - unlocker: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 40)] - UnlockAsset { - asset: runtime_types::xcm::v3::multiasset::MultiAsset, - target: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 41)] - NoteUnlockable { - asset: runtime_types::xcm::v3::multiasset::MultiAsset, - owner: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 42)] - RequestUnlock { - asset: runtime_types::xcm::v3::multiasset::MultiAsset, - locker: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 43)] - SetFeesMode { jit_withdraw: ::core::primitive::bool }, - #[codec(index = 44)] - SetTopic([::core::primitive::u8; 32usize]), - #[codec(index = 45)] - ClearTopic, - #[codec(index = 46)] - AliasOrigin( - runtime_types::xcm::v3::multilocation::MultiLocation, - ), - #[codec(index = 47)] - UnpaidExecution { - weight_limit: runtime_types::xcm::v3::WeightLimit, - check_origin: ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - >, - }, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Instruction2 { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Instruction2`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::WithdrawAsset({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::WithdrawAsset.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::ReserveAssetDeposited({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ReserveAssetDeposited.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::ReceiveTeleportedAsset({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ReceiveTeleportedAsset.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::QueryResponse { - query_id: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::QueryResponse::query_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - response: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::QueryResponse::response`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - max_weight: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::QueryResponse::max_weight`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - querier: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::QueryResponse::querier`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::TransferAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::TransferAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::TransferAsset::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::TransferReserveAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::TransferReserveAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - dest: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::TransferReserveAsset::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::TransferReserveAsset::xcm`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 6u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::Transact { - origin_kind: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::Transact::origin_kind`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - require_weight_at_most: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::Transact::require_weight_at_most`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - call: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::Transact::call`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 7u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::HrmpNewChannelOpenRequest { - sender: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::HrmpNewChannelOpenRequest::sender`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - max_message_size: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::HrmpNewChannelOpenRequest::max_message_size`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - max_capacity: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::HrmpNewChannelOpenRequest::max_capacity`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 8u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::HrmpChannelAccepted { - recipient: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::HrmpChannelAccepted::recipient`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 9u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::HrmpChannelClosing { - initiator: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::HrmpChannelClosing::initiator`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - sender: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::HrmpChannelClosing::sender`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - recipient: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::HrmpChannelClosing::recipient`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 10u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::ClearOrigin) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 11u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::DescendOrigin({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::DescendOrigin.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 12u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::ReportError({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::ReportError.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 13u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::DepositAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::DepositAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - beneficiary: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::DepositAsset::beneficiary`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 14u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::DepositReserveAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::DepositReserveAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - dest: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::DepositReserveAsset::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::DepositReserveAsset::xcm`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 15u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::ExchangeAsset { - give: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ExchangeAsset::give`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - want: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ExchangeAsset::want`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - maximal: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ExchangeAsset::maximal`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 16u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::InitiateReserveWithdraw { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::InitiateReserveWithdraw::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - reserve: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::InitiateReserveWithdraw::reserve`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::InitiateReserveWithdraw::xcm`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 17u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::InitiateTeleport { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::InitiateTeleport::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - dest: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::InitiateTeleport::dest`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::InitiateTeleport::xcm`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 18u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::ReportHolding { - response_info: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ReportHolding::response_info`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ReportHolding::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 19u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::BuyExecution { - fees: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::BuyExecution::fees`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - weight_limit: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::BuyExecution::weight_limit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 20u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::RefundSurplus) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 21u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::SetErrorHandler({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Instruction2::SetErrorHandler.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 22u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::SetAppendix({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::SetAppendix.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 23u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::ClearError) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 24u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::ClaimAsset { - assets: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ClaimAsset::assets`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - ticket: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ClaimAsset::ticket`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 25u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::Trap({ - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::Trap.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 26u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::SubscribeVersion { - query_id: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::SubscribeVersion::query_id`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - max_response_weight: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::SubscribeVersion::max_response_weight`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 27u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::UnsubscribeVersion) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 28u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::BurnAsset({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::BurnAsset.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 29u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::ExpectAsset({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::ExpectAsset.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 30u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::ExpectOrigin({ - let __codec_res_edqy = <::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::ExpectOrigin.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 31u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::ExpectError({ - let __codec_res_edqy = <::core::option::Option< - ( - ::core::primitive::u32, - runtime_types::xcm::v3::traits::Error, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::ExpectError.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 32u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::ExpectTransactStatus({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ExpectTransactStatus.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 33u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::QueryPallet { - module_name: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::QueryPallet::module_name`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - response_info: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::QueryPallet::response_info`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 34u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::ExpectPallet { - index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ExpectPallet::index`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - name: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ExpectPallet::name`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - module_name: { - let __codec_res_edqy = <::std::vec::Vec< - ::core::primitive::u8, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ExpectPallet::module_name`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - crate_major: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ExpectPallet::crate_major`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - min_crate_minor: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ExpectPallet::min_crate_minor`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 35u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::ReportTransactStatus({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ReportTransactStatus.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 36u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::ClearTransactStatus, - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 37u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::UniversalOrigin({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain("Could not decode `Instruction2::UniversalOrigin.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 38u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::ExportMessage { - network: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ExportMessage::network`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - destination: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ExportMessage::destination`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - xcm: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::ExportMessage::xcm`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 39u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::LockAsset { - asset: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::LockAsset::asset`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - unlocker: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::LockAsset::unlocker`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 40u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::UnlockAsset { - asset: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::UnlockAsset::asset`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - target: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::UnlockAsset::target`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 41u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::NoteUnlockable { - asset: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::NoteUnlockable::asset`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - owner: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::NoteUnlockable::owner`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 42u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::RequestUnlock { - asset: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::RequestUnlock::asset`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - locker: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::RequestUnlock::locker`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 43u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::SetFeesMode { - jit_withdraw: { - let __codec_res_edqy = <::core::primitive::bool as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::SetFeesMode::jit_withdraw`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 44u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::SetTopic({ - let __codec_res_edqy = <[::core::primitive::u8; 32usize] as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::SetTopic.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 45u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::ClearTopic) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 46u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Instruction2::AliasOrigin({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Instruction2::AliasOrigin.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 47u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Instruction2::UnpaidExecution { - weight_limit: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::UnpaidExecution::weight_limit`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - check_origin: { - let __codec_res_edqy = <::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `Instruction2::UnpaidExecution::check_origin`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Instruction2`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Instruction2 { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Instruction2::WithdrawAsset(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::ReserveAssetDeposited(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::ReceiveTeleportedAsset(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::QueryResponse { - ref query_id, - ref response, - ref max_weight, - ref querier, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(response), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(max_weight), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(querier), - ) - } - Instruction2::TransferAsset { - ref assets, - ref beneficiary, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - } - Instruction2::TransferReserveAsset { - ref assets, - ref dest, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction2::Transact { - ref origin_kind, - ref require_weight_at_most, - ref call, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(origin_kind), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - require_weight_at_most, - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(call), - ) - } - Instruction2::HrmpNewChannelOpenRequest { - ref sender, - ref max_message_size, - ref max_capacity, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(sender), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_message_size), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_capacity), - ), - ) - } - Instruction2::HrmpChannelAccepted { ref recipient } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(recipient), - ), - ) - } - Instruction2::HrmpChannelClosing { - ref initiator, - ref sender, - ref recipient, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(initiator), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(sender), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(recipient), - ), - ) - } - Instruction2::ClearOrigin => 0_usize, - Instruction2::DescendOrigin(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::ReportError(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::DepositAsset { - ref assets, - ref beneficiary, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(beneficiary), - ) - } - Instruction2::DepositReserveAsset { - ref assets, - ref dest, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction2::ExchangeAsset { - ref give, - ref want, - ref maximal, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(give), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(want), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(maximal), - ) - } - Instruction2::InitiateReserveWithdraw { - ref assets, - ref reserve, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(reserve), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction2::InitiateTeleport { - ref assets, - ref dest, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(dest), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction2::ReportHolding { - ref response_info, - ref assets, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(response_info), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - } - Instruction2::BuyExecution { - ref fees, - ref weight_limit, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(fees), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(weight_limit), - ) - } - Instruction2::RefundSurplus => 0_usize, - Instruction2::SetErrorHandler(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::SetAppendix(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::ClearError => 0_usize, - Instruction2::ClaimAsset { ref assets, ref ticket } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(assets), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(ticket), - ) - } - Instruction2::Trap(ref aa) => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(aa), - ), - ) - } - Instruction2::SubscribeVersion { - ref query_id, - ref max_response_weight, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(max_response_weight), - ) - } - Instruction2::UnsubscribeVersion => 0_usize, - Instruction2::BurnAsset(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::ExpectAsset(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::ExpectOrigin(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::ExpectError(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::ExpectTransactStatus(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::QueryPallet { - ref module_name, - ref response_info, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(module_name), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(response_info), - ) - } - Instruction2::ExpectPallet { - ref index, - ref name, - ref module_name, - ref crate_major, - ref min_crate_minor, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(name), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(module_name), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(crate_major), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(min_crate_minor), - ), - ) - } - Instruction2::ReportTransactStatus(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::ClearTransactStatus => 0_usize, - Instruction2::UniversalOrigin(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::ExportMessage { - ref network, - ref destination, - ref xcm, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(network), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(destination), - ) - .saturating_add(::subxt::ext::codec::Encode::size_hint(xcm)) - } - Instruction2::LockAsset { ref asset, ref unlocker } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(asset), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(unlocker), - ) - } - Instruction2::UnlockAsset { ref asset, ref target } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(asset), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(target), - ) - } - Instruction2::NoteUnlockable { ref asset, ref owner } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(asset), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(owner), - ) - } - Instruction2::RequestUnlock { ref asset, ref locker } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(asset), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(locker), - ) - } - Instruction2::SetFeesMode { ref jit_withdraw } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(jit_withdraw), - ) - } - Instruction2::SetTopic(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::ClearTopic => 0_usize, - Instruction2::AliasOrigin(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Instruction2::UnpaidExecution { - ref weight_limit, - ref check_origin, - } => { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(weight_limit), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(check_origin), - ) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Instruction2::WithdrawAsset(ref aa) => { - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::ReserveAssetDeposited(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::ReceiveTeleportedAsset(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::QueryResponse { - ref query_id, - ref response, - ref max_weight, - ref querier, - } => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - response, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - max_weight, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - querier, - __codec_dest_edqy, - ); - } - Instruction2::TransferAsset { - ref assets, - ref beneficiary, - } => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - } - Instruction2::TransferReserveAsset { - ref assets, - ref dest, - ref xcm, - } => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction2::Transact { - ref origin_kind, - ref require_weight_at_most, - ref call, - } => { - __codec_dest_edqy.push_byte(6u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - origin_kind, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - require_weight_at_most, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - call, - __codec_dest_edqy, - ); - } - Instruction2::HrmpNewChannelOpenRequest { - ref sender, - ref max_message_size, - ref max_capacity, - } => { - __codec_dest_edqy.push_byte(7u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(sender), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_message_size), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(max_capacity), - __codec_dest_edqy, - ); - } - } - Instruction2::HrmpChannelAccepted { ref recipient } => { - __codec_dest_edqy.push_byte(8u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(recipient), - __codec_dest_edqy, - ); - } - } - Instruction2::HrmpChannelClosing { - ref initiator, - ref sender, - ref recipient, - } => { - __codec_dest_edqy.push_byte(9u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(initiator), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(sender), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(recipient), - __codec_dest_edqy, - ); - } - } - Instruction2::ClearOrigin => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(10u8 as ::core::primitive::u8); - } - Instruction2::DescendOrigin(ref aa) => { - __codec_dest_edqy.push_byte(11u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::ReportError(ref aa) => { - __codec_dest_edqy.push_byte(12u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::DepositAsset { - ref assets, - ref beneficiary, - } => { - __codec_dest_edqy.push_byte(13u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - beneficiary, - __codec_dest_edqy, - ); - } - Instruction2::DepositReserveAsset { - ref assets, - ref dest, - ref xcm, - } => { - __codec_dest_edqy.push_byte(14u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction2::ExchangeAsset { - ref give, - ref want, - ref maximal, - } => { - __codec_dest_edqy.push_byte(15u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - give, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - want, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - maximal, - __codec_dest_edqy, - ); - } - Instruction2::InitiateReserveWithdraw { - ref assets, - ref reserve, - ref xcm, - } => { - __codec_dest_edqy.push_byte(16u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - reserve, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction2::InitiateTeleport { - ref assets, - ref dest, - ref xcm, - } => { - __codec_dest_edqy.push_byte(17u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - dest, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction2::ReportHolding { - ref response_info, - ref assets, - } => { - __codec_dest_edqy.push_byte(18u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - response_info, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - } - Instruction2::BuyExecution { - ref fees, - ref weight_limit, - } => { - __codec_dest_edqy.push_byte(19u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - fees, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - weight_limit, - __codec_dest_edqy, - ); - } - Instruction2::RefundSurplus => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(20u8 as ::core::primitive::u8); - } - Instruction2::SetErrorHandler(ref aa) => { - __codec_dest_edqy.push_byte(21u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::SetAppendix(ref aa) => { - __codec_dest_edqy.push_byte(22u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::ClearError => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(23u8 as ::core::primitive::u8); - } - Instruction2::ClaimAsset { ref assets, ref ticket } => { - __codec_dest_edqy.push_byte(24u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - assets, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - ticket, - __codec_dest_edqy, - ); - } - Instruction2::Trap(ref aa) => { - __codec_dest_edqy.push_byte(25u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(aa), - __codec_dest_edqy, - ); - } - } - Instruction2::SubscribeVersion { - ref query_id, - ref max_response_weight, - } => { - __codec_dest_edqy.push_byte(26u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(query_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - max_response_weight, - __codec_dest_edqy, - ); - } - Instruction2::UnsubscribeVersion => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(27u8 as ::core::primitive::u8); - } - Instruction2::BurnAsset(ref aa) => { - __codec_dest_edqy.push_byte(28u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::ExpectAsset(ref aa) => { - __codec_dest_edqy.push_byte(29u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::ExpectOrigin(ref aa) => { - __codec_dest_edqy.push_byte(30u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::ExpectError(ref aa) => { - __codec_dest_edqy.push_byte(31u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::ExpectTransactStatus(ref aa) => { - __codec_dest_edqy.push_byte(32u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::QueryPallet { - ref module_name, - ref response_info, - } => { - __codec_dest_edqy.push_byte(33u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - module_name, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - response_info, - __codec_dest_edqy, - ); - } - Instruction2::ExpectPallet { - ref index, - ref name, - ref module_name, - ref crate_major, - ref min_crate_minor, - } => { - __codec_dest_edqy.push_byte(34u8 as ::core::primitive::u8); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - name, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - module_name, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(crate_major), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(min_crate_minor), - __codec_dest_edqy, - ); - } - } - Instruction2::ReportTransactStatus(ref aa) => { - __codec_dest_edqy.push_byte(35u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::ClearTransactStatus => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(36u8 as ::core::primitive::u8); - } - Instruction2::UniversalOrigin(ref aa) => { - __codec_dest_edqy.push_byte(37u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::ExportMessage { - ref network, - ref destination, - ref xcm, - } => { - __codec_dest_edqy.push_byte(38u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - network, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - destination, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - xcm, - __codec_dest_edqy, - ); - } - Instruction2::LockAsset { ref asset, ref unlocker } => { - __codec_dest_edqy.push_byte(39u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - asset, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - unlocker, - __codec_dest_edqy, - ); - } - Instruction2::UnlockAsset { ref asset, ref target } => { - __codec_dest_edqy.push_byte(40u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - asset, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - target, - __codec_dest_edqy, - ); - } - Instruction2::NoteUnlockable { ref asset, ref owner } => { - __codec_dest_edqy.push_byte(41u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - asset, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - owner, - __codec_dest_edqy, - ); - } - Instruction2::RequestUnlock { ref asset, ref locker } => { - __codec_dest_edqy.push_byte(42u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - asset, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - locker, - __codec_dest_edqy, - ); - } - Instruction2::SetFeesMode { ref jit_withdraw } => { - __codec_dest_edqy.push_byte(43u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - jit_withdraw, - __codec_dest_edqy, - ); - } - Instruction2::SetTopic(ref aa) => { - __codec_dest_edqy.push_byte(44u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::ClearTopic => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(45u8 as ::core::primitive::u8); - } - Instruction2::AliasOrigin(ref aa) => { - __codec_dest_edqy.push_byte(46u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Instruction2::UnpaidExecution { - ref weight_limit, - ref check_origin, - } => { - __codec_dest_edqy.push_byte(47u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - weight_limit, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - check_origin, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Instruction2 {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Instruction2 { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Instruction2; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "WithdrawAsset" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::WithdrawAsset({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ReserveAssetDeposited" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::ReserveAssetDeposited({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ReceiveTeleportedAsset" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::ReceiveTeleportedAsset({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "QueryResponse" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 4usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 4usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::QueryResponse { - query_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - response: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("response"))? - }, - max_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - querier: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("querier"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::QueryResponse { - query_id: { - let val = *vals - .get(&Some("query_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "query_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - response: { - let val = *vals - .get(&Some("response")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "response".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("response"))? - }, - max_weight: { - let val = *vals - .get(&Some("max_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_weight".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - querier: { - let val = *vals - .get(&Some("querier")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "querier".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("querier"))? - }, - }) - }; - } - if value.name() == "TransferAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::TransferAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::TransferAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - }; - } - if value.name() == "TransferReserveAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::TransferReserveAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::TransferReserveAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "Transact" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::Transact { - origin_kind: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("origin_kind"))? - }, - require_weight_at_most: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("require_weight_at_most"))? - }, - call: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::Transact { - origin_kind: { - let val = *vals - .get(&Some("origin_kind")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "origin_kind".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("origin_kind"))? - }, - require_weight_at_most: { - let val = *vals - .get(&Some("require_weight_at_most")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "require_weight_at_most".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("require_weight_at_most"))? - }, - call: { - let val = *vals - .get(&Some("call")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "call".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("call"))? - }, - }) - }; - } - if value.name() == "HrmpNewChannelOpenRequest" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::HrmpNewChannelOpenRequest { - sender: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - max_message_size: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_message_size"))? - }, - max_capacity: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_capacity"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::HrmpNewChannelOpenRequest { - sender: { - let val = *vals - .get(&Some("sender")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sender".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - max_message_size: { - let val = *vals - .get(&Some("max_message_size")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_message_size".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_message_size"))? - }, - max_capacity: { - let val = *vals - .get(&Some("max_capacity")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_capacity".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_capacity"))? - }, - }) - }; - } - if value.name() == "HrmpChannelAccepted" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::HrmpChannelAccepted { - recipient: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::HrmpChannelAccepted { - recipient: { - let val = *vals - .get(&Some("recipient")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "recipient".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - }; - } - if value.name() == "HrmpChannelClosing" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::HrmpChannelClosing { - initiator: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("initiator"))? - }, - sender: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - recipient: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::HrmpChannelClosing { - initiator: { - let val = *vals - .get(&Some("initiator")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "initiator".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("initiator"))? - }, - sender: { - let val = *vals - .get(&Some("sender")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "sender".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("sender"))? - }, - recipient: { - let val = *vals - .get(&Some("recipient")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "recipient".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("recipient"))? - }, - }) - }; - } - if value.name() == "ClearOrigin" { - return Ok(Instruction2::ClearOrigin); - } - if value.name() == "DescendOrigin" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::DescendOrigin({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ReportError" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::ReportError({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "DepositAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::DepositAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - beneficiary: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::DepositAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - beneficiary: { - let val = *vals - .get(&Some("beneficiary")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "beneficiary".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("beneficiary"))? - }, - }) - }; - } - if value.name() == "DepositReserveAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::DepositReserveAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::DepositReserveAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "ExchangeAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::ExchangeAsset { - give: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("give"))? - }, - want: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("want"))? - }, - maximal: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("maximal"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::ExchangeAsset { - give: { - let val = *vals - .get(&Some("give")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "give".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("give"))? - }, - want: { - let val = *vals - .get(&Some("want")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "want".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("want"))? - }, - maximal: { - let val = *vals - .get(&Some("maximal")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "maximal".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("maximal"))? - }, - }) - }; - } - if value.name() == "InitiateReserveWithdraw" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::InitiateReserveWithdraw { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - reserve: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("reserve"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::InitiateReserveWithdraw { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - reserve: { - let val = *vals - .get(&Some("reserve")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "reserve".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("reserve"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "InitiateTeleport" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::InitiateTeleport { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::InitiateTeleport { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - dest: { - let val = *vals - .get(&Some("dest")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "dest".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("dest"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "ReportHolding" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::ReportHolding { - response_info: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("response_info"))? - }, - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::ReportHolding { - response_info: { - let val = *vals - .get(&Some("response_info")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "response_info".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("response_info"))? - }, - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - }) - }; - } - if value.name() == "BuyExecution" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::BuyExecution { - fees: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("fees"))? - }, - weight_limit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::BuyExecution { - fees: { - let val = *vals - .get(&Some("fees")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "fees".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("fees"))? - }, - weight_limit: { - let val = *vals - .get(&Some("weight_limit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "weight_limit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - }) - }; - } - if value.name() == "RefundSurplus" { - return Ok(Instruction2::RefundSurplus); - } - if value.name() == "SetErrorHandler" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::SetErrorHandler({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "SetAppendix" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::SetAppendix({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ClearError" { - return Ok(Instruction2::ClearError); - } - if value.name() == "ClaimAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::ClaimAsset { - assets: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - ticket: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("ticket"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::ClaimAsset { - assets: { - let val = *vals - .get(&Some("assets")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "assets".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("assets"))? - }, - ticket: { - let val = *vals - .get(&Some("ticket")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "ticket".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("ticket"))? - }, - }) - }; - } - if value.name() == "Trap" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::Trap({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "SubscribeVersion" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::SubscribeVersion { - query_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - max_response_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("max_response_weight"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::SubscribeVersion { - query_id: { - let val = *vals - .get(&Some("query_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "query_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - max_response_weight: { - let val = *vals - .get(&Some("max_response_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_response_weight".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("max_response_weight"))? - }, - }) - }; - } - if value.name() == "UnsubscribeVersion" { - return Ok(Instruction2::UnsubscribeVersion); - } - if value.name() == "BurnAsset" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::BurnAsset({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ExpectAsset" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::ExpectAsset({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ExpectOrigin" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::ExpectOrigin({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ExpectError" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::ExpectError({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ExpectTransactStatus" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::ExpectTransactStatus({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "QueryPallet" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::QueryPallet { - module_name: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("module_name"))? - }, - response_info: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("response_info"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::QueryPallet { - module_name: { - let val = *vals - .get(&Some("module_name")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "module_name".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("module_name"))? - }, - response_info: { - let val = *vals - .get(&Some("response_info")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "response_info".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("response_info"))? - }, - }) - }; - } - if value.name() == "ExpectPallet" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 5usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 5usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::ExpectPallet { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - name: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("name"))? - }, - module_name: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("module_name"))? - }, - crate_major: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("crate_major"))? - }, - min_crate_minor: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("min_crate_minor"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::ExpectPallet { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - name: { - let val = *vals - .get(&Some("name")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "name".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("name"))? - }, - module_name: { - let val = *vals - .get(&Some("module_name")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "module_name".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("module_name"))? - }, - crate_major: { - let val = *vals - .get(&Some("crate_major")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "crate_major".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("crate_major"))? - }, - min_crate_minor: { - let val = *vals - .get(&Some("min_crate_minor")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "min_crate_minor".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("min_crate_minor"))? - }, - }) - }; - } - if value.name() == "ReportTransactStatus" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::ReportTransactStatus({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ClearTransactStatus" { - return Ok(Instruction2::ClearTransactStatus); - } - if value.name() == "UniversalOrigin" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::UniversalOrigin({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ExportMessage" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::ExportMessage { - network: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("network"))? - }, - destination: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("destination"))? - }, - xcm: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::ExportMessage { - network: { - let val = *vals - .get(&Some("network")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "network".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("network"))? - }, - destination: { - let val = *vals - .get(&Some("destination")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "destination".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("destination"))? - }, - xcm: { - let val = *vals - .get(&Some("xcm")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "xcm".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("xcm"))? - }, - }) - }; - } - if value.name() == "LockAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::LockAsset { - asset: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("asset"))? - }, - unlocker: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("unlocker"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::LockAsset { - asset: { - let val = *vals - .get(&Some("asset")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "asset".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("asset"))? - }, - unlocker: { - let val = *vals - .get(&Some("unlocker")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "unlocker".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("unlocker"))? - }, - }) - }; - } - if value.name() == "UnlockAsset" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::UnlockAsset { - asset: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("asset"))? - }, - target: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::UnlockAsset { - asset: { - let val = *vals - .get(&Some("asset")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "asset".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("asset"))? - }, - target: { - let val = *vals - .get(&Some("target")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "target".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("target"))? - }, - }) - }; - } - if value.name() == "NoteUnlockable" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::NoteUnlockable { - asset: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("asset"))? - }, - owner: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::NoteUnlockable { - asset: { - let val = *vals - .get(&Some("asset")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "asset".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("asset"))? - }, - owner: { - let val = *vals - .get(&Some("owner")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "owner".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("owner"))? - }, - }) - }; - } - if value.name() == "RequestUnlock" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::RequestUnlock { - asset: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("asset"))? - }, - locker: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("locker"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::RequestUnlock { - asset: { - let val = *vals - .get(&Some("asset")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "asset".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("asset"))? - }, - locker: { - let val = *vals - .get(&Some("locker")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "locker".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("locker"))? - }, - }) - }; - } - if value.name() == "SetFeesMode" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::SetFeesMode { - jit_withdraw: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("jit_withdraw"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::SetFeesMode { - jit_withdraw: { - let val = *vals - .get(&Some("jit_withdraw")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "jit_withdraw".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("jit_withdraw"))? - }, - }) - }; - } - if value.name() == "SetTopic" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::SetTopic({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ClearTopic" { - return Ok(Instruction2::ClearTopic); - } - if value.name() == "AliasOrigin" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Instruction2::AliasOrigin({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "UnpaidExecution" { - let fields = value.fields(); - return if fields.has_unnamed_fields() { - if fields.remaining() != 2usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 2usize, - }), - ); - } - let vals = fields; - Ok(Instruction2::UnpaidExecution { - weight_limit: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - check_origin: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type() - .map_err(|e| e.at_field("check_origin"))? - }, - }) - } else { - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = fields - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(Instruction2::UnpaidExecution { - weight_limit: { - let val = *vals - .get(&Some("weight_limit")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "weight_limit".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("weight_limit"))? - }, - check_origin: { - let val = *vals - .get(&Some("check_origin")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "check_origin".to_string(), - }))?; - val.decode_as_type() - .map_err(|e| e.at_field("check_origin"))? - }, - }) - }; - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "WithdrawAsset", - "ReserveAssetDeposited", - "ReceiveTeleportedAsset", - "QueryResponse", - "TransferAsset", - "TransferReserveAsset", - "Transact", - "HrmpNewChannelOpenRequest", - "HrmpChannelAccepted", - "HrmpChannelClosing", - "ClearOrigin", - "DescendOrigin", - "ReportError", - "DepositAsset", - "DepositReserveAsset", - "ExchangeAsset", - "InitiateReserveWithdraw", - "InitiateTeleport", - "ReportHolding", - "BuyExecution", - "RefundSurplus", - "SetErrorHandler", - "SetAppendix", - "ClearError", - "ClaimAsset", - "Trap", - "SubscribeVersion", - "UnsubscribeVersion", - "BurnAsset", - "ExpectAsset", - "ExpectOrigin", - "ExpectError", - "ExpectTransactStatus", - "QueryPallet", - "ExpectPallet", - "ReportTransactStatus", - "ClearTransactStatus", - "UniversalOrigin", - "ExportMessage", - "LockAsset", - "UnlockAsset", - "NoteUnlockable", - "RequestUnlock", - "SetFeesMode", - "SetTopic", - "ClearTopic", - "AliasOrigin", - "UnpaidExecution", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Instruction2 { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::WithdrawAsset(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "WithdrawAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReserveAssetDeposited(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ReserveAssetDeposited", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReceiveTeleportedAsset(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ReceiveTeleportedAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::QueryResponse { - query_id, - response, - max_weight, - querier, - } => { - ::subxt::ext::scale_encode::Variant { - name: "QueryResponse", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("query_id"), - query_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("response"), - response as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_weight"), - max_weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("querier"), - querier as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TransferAsset { assets, beneficiary } => { - ::subxt::ext::scale_encode::Variant { - name: "TransferAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TransferReserveAsset { assets, dest, xcm } => { - ::subxt::ext::scale_encode::Variant { - name: "TransferReserveAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Transact { - origin_kind, - require_weight_at_most, - call, - } => { - ::subxt::ext::scale_encode::Variant { - name: "Transact", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("origin_kind"), - origin_kind as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("require_weight_at_most"), - require_weight_at_most - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("call"), - call as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HrmpNewChannelOpenRequest { - sender, - max_message_size, - max_capacity, - } => { - ::subxt::ext::scale_encode::Variant { - name: "HrmpNewChannelOpenRequest", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_message_size"), - max_message_size - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_capacity"), - max_capacity - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HrmpChannelAccepted { recipient } => { - ::subxt::ext::scale_encode::Variant { - name: "HrmpChannelAccepted", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::HrmpChannelClosing { - initiator, - sender, - recipient, - } => { - ::subxt::ext::scale_encode::Variant { - name: "HrmpChannelClosing", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("initiator"), - initiator as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("sender"), - sender as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("recipient"), - recipient as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ClearOrigin => { - ::subxt::ext::scale_encode::Variant { - name: "ClearOrigin", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DescendOrigin(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "DescendOrigin", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReportError(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ReportError", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DepositAsset { assets, beneficiary } => { - ::subxt::ext::scale_encode::Variant { - name: "DepositAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("beneficiary"), - beneficiary as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DepositReserveAsset { assets, dest, xcm } => { - ::subxt::ext::scale_encode::Variant { - name: "DepositReserveAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExchangeAsset { give, want, maximal } => { - ::subxt::ext::scale_encode::Variant { - name: "ExchangeAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("give"), - give as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("want"), - want as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("maximal"), - maximal as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InitiateReserveWithdraw { assets, reserve, xcm } => { - ::subxt::ext::scale_encode::Variant { - name: "InitiateReserveWithdraw", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("reserve"), - reserve as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::InitiateTeleport { assets, dest, xcm } => { - ::subxt::ext::scale_encode::Variant { - name: "InitiateTeleport", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("dest"), - dest as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReportHolding { response_info, assets } => { - ::subxt::ext::scale_encode::Variant { - name: "ReportHolding", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("response_info"), - response_info - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BuyExecution { fees, weight_limit } => { - ::subxt::ext::scale_encode::Variant { - name: "BuyExecution", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("fees"), - fees as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("weight_limit"), - weight_limit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::RefundSurplus => { - ::subxt::ext::scale_encode::Variant { - name: "RefundSurplus", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SetErrorHandler(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "SetErrorHandler", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SetAppendix(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "SetAppendix", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ClearError => { - ::subxt::ext::scale_encode::Variant { - name: "ClearError", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ClaimAsset { assets, ticket } => { - ::subxt::ext::scale_encode::Variant { - name: "ClaimAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("assets"), - assets as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("ticket"), - ticket as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Trap(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Trap", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SubscribeVersion { query_id, max_response_weight } => { - ::subxt::ext::scale_encode::Variant { - name: "SubscribeVersion", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("query_id"), - query_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_response_weight"), - max_response_weight - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnsubscribeVersion => { - ::subxt::ext::scale_encode::Variant { - name: "UnsubscribeVersion", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::BurnAsset(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "BurnAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExpectAsset(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ExpectAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExpectOrigin(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ExpectOrigin", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExpectError(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ExpectError", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExpectTransactStatus(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ExpectTransactStatus", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::QueryPallet { module_name, response_info } => { - ::subxt::ext::scale_encode::Variant { - name: "QueryPallet", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("module_name"), - module_name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("response_info"), - response_info - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExpectPallet { - index, - name, - module_name, - crate_major, - min_crate_minor, - } => { - ::subxt::ext::scale_encode::Variant { - name: "ExpectPallet", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("name"), - name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("module_name"), - module_name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("crate_major"), - crate_major as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("min_crate_minor"), - min_crate_minor - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ReportTransactStatus(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ReportTransactStatus", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ClearTransactStatus => { - ::subxt::ext::scale_encode::Variant { - name: "ClearTransactStatus", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UniversalOrigin(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "UniversalOrigin", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExportMessage { network, destination, xcm } => { - ::subxt::ext::scale_encode::Variant { - name: "ExportMessage", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("network"), - network as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("destination"), - destination as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("xcm"), - xcm as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::LockAsset { asset, unlocker } => { - ::subxt::ext::scale_encode::Variant { - name: "LockAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("asset"), - asset as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("unlocker"), - unlocker as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnlockAsset { asset, target } => { - ::subxt::ext::scale_encode::Variant { - name: "UnlockAsset", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("asset"), - asset as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("target"), - target as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::NoteUnlockable { asset, owner } => { - ::subxt::ext::scale_encode::Variant { - name: "NoteUnlockable", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("asset"), - asset as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("owner"), - owner as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::RequestUnlock { asset, locker } => { - ::subxt::ext::scale_encode::Variant { - name: "RequestUnlock", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("asset"), - asset as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("locker"), - locker as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SetFeesMode { jit_withdraw } => { - ::subxt::ext::scale_encode::Variant { - name: "SetFeesMode", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("jit_withdraw"), - jit_withdraw - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::SetTopic(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "SetTopic", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ClearTopic => { - ::subxt::ext::scale_encode::Variant { - name: "ClearTopic", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::AliasOrigin(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "AliasOrigin", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::UnpaidExecution { weight_limit, check_origin } => { - ::subxt::ext::scale_encode::Variant { - name: "UnpaidExecution", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - Some("weight_limit"), - weight_limit - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("check_origin"), - check_origin - as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Instruction2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Instruction2::WithdrawAsset(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "WithdrawAsset", - &__self_0, - ) - } - Instruction2::ReserveAssetDeposited(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ReserveAssetDeposited", - &__self_0, - ) - } - Instruction2::ReceiveTeleportedAsset(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ReceiveTeleportedAsset", - &__self_0, - ) - } - Instruction2::QueryResponse { - query_id: __self_0, - response: __self_1, - max_weight: __self_2, - querier: __self_3, - } => { - ::core::fmt::Formatter::debug_struct_field4_finish( - f, - "QueryResponse", - "query_id", - __self_0, - "response", - __self_1, - "max_weight", - __self_2, - "querier", - &__self_3, - ) - } - Instruction2::TransferAsset { - assets: __self_0, - beneficiary: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "TransferAsset", - "assets", - __self_0, - "beneficiary", - &__self_1, - ) - } - Instruction2::TransferReserveAsset { - assets: __self_0, - dest: __self_1, - xcm: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "TransferReserveAsset", - "assets", - __self_0, - "dest", - __self_1, - "xcm", - &__self_2, - ) - } - Instruction2::Transact { - origin_kind: __self_0, - require_weight_at_most: __self_1, - call: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "Transact", - "origin_kind", - __self_0, - "require_weight_at_most", - __self_1, - "call", - &__self_2, - ) - } - Instruction2::HrmpNewChannelOpenRequest { - sender: __self_0, - max_message_size: __self_1, - max_capacity: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "HrmpNewChannelOpenRequest", - "sender", - __self_0, - "max_message_size", - __self_1, - "max_capacity", - &__self_2, - ) - } - Instruction2::HrmpChannelAccepted { - recipient: __self_0, - } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "HrmpChannelAccepted", - "recipient", - &__self_0, - ) - } - Instruction2::HrmpChannelClosing { - initiator: __self_0, - sender: __self_1, - recipient: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "HrmpChannelClosing", - "initiator", - __self_0, - "sender", - __self_1, - "recipient", - &__self_2, - ) - } - Instruction2::ClearOrigin => { - ::core::fmt::Formatter::write_str(f, "ClearOrigin") - } - Instruction2::DescendOrigin(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "DescendOrigin", - &__self_0, - ) - } - Instruction2::ReportError(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ReportError", - &__self_0, - ) - } - Instruction2::DepositAsset { - assets: __self_0, - beneficiary: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "DepositAsset", - "assets", - __self_0, - "beneficiary", - &__self_1, - ) - } - Instruction2::DepositReserveAsset { - assets: __self_0, - dest: __self_1, - xcm: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "DepositReserveAsset", - "assets", - __self_0, - "dest", - __self_1, - "xcm", - &__self_2, - ) - } - Instruction2::ExchangeAsset { - give: __self_0, - want: __self_1, - maximal: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ExchangeAsset", - "give", - __self_0, - "want", - __self_1, - "maximal", - &__self_2, - ) - } - Instruction2::InitiateReserveWithdraw { - assets: __self_0, - reserve: __self_1, - xcm: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "InitiateReserveWithdraw", - "assets", - __self_0, - "reserve", - __self_1, - "xcm", - &__self_2, - ) - } - Instruction2::InitiateTeleport { - assets: __self_0, - dest: __self_1, - xcm: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "InitiateTeleport", - "assets", - __self_0, - "dest", - __self_1, - "xcm", - &__self_2, - ) - } - Instruction2::ReportHolding { - response_info: __self_0, - assets: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ReportHolding", - "response_info", - __self_0, - "assets", - &__self_1, - ) - } - Instruction2::BuyExecution { - fees: __self_0, - weight_limit: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "BuyExecution", - "fees", - __self_0, - "weight_limit", - &__self_1, - ) - } - Instruction2::RefundSurplus => { - ::core::fmt::Formatter::write_str(f, "RefundSurplus") - } - Instruction2::SetErrorHandler(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "SetErrorHandler", - &__self_0, - ) - } - Instruction2::SetAppendix(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "SetAppendix", - &__self_0, - ) - } - Instruction2::ClearError => { - ::core::fmt::Formatter::write_str(f, "ClearError") - } - Instruction2::ClaimAsset { - assets: __self_0, - ticket: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "ClaimAsset", - "assets", - __self_0, - "ticket", - &__self_1, - ) - } - Instruction2::Trap(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Trap", - &__self_0, - ) - } - Instruction2::SubscribeVersion { - query_id: __self_0, - max_response_weight: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "SubscribeVersion", - "query_id", - __self_0, - "max_response_weight", - &__self_1, - ) - } - Instruction2::UnsubscribeVersion => { - ::core::fmt::Formatter::write_str(f, "UnsubscribeVersion") - } - Instruction2::BurnAsset(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "BurnAsset", - &__self_0, - ) - } - Instruction2::ExpectAsset(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ExpectAsset", - &__self_0, - ) - } - Instruction2::ExpectOrigin(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ExpectOrigin", - &__self_0, - ) - } - Instruction2::ExpectError(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ExpectError", - &__self_0, - ) - } - Instruction2::ExpectTransactStatus(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ExpectTransactStatus", - &__self_0, - ) - } - Instruction2::QueryPallet { - module_name: __self_0, - response_info: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "QueryPallet", - "module_name", - __self_0, - "response_info", - &__self_1, - ) - } - Instruction2::ExpectPallet { - index: __self_0, - name: __self_1, - module_name: __self_2, - crate_major: __self_3, - min_crate_minor: __self_4, - } => { - ::core::fmt::Formatter::debug_struct_field5_finish( - f, - "ExpectPallet", - "index", - __self_0, - "name", - __self_1, - "module_name", - __self_2, - "crate_major", - __self_3, - "min_crate_minor", - &__self_4, - ) - } - Instruction2::ReportTransactStatus(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ReportTransactStatus", - &__self_0, - ) - } - Instruction2::ClearTransactStatus => { - ::core::fmt::Formatter::write_str(f, "ClearTransactStatus") - } - Instruction2::UniversalOrigin(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "UniversalOrigin", - &__self_0, - ) - } - Instruction2::ExportMessage { - network: __self_0, - destination: __self_1, - xcm: __self_2, - } => { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "ExportMessage", - "network", - __self_0, - "destination", - __self_1, - "xcm", - &__self_2, - ) - } - Instruction2::LockAsset { - asset: __self_0, - unlocker: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "LockAsset", - "asset", - __self_0, - "unlocker", - &__self_1, - ) - } - Instruction2::UnlockAsset { - asset: __self_0, - target: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "UnlockAsset", - "asset", - __self_0, - "target", - &__self_1, - ) - } - Instruction2::NoteUnlockable { - asset: __self_0, - owner: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "NoteUnlockable", - "asset", - __self_0, - "owner", - &__self_1, - ) - } - Instruction2::RequestUnlock { - asset: __self_0, - locker: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "RequestUnlock", - "asset", - __self_0, - "locker", - &__self_1, - ) - } - Instruction2::SetFeesMode { jit_withdraw: __self_0 } => { - ::core::fmt::Formatter::debug_struct_field1_finish( - f, - "SetFeesMode", - "jit_withdraw", - &__self_0, - ) - } - Instruction2::SetTopic(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "SetTopic", - &__self_0, - ) - } - Instruction2::ClearTopic => { - ::core::fmt::Formatter::write_str(f, "ClearTopic") - } - Instruction2::AliasOrigin(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "AliasOrigin", - &__self_0, - ) - } - Instruction2::UnpaidExecution { - weight_limit: __self_0, - check_origin: __self_1, - } => { - ::core::fmt::Formatter::debug_struct_field2_finish( - f, - "UnpaidExecution", - "weight_limit", - __self_0, - "check_origin", - &__self_1, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum MaybeErrorCode { - #[codec(index = 0)] - Success, - #[codec(index = 1)] - Error( - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ), - #[codec(index = 2)] - TruncatedError( - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for MaybeErrorCode { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `MaybeErrorCode`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(MaybeErrorCode::Success) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - MaybeErrorCode::Error({ - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `MaybeErrorCode::Error.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - MaybeErrorCode::TruncatedError({ - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e - .chain( - "Could not decode `MaybeErrorCode::TruncatedError.0`", - ), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `MaybeErrorCode`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for MaybeErrorCode { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - MaybeErrorCode::Success => 0_usize, - MaybeErrorCode::Error(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - MaybeErrorCode::TruncatedError(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - MaybeErrorCode::Success => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - MaybeErrorCode::Error(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - MaybeErrorCode::TruncatedError(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for MaybeErrorCode {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for MaybeErrorCode { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = MaybeErrorCode; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Success" { - return Ok(MaybeErrorCode::Success); - } - if value.name() == "Error" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - MaybeErrorCode::Error({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "TruncatedError" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - MaybeErrorCode::TruncatedError({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Success", - "Error", - "TruncatedError", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for MaybeErrorCode { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Success => { - ::subxt::ext::scale_encode::Variant { - name: "Success", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Error(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Error", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::TruncatedError(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "TruncatedError", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for MaybeErrorCode { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - MaybeErrorCode::Success => { - ::core::fmt::Formatter::write_str(f, "Success") - } - MaybeErrorCode::Error(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Error", - &__self_0, - ) - } - MaybeErrorCode::TruncatedError(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "TruncatedError", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PalletInfo { - #[codec(compact)] - pub index: ::core::primitive::u32, - pub name: runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - pub module_name: runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - #[codec(compact)] - pub major: ::core::primitive::u32, - #[codec(compact)] - pub minor: ::core::primitive::u32, - #[codec(compact)] - pub patch: ::core::primitive::u32, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for PalletInfo { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(PalletInfo { - index: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PalletInfo::index`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - name: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PalletInfo::name`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - module_name: { - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PalletInfo::module_name`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - major: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PalletInfo::major`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - minor: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PalletInfo::minor`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - patch: { - let __codec_res_edqy = <<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `PalletInfo::patch`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for PalletInfo { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.index), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.name), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.module_name), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.major), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.minor), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.patch), - ), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.index), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.name, - __codec_dest_edqy, - ); - ::subxt::ext::codec::Encode::encode_to( - &self.module_name, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.major), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.minor), - __codec_dest_edqy, - ); - } - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u32 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u32, - >>::RefType::from(&self.patch), - __codec_dest_edqy, - ); - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for PalletInfo {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for PalletInfo { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = PalletInfo; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(PalletInfo { - index: { - let val = *vals - .get(&Some("index")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "index".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - name: { - let val = *vals - .get(&Some("name")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "name".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("name"))? - }, - module_name: { - let val = *vals - .get(&Some("module_name")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "module_name".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("module_name"))? - }, - major: { - let val = *vals - .get(&Some("major")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "major".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("major"))? - }, - minor: { - let val = *vals - .get(&Some("minor")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "minor".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("minor"))? - }, - patch: { - let val = *vals - .get(&Some("patch")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "patch".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("patch"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 6usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 6usize, - }), - ); - } - let vals = value; - Ok(PalletInfo { - index: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("index"))? - }, - name: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("name"))? - }, - module_name: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("module_name"))? - }, - major: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("major"))? - }, - minor: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("minor"))? - }, - patch: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("patch"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for PalletInfo { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for PalletInfo { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PalletInfo { - index, - name, - module_name, - major, - minor, - patch, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("name"), - name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("module_name"), - module_name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("major"), - major as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("minor"), - minor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("patch"), - patch as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for PalletInfo { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let PalletInfo { - index, - name, - module_name, - major, - minor, - patch, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("index"), - index as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("name"), - name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("module_name"), - module_name as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("major"), - major as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("minor"), - minor as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("patch"), - patch as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for PalletInfo { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - let names: &'static _ = &[ - "index", - "name", - "module_name", - "major", - "minor", - "patch", - ]; - let values: &[&dyn ::core::fmt::Debug] = &[ - &self.index, - &self.name, - &self.module_name, - &self.major, - &self.minor, - &&self.patch, - ]; - ::core::fmt::Formatter::debug_struct_fields_finish( - f, - "PalletInfo", - names, - values, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct QueryResponseInfo { - pub destination: runtime_types::xcm::v3::multilocation::MultiLocation, - #[codec(compact)] - pub query_id: ::core::primitive::u64, - pub max_weight: runtime_types::sp_weights::weight_v2::Weight, - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for QueryResponseInfo { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok(QueryResponseInfo { - destination: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `QueryResponseInfo::destination`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - query_id: { - let __codec_res_edqy = <<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `QueryResponseInfo::query_id`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy.into() - } - } - }, - max_weight: { - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `QueryResponseInfo::max_weight`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }, - }) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for QueryResponseInfo { - fn size_hint(&self) -> usize { - 0_usize - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.destination), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(&self.query_id), - ), - ) - .saturating_add( - ::subxt::ext::codec::Encode::size_hint(&self.max_weight), - ) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &self.destination, - __codec_dest_edqy, - ); - { - ::subxt::ext::codec::Encode::encode_to( - &<<::core::primitive::u64 as ::subxt::ext::codec::HasCompact>::Type as ::subxt::ext::codec::EncodeAsRef< - '_, - ::core::primitive::u64, - >>::RefType::from(&self.query_id), - __codec_dest_edqy, - ); - } - ::subxt::ext::codec::Encode::encode_to( - &self.max_weight, - __codec_dest_edqy, - ); - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for QueryResponseInfo {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for QueryResponseInfo { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = QueryResponseInfo; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.has_unnamed_fields() { - return self.visit_tuple(&mut value.as_tuple(), type_id); - } - let vals: ::subxt::ext::scale_decode::BTreeMap< - Option<&str>, - _, - > = value - .map(|res| res.map(|item| (item.name(), item))) - .collect::>()?; - Ok(QueryResponseInfo { - destination: { - let val = *vals - .get(&Some("destination")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "destination".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("destination"))? - }, - query_id: { - let val = *vals - .get(&Some("query_id")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "query_id".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - max_weight: { - let val = *vals - .get(&Some("max_weight")) - .ok_or_else(|| ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindField { - name: "max_weight".to_string(), - }))?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 3usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 3usize, - }), - ); - } - let vals = value; - Ok(QueryResponseInfo { - destination: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("destination"))? - }, - query_id: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("query_id"))? - }, - max_weight: { - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_field("max_weight"))? - }, - }) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields - for QueryResponseInfo { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for QueryResponseInfo { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let QueryResponseInfo { - destination, - query_id, - max_weight, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("destination"), - destination as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("query_id"), - query_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_weight"), - max_weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields - for QueryResponseInfo { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let QueryResponseInfo { - destination, - query_id, - max_weight, - } = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - Some("destination"), - destination as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("query_id"), - query_id as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ( - Some("max_weight"), - max_weight as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for QueryResponseInfo { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish( - f, - "QueryResponseInfo", - "destination", - &self.destination, - "query_id", - &self.query_id, - "max_weight", - &&self.max_weight, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Response { - #[codec(index = 0)] - Null, - #[codec(index = 1)] - Assets(runtime_types::xcm::v3::multiasset::MultiAssets), - #[codec(index = 2)] - ExecutionResult( - ::core::option::Option< - ( - ::core::primitive::u32, - runtime_types::xcm::v3::traits::Error, - ), - >, - ), - #[codec(index = 3)] - Version(::core::primitive::u32), - #[codec(index = 4)] - PalletsInfo( - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::xcm::v3::PalletInfo, - >, - ), - #[codec(index = 5)] - DispatchResult(runtime_types::xcm::v3::MaybeErrorCode), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Response { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `Response`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(Response::Null) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Response::Assets({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Response::Assets.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Response::ExecutionResult({ - let __codec_res_edqy = <::core::option::Option< - ( - ::core::primitive::u32, - runtime_types::xcm::v3::traits::Error, - ), - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Response::ExecutionResult.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Response::Version({ - let __codec_res_edqy = <::core::primitive::u32 as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Response::Version.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 4u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Response::PalletsInfo({ - let __codec_res_edqy = as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Response::PalletsInfo.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 5u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - Response::DispatchResult({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Response::DispatchResult.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `Response`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Response { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - Response::Null => 0_usize, - Response::Assets(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Response::ExecutionResult(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Response::Version(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Response::PalletsInfo(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - Response::DispatchResult(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - Response::Null => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - Response::Assets(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Response::ExecutionResult(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Response::Version(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Response::PalletsInfo(ref aa) => { - __codec_dest_edqy.push_byte(4u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - Response::DispatchResult(ref aa) => { - __codec_dest_edqy.push_byte(5u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Response {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Response { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Response; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Null" { - return Ok(Response::Null); - } - if value.name() == "Assets" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Response::Assets({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "ExecutionResult" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Response::ExecutionResult({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "Version" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Response::Version({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "PalletsInfo" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Response::PalletsInfo({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "DispatchResult" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - Response::DispatchResult({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new([ - "Null", - "Assets", - "ExecutionResult", - "Version", - "PalletsInfo", - "DispatchResult", - ]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Response { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Null => { - ::subxt::ext::scale_encode::Variant { - name: "Null", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Assets(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Assets", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::ExecutionResult(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "ExecutionResult", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Version(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Version", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::PalletsInfo(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "PalletsInfo", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::DispatchResult(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "DispatchResult", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Response { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - Response::Null => { - ::core::fmt::Formatter::write_str(f, "Null") - } - Response::Assets(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Assets", - &__self_0, - ) - } - Response::ExecutionResult(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "ExecutionResult", - &__self_0, - ) - } - Response::Version(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Version", - &__self_0, - ) - } - Response::PalletsInfo(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "PalletsInfo", - &__self_0, - ) - } - Response::DispatchResult(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "DispatchResult", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum WeightLimit { - #[codec(index = 0)] - Unlimited, - #[codec(index = 1)] - Limited(runtime_types::sp_weights::weight_v2::Weight), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for WeightLimit { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `WeightLimit`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 0u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok(WeightLimit::Unlimited) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - WeightLimit::Limited({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `WeightLimit::Limited.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `WeightLimit`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for WeightLimit { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - WeightLimit::Unlimited => 0_usize, - WeightLimit::Limited(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - WeightLimit::Unlimited => { - #[allow(clippy::unnecessary_cast)] - __codec_dest_edqy.push_byte(0u8 as ::core::primitive::u8); - } - WeightLimit::Limited(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for WeightLimit {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for WeightLimit { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = WeightLimit; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "Unlimited" { - return Ok(WeightLimit::Unlimited); - } - if value.name() == "Limited" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - WeightLimit::Limited({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["Unlimited", "Limited"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for WeightLimit { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::Unlimited => { - ::subxt::ext::scale_encode::Variant { - name: "Unlimited", - fields: ::subxt::ext::scale_encode::Composite( - ([] - as [( - Option<&'static str>, - &dyn ::subxt::ext::scale_encode::EncodeAsType, - ); 0]) - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::Limited(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "Limited", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for WeightLimit { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - WeightLimit::Unlimited => { - ::core::fmt::Formatter::write_str(f, "Unlimited") - } - WeightLimit::Limited(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Limited", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Xcm( - pub ::std::vec::Vec, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Xcm { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Xcm({ - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::xcm::v3::Instruction, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Xcm.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Xcm { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Xcm {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Xcm { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Xcm; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Xcm({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Xcm { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Xcm { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Xcm(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Xcm { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Xcm(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Xcm { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Xcm", - &&self.0, - ) - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Xcm2( - pub ::std::vec::Vec, - ); - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for Xcm2 { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result< - Self, - ::subxt::ext::codec::Error, - > { - ::core::result::Result::Ok( - Xcm2({ - let __codec_res_edqy = <::std::vec::Vec< - runtime_types::xcm::v3::Instruction2, - > as ::subxt::ext::codec::Decode>::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `Xcm2.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for Xcm2 { - fn size_hint(&self) -> usize { - ::subxt::ext::codec::Encode::size_hint(&&self.0) - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - ::subxt::ext::codec::Encode::encode_to( - &&self.0, - __codec_dest_edqy, - ) - } - fn encode( - &self, - ) -> ::subxt::ext::codec::alloc::vec::Vec< - ::core::primitive::u8, - > { - ::subxt::ext::codec::Encode::encode(&&self.0) - } - fn using_encoded< - R, - F: ::core::ops::FnOnce(&[::core::primitive::u8]) -> R, - >(&self, f: F) -> R { - ::subxt::ext::codec::Encode::using_encoded(&&self.0, f) - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for Xcm2 {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for Xcm2 { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = Xcm2; - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - self.visit_tuple(&mut value.as_tuple(), type_id) - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: value.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = value; - Ok( - Xcm2({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ) - } - } - impl ::subxt::ext::scale_decode::DecodeAsFields for Xcm2 { - fn decode_as_fields<'info>( - input: &mut &[u8], - fields: &mut dyn ::subxt::ext::scale_decode::FieldIter< - 'info, - >, - types: &'info ::subxt::ext::scale_decode::PortableRegistry, - ) -> Result { - let path = ::subxt::ext::scale_decode::EMPTY_SCALE_INFO_PATH; - let mut composite = ::subxt::ext::scale_decode::visitor::types::Composite::new( - input, - path, - fields, - types, - false, - ); - use ::subxt::ext::scale_decode::{Visitor, IntoVisitor}; - let val = ::into_visitor() - .visit_composite( - &mut composite, - ::subxt::ext::scale_decode::visitor::TypeId(0), - ); - composite.skip_decoding()?; - *input = composite.bytes_from_undecoded(); - val.map_err(From::from) - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for Xcm2 { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Xcm2(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - impl ::subxt::ext::scale_encode::EncodeAsFields for Xcm2 { - #[allow(unused_variables)] - fn encode_as_fields_to( - &self, - __encode_as_type_fields: &mut dyn ::subxt::ext::scale_encode::FieldIter< - '_, - >, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec< - u8, - >, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - let Xcm2(_0) = self; - ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ) - .encode_as_fields_to( - __encode_as_type_fields, - __encode_as_type_types, - __encode_as_type_out, - ) - } - } - #[automatically_derived] - impl ::core::fmt::Debug for Xcm2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "Xcm2", - &&self.0, - ) - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum VersionedAssetId { - #[codec(index = 3)] - V3(runtime_types::xcm::v3::multiasset::AssetId), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VersionedAssetId { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `VersionedAssetId`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - VersionedAssetId::V3({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionedAssetId::V3.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `VersionedAssetId`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VersionedAssetId { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - VersionedAssetId::V3(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - VersionedAssetId::V3(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VersionedAssetId {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for VersionedAssetId { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VersionedAssetId; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "V3" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - VersionedAssetId::V3({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["V3"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for VersionedAssetId { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::V3(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "V3", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VersionedAssetId { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - VersionedAssetId::V3(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "V3", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum VersionedMultiAssets { - #[codec(index = 1)] - V2(runtime_types::xcm::v2::multiasset::MultiAssets), - #[codec(index = 3)] - V3(runtime_types::xcm::v3::multiasset::MultiAssets), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VersionedMultiAssets { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `VersionedMultiAssets`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - VersionedMultiAssets::V2({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionedMultiAssets::V2.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - VersionedMultiAssets::V3({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionedMultiAssets::V3.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `VersionedMultiAssets`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VersionedMultiAssets { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - VersionedMultiAssets::V2(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - VersionedMultiAssets::V3(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - VersionedMultiAssets::V2(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - VersionedMultiAssets::V3(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VersionedMultiAssets {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for VersionedMultiAssets { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VersionedMultiAssets; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "V2" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - VersionedMultiAssets::V2({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "V3" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - VersionedMultiAssets::V3({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["V2", "V3"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for VersionedMultiAssets { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::V2(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "V2", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::V3(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "V3", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VersionedMultiAssets { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - VersionedMultiAssets::V2(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "V2", - &__self_0, - ) - } - VersionedMultiAssets::V3(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "V3", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum VersionedMultiLocation { - #[codec(index = 1)] - V2(runtime_types::xcm::v2::multilocation::MultiLocation), - #[codec(index = 3)] - V3(runtime_types::xcm::v3::multilocation::MultiLocation), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VersionedMultiLocation { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `VersionedMultiLocation`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 1u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - VersionedMultiLocation::V2({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionedMultiLocation::V2.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - VersionedMultiLocation::V3({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionedMultiLocation::V3.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `VersionedMultiLocation`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VersionedMultiLocation { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - VersionedMultiLocation::V2(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - VersionedMultiLocation::V3(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - VersionedMultiLocation::V2(ref aa) => { - __codec_dest_edqy.push_byte(1u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - VersionedMultiLocation::V3(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VersionedMultiLocation {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor - for VersionedMultiLocation { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VersionedMultiLocation; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "V2" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - VersionedMultiLocation::V2({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "V3" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - VersionedMultiLocation::V3({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["V2", "V3"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType - for VersionedMultiLocation { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::V2(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "V2", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::V3(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "V3", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VersionedMultiLocation { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - VersionedMultiLocation::V2(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "V2", - &__self_0, - ) - } - VersionedMultiLocation::V3(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "V3", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum VersionedResponse { - #[codec(index = 2)] - V2(runtime_types::xcm::v2::Response), - #[codec(index = 3)] - V3(runtime_types::xcm::v3::Response), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VersionedResponse { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `VersionedResponse`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - VersionedResponse::V2({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionedResponse::V2.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - VersionedResponse::V3({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionedResponse::V3.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `VersionedResponse`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VersionedResponse { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - VersionedResponse::V2(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - VersionedResponse::V3(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - VersionedResponse::V2(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - VersionedResponse::V3(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VersionedResponse {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for VersionedResponse { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VersionedResponse; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "V2" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - VersionedResponse::V2({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "V3" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - VersionedResponse::V3({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["V2", "V3"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for VersionedResponse { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::V2(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "V2", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::V3(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "V3", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VersionedResponse { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - VersionedResponse::V2(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "V2", - &__self_0, - ) - } - VersionedResponse::V3(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "V3", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum VersionedXcm { - #[codec(index = 2)] - V2(runtime_types::xcm::v2::Xcm), - #[codec(index = 3)] - V3(runtime_types::xcm::v3::Xcm), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VersionedXcm { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `VersionedXcm`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - VersionedXcm::V2({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionedXcm::V2.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - VersionedXcm::V3({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionedXcm::V3.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `VersionedXcm`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VersionedXcm { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - VersionedXcm::V2(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - VersionedXcm::V3(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - VersionedXcm::V2(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - VersionedXcm::V3(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VersionedXcm {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for VersionedXcm { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VersionedXcm; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "V2" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - VersionedXcm::V2({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "V3" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - VersionedXcm::V3({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["V2", "V3"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for VersionedXcm { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::V2(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "V2", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::V3(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "V3", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VersionedXcm { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - VersionedXcm::V2(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "V2", - &__self_0, - ) - } - VersionedXcm::V3(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "V3", - &__self_0, - ) - } - } - } - } - #[codec(crate = ::subxt::ext::codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum VersionedXcm2 { - #[codec(index = 2)] - V2(runtime_types::xcm::v2::Xcm2), - #[codec(index = 3)] - V3(runtime_types::xcm::v3::Xcm2), - } - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Decode for VersionedXcm2 { - fn decode<__CodecInputEdqy: ::subxt::ext::codec::Input>( - __codec_input_edqy: &mut __CodecInputEdqy, - ) -> ::core::result::Result { - match __codec_input_edqy - .read_byte() - .map_err(|e| { - e - .chain( - "Could not decode `VersionedXcm2`, failed to read variant byte", - ) - })? - { - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 2u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - VersionedXcm2::V2({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionedXcm2::V2.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - #[allow(clippy::unnecessary_cast)] - __codec_x_edqy if __codec_x_edqy - == 3u8 as ::core::primitive::u8 => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Ok( - VersionedXcm2::V3({ - let __codec_res_edqy = ::decode( - __codec_input_edqy, - ); - match __codec_res_edqy { - ::core::result::Result::Err(e) => { - return ::core::result::Result::Err( - e.chain("Could not decode `VersionedXcm2::V3.0`"), - ); - } - ::core::result::Result::Ok(__codec_res_edqy) => { - __codec_res_edqy - } - } - }), - ) - })(); - } - _ => { - #[allow(clippy::redundant_closure_call)] - return (move || { - ::core::result::Result::Err( - <_ as ::core::convert::Into< - _, - >>::into( - "Could not decode `VersionedXcm2`, variant doesn't exist", - ), - ) - })(); - } - } - } - } - }; - #[allow(deprecated)] - const _: () = { - #[automatically_derived] - impl ::subxt::ext::codec::Encode for VersionedXcm2 { - fn size_hint(&self) -> usize { - 1_usize - + match *self { - VersionedXcm2::V2(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - VersionedXcm2::V3(ref aa) => { - 0_usize - .saturating_add(::subxt::ext::codec::Encode::size_hint(aa)) - } - _ => 0_usize, - } - } - fn encode_to< - __CodecOutputEdqy: ::subxt::ext::codec::Output - + ?::core::marker::Sized, - >(&self, __codec_dest_edqy: &mut __CodecOutputEdqy) { - match *self { - VersionedXcm2::V2(ref aa) => { - __codec_dest_edqy.push_byte(2u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - VersionedXcm2::V3(ref aa) => { - __codec_dest_edqy.push_byte(3u8 as ::core::primitive::u8); - ::subxt::ext::codec::Encode::encode_to( - aa, - __codec_dest_edqy, - ); - } - _ => {} - } - } - } - #[automatically_derived] - impl ::subxt::ext::codec::EncodeLike for VersionedXcm2 {} - }; - const _: () = { - pub struct Visitor(::core::marker::PhantomData<()>); - use ::subxt::ext::scale_decode::vec; - use ::subxt::ext::scale_decode::ToString; - impl ::subxt::ext::scale_decode::IntoVisitor for VersionedXcm2 { - type Visitor = Visitor; - fn into_visitor() -> Self::Visitor { - Visitor(::core::marker::PhantomData) - } - } - impl ::subxt::ext::scale_decode::Visitor for Visitor { - type Error = ::subxt::ext::scale_decode::Error; - type Value<'scale, 'info> = VersionedXcm2; - fn visit_variant<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Variant< - 'scale, - 'info, - >, - type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.name() == "V2" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - VersionedXcm2::V2({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - if value.name() == "V3" { - let fields = value.fields(); - if fields.remaining() != 1usize { - return Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::WrongLength { - actual_len: fields.remaining(), - expected_len: 1usize, - }), - ); - } - let vals = fields; - return Ok( - VersionedXcm2::V3({ - let val = vals - .next() - .expect( - "field count should have been checked already on tuple type; please file a bug report", - )?; - val.decode_as_type().map_err(|e| e.at_idx(0usize))? - }), - ); - } - Err( - ::subxt::ext::scale_decode::Error::new(::subxt::ext::scale_decode::error::ErrorKind::CannotFindVariant { - got: value.name().to_string(), - expected: <[_]>::into_vec( - #[rustc_box] - ::alloc::boxed::Box::new(["V2", "V3"]), - ), - }), - ) - } - fn visit_composite<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Composite< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Composite, - ); - } - value.decode_item(self).unwrap() - } - fn visit_tuple<'scale, 'info>( - self, - value: &mut ::subxt::ext::scale_decode::visitor::types::Tuple< - 'scale, - 'info, - >, - _type_id: ::subxt::ext::scale_decode::visitor::TypeId, - ) -> Result, Self::Error> { - if value.remaining() != 1 { - return self - .visit_unexpected( - ::subxt::ext::scale_decode::visitor::Unexpected::Tuple, - ); - } - value.decode_item(self).unwrap() - } - } - }; - impl ::subxt::ext::scale_encode::EncodeAsType for VersionedXcm2 { - #[allow(unused_variables)] - fn encode_as_type_to( - &self, - __encode_as_type_type_id: u32, - __encode_as_type_types: &::subxt::ext::scale_encode::PortableRegistry, - __encode_as_type_out: &mut ::subxt::ext::scale_encode::Vec, - ) -> Result<(), ::subxt::ext::scale_encode::Error> { - match self { - Self::V2(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "V2", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - Self::V3(_0) => { - ::subxt::ext::scale_encode::Variant { - name: "V3", - fields: ::subxt::ext::scale_encode::Composite( - [ - ( - None as Option<&'static str>, - _0 as &dyn ::subxt::ext::scale_encode::EncodeAsType, - ), - ] - .into_iter(), - ), - } - .encode_as_type_to( - __encode_as_type_type_id, - __encode_as_type_types, - __encode_as_type_out, - ) - } - _ => { - ::core::panicking::panic( - "internal error: entered unreachable code", - ) - } - } - } - } - #[automatically_derived] - impl ::core::fmt::Debug for VersionedXcm2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter, - ) -> ::core::fmt::Result { - match self { - VersionedXcm2::V2(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "V2", - &__self_0, - ) - } - VersionedXcm2::V3(__self_0) => { - ::core::fmt::Formatter::debug_tuple_field1_finish( - f, - "V3", - &__self_0, - ) - } - } - } - } - } - } - } -} diff --git a/chains/polkadot/server/Cargo.toml b/chains/polkadot/server/Cargo.toml index d68fbd7c..541d89e2 100644 --- a/chains/polkadot/server/Cargo.toml +++ b/chains/polkadot/server/Cargo.toml @@ -17,7 +17,7 @@ rosetta-server = { workspace = true, default-features = false, features = ["ws", scale-info.workspace = true serde.workspace = true serde_json.workspace = true -sp-keyring = "24.0" +sp-keyring = "29.0" subxt = { workspace = true, features = ["substrate-compat", "native"] } tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } tracing = "0.1" diff --git a/chains/polkadot/server/src/lib.rs b/chains/polkadot/server/src/lib.rs index ea9edd18..32031011 100644 --- a/chains/polkadot/server/src/lib.rs +++ b/chains/polkadot/server/src/lib.rs @@ -1,6 +1,6 @@ use anyhow::{Context, Result}; use parity_scale_codec::{Decode, Encode}; -use rosetta_config_polkadot::metadata::dev as polkadot_metadata; +use rosetta_config_polkadot::metadata::westend::dev as westend_dev_metadata; pub use rosetta_config_polkadot::{PolkadotMetadata, PolkadotMetadataParams}; use rosetta_core::{ crypto::{address::Address, PublicKey}, @@ -19,11 +19,14 @@ use subxt::{ legacy::{rpc_methods::BlockNumber, LegacyRpcMethods}, rpc::RpcClient, }, + blocks::BlockRef, config::{Hasher, Header}, - dynamic::Value as SubtxValue, + // dynamic::Value as SubtxValue, tx::{PairSigner, SubmittableExtrinsic}, utils::{AccountId32, MultiAddress}, - Config, OnlineClient, PolkadotConfig, + Config, + OnlineClient, + PolkadotConfig, }; mod block; @@ -77,19 +80,24 @@ impl PolkadotClient { .context("invalid address")?; // Build a dynamic storage query to iterate account information. - let storage_query = - subxt::dynamic::storage("System", "Account", vec![SubtxValue::from_bytes(account)]); + // let storage_query = + // subxt::dynamic::storage("System", "Account", vec![SubtxValue::from_bytes(account)]); + + let storage_query = westend_dev_metadata::storage().system().account(account); let block_hash = { let block_number = maybe_block.map(|block| BlockNumber::from(block.index)); self.rpc_methods .chain_get_block_hash(block_number) .await? + .map(BlockRef::from_hash) .ok_or_else(|| anyhow::anyhow!("no block hash found"))? }; let account_info = self.client.storage().at(block_hash).fetch(&storage_query).await?; + // let account_info = self.client.storage().at(block_hash).fetch(&storage_query).await?; + account_info.map_or_else( || { Ok(AccountInfo { @@ -97,12 +105,21 @@ impl PolkadotClient { consumers: 0, providers: 0, sufficients: 0, - data: AccountData { free: 0, reserved: 0, misc_frozen: 0, fee_frozen: 0 }, + data: AccountData { free: 0, reserved: 0, frozen: 0 }, }) }, |account_info| { - AccountInfo::decode(&mut account_info.encoded()) - .map_err(|_| anyhow::anyhow!("invalid format")) + Ok(AccountInfo { + nonce: account_info.nonce, + consumers: account_info.consumers, + providers: account_info.providers, + sufficients: account_info.sufficients, + data: AccountData { + free: account_info.data.free, + reserved: account_info.data.reserved, + frozen: account_info.data.frozen, + }, + }) }, ) } @@ -164,8 +181,7 @@ impl BlockchainClient for PolkadotClient { .context("invalid address")?; let signer = PairSigner::::new(AccountKeyring::Alice.pair()); - let tx = polkadot_metadata::tx().balances().transfer(address.into(), value); - + let tx = westend_dev_metadata::tx().balances().transfer_keep_alive(address.into(), value); let hash = self .client .tx() @@ -233,7 +249,7 @@ impl BlockchainClient for PolkadotClient { let extrinsics = block.extrinsics().await?; // Build timestamp query - let timestamp_now_query = polkadot_metadata::storage().timestamp().now(); + let timestamp_now_query = westend_dev_metadata::storage().timestamp().now(); let timestamp = block.storage().fetch_or_default(×tamp_now_query).await?; let mut transactions = vec![]; @@ -322,8 +338,7 @@ struct AccountInfo { struct AccountData { pub free: u128, pub reserved: u128, - pub misc_frozen: u128, - pub fee_frozen: u128, + pub frozen: u128, } #[derive(Decode, Encode, Debug)] @@ -344,20 +359,20 @@ mod tests { #[tokio::test] async fn test_network_status() -> Result<()> { - let config = rosetta_config_polkadot::config("dev")?; + let config = rosetta_config_polkadot::config("westend-dev")?; rosetta_docker::tests::network_status::(client_from_config, config) .await } #[tokio::test] async fn test_account() -> Result<()> { - let config = rosetta_config_polkadot::config("dev")?; + let config = rosetta_config_polkadot::config("westend-dev")?; rosetta_docker::tests::account::(client_from_config, config).await } #[tokio::test] async fn test_construction() -> Result<()> { - let config = rosetta_config_polkadot::config("dev")?; + let config = rosetta_config_polkadot::config("westend-dev")?; rosetta_docker::tests::construction::(client_from_config, config) .await } diff --git a/chains/polkadot/tx/src/lib.rs b/chains/polkadot/tx/src/lib.rs index 490e46f8..e570d446 100644 --- a/chains/polkadot/tx/src/lib.rs +++ b/chains/polkadot/tx/src/lib.rs @@ -93,7 +93,7 @@ impl TransactionBuilder for PolkadotTransactionBuilder { let dest = MultiAddress::Id(address); Ok(PolkadotMetadataParams { pallet_name: "Balances".into(), - call_name: "transfer".into(), + call_name: "transfer_keep_alive".into(), call_args: Transfer { dest, amount }.encode(), }) } diff --git a/docker-compose.yml b/docker-compose.yml index 5b4890aa..ebe1f15d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -40,7 +40,7 @@ services: - "ethereum-volume:/root" polkadot: - image: "parity/polkadot:v1.0.0" + image: "parity/polkadot:v1.5.0" command: "--dev --rpc-external --rpc-port=9944 --alice --blocks-pruning archive --state-pruning archive --base-path /polkadot" expose: - "9944" @@ -57,7 +57,7 @@ services: - "polkadot-volume:/polkadot" astar: - image: "staketechnologies/astar-collator:v5.15.0" + image: "staketechnologies/astar-collator:v5.28.0-rerun" command: "astar-collator --chain dev --rpc-port=9994 --rpc-cors=all --rpc-external --alice --enable-evm-rpc --base-path /astar" expose: - "9994" diff --git a/rosetta-client/src/client.rs b/rosetta-client/src/client.rs index f41a95b6..0dd8ffb5 100644 --- a/rosetta-client/src/client.rs +++ b/rosetta-client/src/client.rs @@ -57,10 +57,13 @@ impl GenericClient { let client = AstarClient::new(network, url).await?; Self::Astar(client) }, - Blockchain::Polkadot => { + Blockchain::Polkadot | Blockchain::Rococo | Blockchain::Westend => { let client = PolkadotClient::new(network, url).await?; Self::Polkadot(client) }, + Blockchain::Kusama | Blockchain::Wococo => { + anyhow::bail!("unsupported blockchain: {blockchain:?}") + }, }) } @@ -79,10 +82,13 @@ impl GenericClient { let client = AstarClient::from_config(config, url).await?; Self::Astar(client) }, - Blockchain::Polkadot => { + Blockchain::Polkadot | Blockchain::Rococo | Blockchain::Westend => { let client = PolkadotClient::from_config(config, url).await?; Self::Polkadot(client) }, + Blockchain::Kusama | Blockchain::Wococo => { + anyhow::bail!("unsupported blockchain: {blockchain:?}") + }, }) } } diff --git a/rosetta-client/src/lib.rs b/rosetta-client/src/lib.rs index 43ead771..1207bc72 100644 --- a/rosetta-client/src/lib.rs +++ b/rosetta-client/src/lib.rs @@ -25,6 +25,14 @@ pub enum Blockchain { Astar, /// Polkadot Polkadot, + /// Kusama + Kusama, + /// Rococo + Rococo, + /// Westend + Westend, + /// Wococo + Wococo, /// Polygon Polygon, /// Arbitrum @@ -40,6 +48,10 @@ impl std::str::FromStr for Blockchain { "ethereum" => Self::Ethereum, "astar" => Self::Astar, "polkadot" => Self::Polkadot, + "kusama" => Self::Kusama, + "rococo" => Self::Rococo, + "westend" => Self::Westend, + "wococo" => Self::Wococo, "polygon" => Self::Polygon, "arbitrum" => Self::Arbitrum, _ => anyhow::bail!("unsupported blockchain {}", blockchain), diff --git a/rosetta-client/src/tx_builder.rs b/rosetta-client/src/tx_builder.rs index 721d501f..e722e0d9 100644 --- a/rosetta-client/src/tx_builder.rs +++ b/rosetta-client/src/tx_builder.rs @@ -20,7 +20,9 @@ impl GenericTransactionBuilder { "ethereum" | "polygon" | "arbitrum" => { Self::Ethereum(rosetta_tx_ethereum::EthereumTransactionBuilder) }, - "polkadot" => Self::Polkadot(rosetta_tx_polkadot::PolkadotTransactionBuilder), + "polkadot" | "westend" | "rococo" => { + Self::Polkadot(rosetta_tx_polkadot::PolkadotTransactionBuilder) + }, _ => anyhow::bail!("unsupported blockchain"), }) } diff --git a/rosetta-core/src/traits.rs b/rosetta-core/src/traits.rs new file mode 100644 index 00000000..f018e3fd --- /dev/null +++ b/rosetta-core/src/traits.rs @@ -0,0 +1,93 @@ +use core::{ + default::Default, + fmt::{Debug, Display}, + str::FromStr, +}; + +/// Macro for creating `Maybe*` marker traits. +/// +/// Such a maybe-marker trait requires the given bound when `feature = std` and doesn't require +/// the bound on `no_std`. This is useful for situations where you require that a type implements +/// a certain trait with `feature = std`, but not on `no_std`. +/// +/// # Example +/// +/// ``` +/// sp_core::impl_maybe_marker! { +/// /// A marker for a type that implements `Debug` when `feature = std`. +/// trait MaybeDebug: std::fmt::Debug; +/// /// A marker for a type that implements `Debug + Display` when `feature = std`. +/// trait MaybeDebugDisplay: std::fmt::Debug, std::fmt::Display; +/// } +/// ``` +macro_rules! impl_maybe_marker { + ( + $( + $(#[$doc:meta] )+ + trait $trait_name:ident: $( $trait_bound:path ),+; + )+ + ) => { + $( + $(#[$doc])+ + #[cfg(feature = "std")] + pub trait $trait_name: $( $trait_bound + )+ {} + #[cfg(feature = "std")] + impl $trait_name for T {} + + $(#[$doc])+ + #[cfg(not(feature = "std"))] + pub trait $trait_name {} + #[cfg(not(feature = "std"))] + impl $trait_name for T {} + )+ + } +} + +impl_maybe_marker!( + /// A type that implements Display when in std environment. + trait MaybeDisplay: core::fmt::Display; + + /// A type that implements FromStr when in std environment. + trait MaybeFromStr: core::str::FromStr; + + /// A type that implements Hash when in std environment. + trait MaybeHash: core::hash::Hash; +); + +/// A type that can be used in runtime structures. +pub trait Member: Send + Sync + Sized + Debug + Eq + PartialEq + Clone + 'static {} +impl Member for T {} + +/// Super trait with all the attributes for a hashing output. +pub trait HashOutput: + Member + Display + FromStr + core::hash::Hash + AsRef<[u8]> + AsMut<[u8]> + Copy + Ord + Default +{ +} + +pub trait Header: Clone + Send + Sync + Eq + Debug + 'static { + /// Header number. + type Number; + + /// Header hash type + type Hash: HashOutput; +} + +/// Something that acts like an `Extrinsic`. +pub trait Transaction: Sized { + /// The function call. + type Call; +} + +pub trait Block { + /// Type for extrinsics. + type Transaction: Member + Transaction; + /// Header type. + type Header: Header; + /// Block hash type. + type Hash: HashOutput; +} + +pub trait BlockchainPrimitives { + type Block: Clone + Send + Sync + 'static; + type Transaction: Clone + Send + Sync + 'static; +} diff --git a/rosetta-core/src/types.rs b/rosetta-core/src/types.rs new file mode 100644 index 00000000..377169c2 --- /dev/null +++ b/rosetta-core/src/types.rs @@ -0,0 +1,105 @@ +use core::{ + clone::Clone, + cmp::{Eq, PartialEq}, + default::Default, + fmt::Debug, +}; +use serde::{Deserialize, Serialize}; + +pub use rosetta_types::{ + AccountIdentifier, Amount, BlockIdentifier, NetworkIdentifier, Operation, OperationIdentifier, + PartialBlockIdentifier, SignatureType, TransactionIdentifier, +}; + +#[cfg(feature = "std")] +use std::{string::ToString, vec::Vec}; + +#[cfg(not(feature = "std"))] +use alloc::{string::ToString, vec::Vec}; + +/// Block : Blocks contain an array of Transactions that occurred at a particular `BlockIdentifier`. +/// A hard requirement for blocks returned by Rosetta implementations is that they MUST be +/// _inalterable_: once a client has requested and received a block identified by a specific +/// `BlockIndentifier`, all future calls for that same `BlockIdentifier` must return the same block +/// contents. +#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)] +pub struct Block { + #[serde(rename = "block_identifier")] + pub block_identifier: BlockIdentifier, + #[serde(rename = "parent_block_identifier")] + pub parent_block_identifier: BlockIdentifier, + /// The timestamp of the block in milliseconds since the Unix Epoch. The timestamp is stored in + /// milliseconds because some blockchains produce blocks more often than once a second. + #[serde(rename = "timestamp")] + pub timestamp: i64, + #[serde(rename = "transactions")] + pub transactions: Vec, + #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] + pub metadata: Option, +} + +/// `Currency` is composed of a canonical Symbol and Decimals. This Decimals value is used to +/// convert an Amount.Value from atomic units (Satoshis) to standard units (Bitcoins). +#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)] +pub struct Currency { + /// Canonical symbol associated with a currency. + pub symbol: &'static str, + /// Number of decimal places in the standard unit representation of the amount. For example, + /// BTC has 8 decimals. Note that it is not possible to represent the value of some currency in + /// atomic units that is not base 10. + pub decimals: u32, +} + +/// `CurveType` is the type of cryptographic curve associated with a `PublicKey`. +/// * [secp256k1: SEC compressed - `33 bytes`](https://secg.org/sec1-v2.pdf#subsubsection.2.3.3) +/// * [secp256r1: SEC compressed - `33 bytes`](https://secg.org/sec1-v2.pdf#subsubsection.2.3.3) +/// * [edwards25519: `y (255-bits) || x-sign-bit (1-bit)` - `32 bytes`](https://ed25519.cr.yp.to/ed25519-20110926.pdf) +/// * [tweedle: 1st pk : Fq.t (32 bytes) || 2nd pk : Fq.t (32 bytes)](https://github.com/CodaProtocol/coda/blob/develop/rfcs/0038-rosetta-construction-api.md#marshal-keys) +/// * [pallas: `x (255 bits) || y-parity-bit (1-bit) - 32 bytes`](https://github.com/zcash/pasta) +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CurveType { + #[serde(rename = "secp256k1")] + Secp256k1, + #[serde(rename = "secp256r1")] + Secp256r1, + #[serde(rename = "edwards25519")] + Edwards25519, + #[serde(rename = "tweedle")] + Tweedle, + #[serde(rename = "pallas")] + Pallas, + #[serde(rename = "schnorrkel")] + Schnorrkel, +} + +impl ToString for CurveType { + fn to_string(&self) -> String { + match self { + Self::Secp256k1 => String::from("secp256k1"), + Self::Secp256r1 => String::from("secp256r1"), + Self::Edwards25519 => String::from("edwards25519"), + Self::Tweedle => String::from("tweedle"), + Self::Pallas => String::from("pallas"), + Self::Schnorrkel => String::from("schnorrkel"), + } + } +} + +impl Default for CurveType { + fn default() -> Self { + Self::Secp256k1 + } +} + +/// `Transaction` contain an array of Operations that are attributable to the same +/// `TransactionIdentifier`. +#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)] +pub struct Transaction { + pub transaction_identifier: TransactionIdentifier, + + /// Raw transaction bytes + pub raw_tx: Vec, + + /// Raw transaction bytes + pub raw_tx_receipt: Option>, +} diff --git a/rosetta-server/src/ws.rs b/rosetta-server/src/ws.rs index 6ce8ac07..a6cf62a1 100644 --- a/rosetta-server/src/ws.rs +++ b/rosetta-server/src/ws.rs @@ -18,7 +18,7 @@ use jsonrpsee::{ client_transport::ws::WsTransportClientBuilder, core::{ client::{Client, ClientBuilder}, - Error as JsonRpseeError, + ClientError as JsonRpseeError, }, }; use std::time::Duration; diff --git a/rosetta-server/src/ws/config.rs b/rosetta-server/src/ws/config.rs index 5a52b4b5..f5a872e6 100644 --- a/rosetta-server/src/ws/config.rs +++ b/rosetta-server/src/ws/config.rs @@ -1,7 +1,7 @@ use core::{num::NonZeroUsize, time::Duration}; use jsonrpsee::{ client_transport::ws::WsTransportClientBuilder, - core::client::{ClientBuilder, IdKind}, + core::client::{async_client::PingConfig, ClientBuilder, IdKind}, }; /// Ten megabytes. @@ -183,8 +183,8 @@ impl From<&RpcClientConfig> for ClientBuilder { ) .id_format(config.rpc_id_kind) .set_max_logging_length(config.rpc_max_log_length); - if let Some(ping_internal) = config.rpc_ping_interval { - builder = builder.ping_interval(ping_internal); + if let Some(ping_interval) = config.rpc_ping_interval { + builder = builder.enable_ws_ping(PingConfig::new().ping_interval(ping_interval)); } builder } diff --git a/rosetta-server/src/ws/error.rs b/rosetta-server/src/ws/error.rs index 4f20ff41..74280d49 100644 --- a/rosetta-server/src/ws/error.rs +++ b/rosetta-server/src/ws/error.rs @@ -1,86 +1,56 @@ -use jsonrpsee::{core::Error as JsonRpseeError, types::InvalidRequestId}; +#![allow(clippy::wrong_self_convention)] +use jsonrpsee::{core::ClientError as JsonRpseeError, types::InvalidRequestId}; +use std::sync::Arc; -/// A version of [`jsonrpsee::core::Error`] that implements [`core::clone::Clone`] trait. -/// Cloning the error is necessary when using [`futures_util::future::Shared`]. if a reconnect -/// fails, the error must be cloned and send back to all pending requests. -/// -/// See [`super::reconnect_impl::ReconnectFuture`] and [`super::reconnect_impl::ReadyOrWaitFuture`] -#[allow(dead_code)] -#[derive(Debug)] -pub struct CloneableError { - inner: JsonRpseeError, +pub trait CloneableJsonRpseeError { + fn as_error(self) -> JsonRpseeError; } -#[allow(dead_code)] -impl CloneableError { - /// Returns the inner error. - pub fn into_inner(self) -> JsonRpseeError { - self.inner +impl CloneableJsonRpseeError for JsonRpseeError { + fn as_error(self) -> JsonRpseeError { + clone_error(&self) } } -impl From for CloneableError { - fn from(error: JsonRpseeError) -> Self { - Self { inner: error } +impl CloneableJsonRpseeError for &JsonRpseeError { + fn as_error(self) -> JsonRpseeError { + clone_error(self) } } -impl From for JsonRpseeError { - fn from(error: CloneableError) -> Self { - error.inner +impl CloneableJsonRpseeError for Arc { + fn as_error(self) -> JsonRpseeError { + clone_error(self.as_ref()) } } -impl Clone for CloneableError { - fn clone(&self) -> Self { - let error = match &self.inner { - JsonRpseeError::Call(call) => JsonRpseeError::Call(call.clone()), - JsonRpseeError::Transport(error) => { - JsonRpseeError::Transport(anyhow::format_err!("{error:?}")) - }, - JsonRpseeError::InvalidResponse(error) => { - JsonRpseeError::InvalidResponse(error.clone()) - }, - JsonRpseeError::RestartNeeded(reason) => JsonRpseeError::RestartNeeded(reason.clone()), - JsonRpseeError::ParseError(error) => JsonRpseeError::Custom(format!("{error:?}")), /* TODO: return an parser error instead a custom error */ - JsonRpseeError::InvalidSubscriptionId => JsonRpseeError::InvalidSubscriptionId, - JsonRpseeError::InvalidRequestId(error) => { - JsonRpseeError::InvalidRequestId(match error { - InvalidRequestId::Invalid(message) => { - InvalidRequestId::Invalid(message.clone()) - }, - InvalidRequestId::NotPendingRequest(message) => { - InvalidRequestId::NotPendingRequest(message.clone()) - }, - InvalidRequestId::Occupied(message) => { - InvalidRequestId::Occupied(message.clone()) - }, - }) - }, - JsonRpseeError::UnregisteredNotification(error) => { - JsonRpseeError::UnregisteredNotification(error.clone()) - }, - JsonRpseeError::DuplicateRequestId => JsonRpseeError::DuplicateRequestId, - JsonRpseeError::MethodAlreadyRegistered(method) => { - JsonRpseeError::MethodAlreadyRegistered(method.clone()) - }, - JsonRpseeError::MethodNotFound(method) => { - JsonRpseeError::MethodNotFound(method.clone()) - }, - JsonRpseeError::SubscriptionNameConflict(name) => { - JsonRpseeError::SubscriptionNameConflict(name.clone()) - }, - JsonRpseeError::RequestTimeout => JsonRpseeError::RequestTimeout, - JsonRpseeError::MaxSlotsExceeded => JsonRpseeError::MaxSlotsExceeded, - JsonRpseeError::AlreadyStopped => JsonRpseeError::AlreadyStopped, - JsonRpseeError::EmptyAllowList(list) => JsonRpseeError::EmptyAllowList(list), - JsonRpseeError::HttpHeaderRejected(header, value) => { - JsonRpseeError::HttpHeaderRejected(header, value.to_string()) - }, - JsonRpseeError::Custom(message) => JsonRpseeError::Custom(message.clone()), - JsonRpseeError::HttpNotImplemented => JsonRpseeError::HttpNotImplemented, - JsonRpseeError::EmptyBatchRequest => JsonRpseeError::EmptyBatchRequest, - }; - Self { inner: error } +// impl CloneableJsonRpseeError for &T where T: AsRef { +// fn as_error(&self) -> JsonRpseeError { +// clone_error(AsRef::as_ref(&self)) +// } +// } + +fn clone_error(error: &JsonRpseeError) -> JsonRpseeError { + match error { + JsonRpseeError::Call(error) => JsonRpseeError::Call(error.clone()), + JsonRpseeError::Transport(error) => { + JsonRpseeError::Transport(anyhow::format_err!("{error:?}")) + }, + JsonRpseeError::RestartNeeded(reason) => JsonRpseeError::RestartNeeded(reason.clone()), + JsonRpseeError::ParseError(error) => JsonRpseeError::Custom(format!("{error:?}")), /* TODO: return an parser error instead a custom error */ + JsonRpseeError::InvalidSubscriptionId => JsonRpseeError::InvalidSubscriptionId, + JsonRpseeError::InvalidRequestId(error) => JsonRpseeError::InvalidRequestId(match error { + InvalidRequestId::Invalid(message) => InvalidRequestId::Invalid(message.clone()), + InvalidRequestId::NotPendingRequest(message) => { + InvalidRequestId::NotPendingRequest(message.clone()) + }, + InvalidRequestId::Occupied(message) => InvalidRequestId::Occupied(message.clone()), + }), + JsonRpseeError::RequestTimeout => JsonRpseeError::RequestTimeout, + JsonRpseeError::MaxSlotsExceeded => JsonRpseeError::MaxSlotsExceeded, + JsonRpseeError::Custom(message) => JsonRpseeError::Custom(message.clone()), + JsonRpseeError::HttpNotImplemented => JsonRpseeError::HttpNotImplemented, + JsonRpseeError::EmptyBatchRequest(request) => JsonRpseeError::EmptyBatchRequest(*request), + JsonRpseeError::RegisterMethod(error) => JsonRpseeError::RegisterMethod(error.clone()), } } diff --git a/rosetta-server/src/ws/jsonrpsee_client.rs b/rosetta-server/src/ws/jsonrpsee_client.rs index 9863b418..fb64c3de 100644 --- a/rosetta-server/src/ws/jsonrpsee_client.rs +++ b/rosetta-server/src/ws/jsonrpsee_client.rs @@ -4,7 +4,6 @@ use jsonrpsee::{ core::{ client::{ClientT, SubscriptionClientT, SubscriptionKind}, traits::ToRpcParams, - Error as JsonRpseeError, }, types::SubscriptionId, }; @@ -17,7 +16,7 @@ use subxt::{ pub struct Params(Option>); impl Params { - pub fn new

    (params: P) -> Result + pub fn new

    (params: P) -> Result where P: ToRpcParams, { @@ -27,7 +26,7 @@ impl Params { } impl ToRpcParams for Params { - fn to_rpc_params(self) -> Result>, JsonRpseeError> { + fn to_rpc_params(self) -> Result>, serde_json::Error> { Ok(self.0) } } diff --git a/rosetta-server/src/ws/reconnect.rs b/rosetta-server/src/ws/reconnect.rs index b325ccbf..6276cad7 100644 --- a/rosetta-server/src/ws/reconnect.rs +++ b/rosetta-server/src/ws/reconnect.rs @@ -1,17 +1,20 @@ -use super::jsonrpsee_client::Params as RpcParams; +use super::{error::CloneableJsonRpseeError, jsonrpsee_client::Params as RpcParams}; use async_trait::async_trait; use jsonrpsee::core::{ client::{BatchResponse, ClientT, Subscription, SubscriptionClientT}, params::BatchRequestBuilder, traits::ToRpcParams, - Error, + ClientError as Error, }; use serde::de::DeserializeOwned; use std::{ fmt::{Debug, Display, Formatter}, future::Future, ops::{Deref, DerefMut}, - sync::atomic::{AtomicU32, Ordering}, + sync::{ + atomic::{AtomicU32, Ordering}, + Arc, + }, }; /// Reconnect trait. @@ -21,18 +24,21 @@ pub trait Reconnect: 'static + Sized + Send + Sync { type Client: SubscriptionClientT + 'static + Send + Sync; type ClientRef: AsRef + Send + Sync; - type ReadyFuture<'a>: Future> + 'a + Send + Unpin + type ReadyFuture<'a>: Future>> + 'a + Send + Unpin where Self: 'a; - type RestartNeededFuture<'a>: Future> + type RestartNeededFuture<'a>: Future>> + 'a + Send + Unpin where Self: 'a; - type ReconnectFuture<'a>: Future> + 'a + Send + Unpin + type ReconnectFuture<'a>: Future>> + + 'a + + Send + + Unpin where Self: 'a; @@ -74,7 +80,7 @@ where } } - async fn ready(&self) -> Result { + async fn ready(&self) -> Result> { Reconnect::ready(&self.client).await.map_err(|error| { tracing::error!("rpc client is unavailable: {error:?}"); error @@ -83,9 +89,9 @@ where async fn restart_needed( &self, - reason: String, + reason: Arc, client: T::ClientRef, - ) -> Result { + ) -> Result> { let reconnect_count = self.reconnect_count.fetch_add(1, Ordering::SeqCst) + 1; self.span.record("reconnects", reconnect_count); tracing::error!("Reconneting RPC client due error: {reason}"); @@ -155,12 +161,15 @@ where Params: ToRpcParams + Send, { let _enter = self.span.enter(); - let client = self.ready().await?; + let client = self.ready().await.map_err(CloneableJsonRpseeError::as_error)?; let params = RpcParams::new(params)?; match ClientT::notification(client.as_ref(), method, params.clone()).await { Ok(r) => Ok(r), Err(Error::RestartNeeded(message)) => { - let client = self.restart_needed(message, client).await?; + let client = self + .restart_needed(message, client) + .await + .map_err(CloneableJsonRpseeError::as_error)?; ClientT::notification(client.as_ref(), method, params).await }, Err(error) => { @@ -176,7 +185,7 @@ where Params: ToRpcParams + Send, { let _enter = self.span.enter(); - let client = self.ready().await?; + let client = self.ready().await.map_err(CloneableJsonRpseeError::as_error)?; let params = RpcParams::new(params)?; let error = match ClientT::request::(client.as_ref(), method, params.clone()).await { Ok(r) => return Ok(r), @@ -185,7 +194,10 @@ where match error { Error::RestartNeeded(message) => { - let client = self.restart_needed(message, client).await?; + let client = self + .restart_needed(message, client) + .await + .map_err(CloneableJsonRpseeError::as_error)?; ClientT::request::(client.as_ref(), method, params).await }, error => { @@ -203,7 +215,7 @@ where R: DeserializeOwned + Debug + 'a, { let _enter = self.span.enter(); - let client = self.ready().await?; + let client = self.ready().await.map_err(CloneableJsonRpseeError::as_error)?; let error = match ClientT::batch_request(client.as_ref(), batch.clone()).await { Ok(r) => return Ok(r), Err(error) => error, @@ -211,7 +223,10 @@ where match error { Error::RestartNeeded(message) => { - let client = self.restart_needed(message, client).await?; + let client = self + .restart_needed(message, client) + .await + .map_err(CloneableJsonRpseeError::as_error)?; ClientT::batch_request(client.as_ref(), batch).await }, error => { @@ -239,7 +254,7 @@ where Notif: DeserializeOwned, { let _enter = self.span.enter(); - let client = self.ready().await?; + let client = self.ready().await.map_err(CloneableJsonRpseeError::as_error)?; let params = RpcParams::new(params)?; let error = match SubscriptionClientT::subscribe::( client.as_ref(), @@ -255,7 +270,10 @@ where match error { Error::RestartNeeded(message) => { - let client = self.restart_needed(message, client).await?; + let client = self + .restart_needed(message, client) + .await + .map_err(CloneableJsonRpseeError::as_error)?; SubscriptionClientT::subscribe::( client.as_ref(), subscribe_method, @@ -279,7 +297,7 @@ where Notif: DeserializeOwned, { let _enter = self.span.enter(); - let client = self.ready().await?; + let client = self.ready().await.map_err(CloneableJsonRpseeError::as_error)?; let error = match SubscriptionClientT::subscribe_to_method(client.as_ref(), method).await { Ok(subscription) => return Ok(subscription), Err(error) => error, @@ -287,7 +305,10 @@ where match error { Error::RestartNeeded(message) => { - let client = self.restart_needed(message, client).await?; + let client = self + .restart_needed(message, client) + .await + .map_err(CloneableJsonRpseeError::as_error)?; SubscriptionClientT::subscribe_to_method(client.as_ref(), method).await }, error => { diff --git a/rosetta-server/src/ws/reconnect_impl.rs b/rosetta-server/src/ws/reconnect_impl.rs index 339b419f..773f30a0 100644 --- a/rosetta-server/src/ws/reconnect_impl.rs +++ b/rosetta-server/src/ws/reconnect_impl.rs @@ -1,11 +1,11 @@ #![allow(dead_code)] -use super::{error::CloneableError, reconnect::Reconnect}; +use super::reconnect::Reconnect; use futures_timer::Delay; use futures_util::{ future::{Either, Select, Shared}, FutureExt, }; -use jsonrpsee::core::{client::SubscriptionClientT, error::Error}; +use jsonrpsee::core::{client::SubscriptionClientT, ClientError as Error}; use pin_project::pin_project; use std::{ fmt::{Debug, Formatter}, @@ -213,23 +213,23 @@ impl From for ReadyOrWaitFuture { } impl Future for ReadyOrWaitFuture { - type Output = Result, Error>; + type Output = Result, Arc>; fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { let this = self.project(); match this.state.take() { - Some(ReadyOrWaitState::Ready(result)) => Poll::Ready(result), + Some(ReadyOrWaitState::Ready(result)) => Poll::Ready(result.map_err(Arc::new)), Some(ReadyOrWaitState::Waiting(mut future)) => { match future.poll_unpin(cx) { // The request delay timeout - Poll::Ready(Either::Left(_)) => Poll::Ready(Err(Error::Custom( + Poll::Ready(Either::Left(_)) => Poll::Ready(Err(Arc::new(Error::Custom( "Timeout: cannot process request, client reconnecting...".to_string(), - ))), + )))), // The client was reconnected! Poll::Ready(Either::Right((Ok(client), _))) => Poll::Ready(Ok(client)), // Failed to reconnect Poll::Ready(Either::Right((Err(result), _))) => { - Poll::Ready(Err(result.into_inner())) + Poll::Ready(Err(Arc::clone(&result))) }, Poll::Pending => { *this.state = Some(ReadyOrWaitState::Waiting(future)); @@ -361,7 +361,7 @@ impl ReconnectFuture { } impl Future for ReconnectFuture { - type Output = Result, CloneableError>; + type Output = Result, Arc>; #[allow(clippy::too_many_lines)] fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { @@ -481,7 +481,7 @@ impl Future for ReconnectFuture { Ok(guard) => guard, Err(error) => { tracing::error!("FATAL ERROR: client lock was poisoned: {error}"); - return Poll::Ready(Err(CloneableError::from(Error::Custom(format!( + return Poll::Ready(Err(Arc::new(Error::Custom(format!( "FATAL ERROR: client lock was poisoned: {error}" ))))); }, diff --git a/scripts/check.sh b/scripts/check.sh new file mode 100755 index 00000000..88b8a2b8 --- /dev/null +++ b/scripts/check.sh @@ -0,0 +1,108 @@ +#!/bin/bash +set -e + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +cd "${SCRIPT_DIR}/../" + +RUN_FIX=0 +RUN_TESTS=0 + +# process arguments +while [[ $# -gt 0 ]] +do + case "$1" in + --test|--tests) + RUN_TESTS=1 + shift 1 + ;; + --fix) + RUN_FIX=1 + shift 1 + ;; + *) + warn "Unknown argument: $1" + usage + ;; + esac +done + +# Setup console colors +if test -t 1 && command -v tput >/dev/null 2>&1; then + ncolors=$(tput colors) + if test -n "${ncolors}" && test "${ncolors}" -ge 8; then + bold_color=$(tput bold) + green_color=$(tput setaf 2) + warn_color=$(tput setaf 3) + error_color=$(tput setaf 1) + reset_color=$(tput sgr0) + fi + # 72 used instead of 80 since that's the default of pr + ncols=$(tput cols) +fi +: "${ncols:=72}" + +# Print the command in yellow, and the output in red +print_failed_command() { + printf >&2 "${bold_color}${warn_color}%s${reset_color}\n${error_color}%s${reset_color}\n" "$1" "$2" +} + +# Execute a command and only print it if it fails +exec_cmd() { + printf ' %s... ' "$1" + local cmdOutput + if eval "cmdOutput=\$( { $2 ;} 2>&1 )" > /dev/null; then + # Success + echo "${bold_color}${green_color}OK${reset_color}" + else + # Failure + echo "${bold_color}${error_color}FAILED${reset_color}" + print_failed_command "$2" "${cmdOutput}" + exit 1 + fi +} +# LINT_FLAGS='-- -Dwarnings -Dclippy::unwrap_used -Dclippy::expect_used -Dclippy::nursery -Dclippy::pedantic -Aclippy::module_name_repetitions' + +if [[ "${RUN_FIX}" == "1" ]]; then + exec_cmd 'format' 'cargo +nightly fmt --all && dprint fmt' + # exec_cmd 'clippy fix' 'cargo clippy --fix --allow-dirty --workspace --examples --tests --all-features --exclude playground -- -Dwarnings -Dclippy::unwrap_used -Dclippy::expect_used -Dclippy::nursery -Dclippy::pedantic -Aclippy::module_name_repetitions' + # exec_cmd 'clippy --fix' 'cargo clippy --fix --workspace --examples --tests --all-features --allow-dirty -- -Dwarnings -Dclippy::unwrap_used -Dclippy::expect_used -Dclippy::nursery -Dclippy::pedantic -Aclippy::module_name_repetitions -Aclippy::missing_errors_doc' +fi +exec_cmd 'shellcheck' 'shellcheck --enable=all --severity=style ./scripts/*.sh' +exec_cmd 'cargo fmt' 'cargo +nightly fmt --all -- --check' +exec_cmd 'dprint check' 'dprint check' +exec_cmd 'cargo deny' 'cargo deny check' + +# exec_cmd 'clippy rosetta-server-astar' 'cargo clippy --locked -p rosetta-server-astar --examples --tests -- -Dwarnings -Dclippy::unwrap_used -Dclippy::expect_used -Dclippy::nursery -Dclippy::pedantic -Aclippy::module_name_repetitions' +# exec_cmd 'clippy rosetta-server-bitcoin' 'cargo clippy --locked -p rosetta-server-bitcoin --examples --tests -- -Dwarnings -Dclippy::unwrap_used -Dclippy::expect_used -Dclippy::nursery -Dclippy::pedantic -Aclippy::module_name_repetitions' +# exec_cmd 'clippy rosetta-server-ethereum' 'cargo clippy --locked -p rosetta-server-ethereum --examples --tests -- -Dwarnings -Dclippy::unwrap_used -Dclippy::expect_used -Dclippy::nursery -Dclippy::pedantic -Aclippy::module_name_repetitions' +# exec_cmd 'clippy rosetta-server-polkadot' 'cargo clippy --locked -p rosetta-server-polkadot --examples --tests -- -Dwarnings -Dclippy::unwrap_used -Dclippy::expect_used -Dclippy::nursery -Dclippy::pedantic -Aclippy::module_name_repetitions' +# exec_cmd 'clippy rosetta-client' 'cargo clippy --locked -p rosetta-client --examples --tests -- -Dwarnings -Dclippy::unwrap_used -Dclippy::expect_used -Dclippy::nursery -Dclippy::pedantic -Aclippy::module_name_repetitions' +exec_cmd 'clippy' 'cargo clippy --locked --workspace --examples --tests --all-features --exclude playground -- -Dwarnings -Dclippy::unwrap_used -Dclippy::expect_used -Dclippy::nursery -Dclippy::pedantic -Aclippy::module_name_repetitions' +# exec_cmd 'build connectors' "${SCRIPT_DIR}/build_connectors.sh" + +if [[ "${RUN_TESTS}" == "1" ]]; then + exec_cmd 'cleanup docker' "${SCRIPT_DIR}/reset_docker.sh" + cargo test --locked -p rosetta-server-ethereum + cargo test --locked -p rosetta-server-astar + cargo test --locked -p rosetta-server-polkadot + cargo test --locked -p rosetta-server-bitcoin + cargo test --locked -p rosetta-client + cargo test --locked --workspace --all-features \ + --exclude rosetta-server-astar \ + --exclude rosetta-server-bitcoin \ + --exclude rosetta-server-ethereum \ + --exclude rosetta-server-polkadot \ + --exclude rosetta-client + # cargo test --locked --all-features --workspace + exec_cmd 'cleanup docker' "${SCRIPT_DIR}/reset_docker.sh" +fi +#exec_cmd 'reset docker' "${SCRIPT_DIR}/reset_docker.sh" +#cargo test --locked --all-features --workspace + + +#exec_cmd 'cargo test' 'cargo test --locked --all-features --workspace' + +#echo "Running ${SCRIPT_DIR}/build_connectors.sh" +#"${SCRIPT_DIR}/build_connectors.sh" +# +#cargo test --locked --all-features --workspace diff --git a/scripts/pull_nodes.sh b/scripts/pull_nodes.sh index 59be4277..2f8b8a25 100755 --- a/scripts/pull_nodes.sh +++ b/scripts/pull_nodes.sh @@ -3,5 +3,5 @@ set -e docker image pull ruimarinho/bitcoin-core:23 docker image pull ethereum/client-go:v1.12.2 -docker image pull parity/polkadot:v1.0.0 -docker image pull staketechnologies/astar-collator:v5.15.0 +docker image pull parity/polkadot:v1.5.0 +docker image pull staketechnologies/astar-collator:v5.28.0-rerun